imaginAIry/tox.ini
Bryce Drennan 9eacf5e7ed
perf: improve startup time by doing some imports lazily (#233)
just running `aimg --help` or `aimg --version` was very slow due to all the imports being brought in eagerly

Before changes `aimg --help`
`2.24s user 4.05s system 184% cpu 3.416 total`

After changes:
`0.04s user 0.02s system 8% cpu 0.625 total`

Used `PYTHONPROFILEIMPORTTIME=1 aimg --help` to find time consuming imports.

Also switched to using `scripts` instead of `entrypoints` since the scripts are much faster.

Made duplicate SAMPLER_TYPE_OPTIONS that can be loaded without loading all the samplers themselves.

Likely a breaking change - not sure.
2023-02-02 21:43:04 -08:00

28 lines
909 B
INI

[pytest]
addopts = --doctest-modules -s --tb=native -v --durations=10
norecursedirs = build dist downloads other prolly_delete imaginairy/vendored
filterwarnings =
ignore::DeprecationWarning
ignore::UserWarning
[pylama]
format = pylint
skip = */.tox/*,*/.env/*,build/*,*/downloads/*,other/*,prolly_delete/*,downloads/*,imaginairy/vendored/*,testing_support/vastai_cli_official.py,.eggs/*
linters = pylint,pycodestyle,pyflakes,mypy
ignore =
Z999,C0103,C0301,C0302,C0114,C0115,C0116,C0415,
Z999,D100,D101,D102,D103,D105,D106,D107,D200,D202,D203,D205,D212,D400,D401,D406,D407,D413,D415,D417,
Z999,E203,E501,E1101,E1131,E1135,E1136,
Z999,R0901,R0902,R0903,R0904,R0193,R0912,R0913,R0914,R0915,R1702,
Z999,W0221,W0511,W0612,W0613,W0632,W1203
[pylama:tests/*]
ignore = C0104,C0114,C0116,D103,W0143,W0613
[pylama:*/__init__.py]
ignore = D104
[pylama:pylint]
generated_members=torch.*