Spaces:
Build error
Build error
File size: 3,875 Bytes
c8c12e9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
[tox]
isolated_build = True
skip_missing_interpreters = true
envlist =
black
isort
flake8
pylint
mypy
pydocstyle
pre_merge
nightly
[testenv:black]
basepython = python3
deps = black==22.3.0
commands = black --check --diff anomalib -l 120
[testenv:isort]
basepython = python3
deps = isort==5.10.1
commands = isort --check-only --df anomalib --profile=black
[testenv:flake8]
skip_install = true
basepython = python3
deps =
flake8
mccabe
commands = flake8 anomalib --exclude=anomalib/models/components/freia
[testenv:pylint]
skip_install = true
basepython = python3
deps =
pylint
-r{toxinidir}/requirements/base.txt
commands = pylint anomalib --rcfile=tox.ini --ignore=anomalib/models/components/freia/
[testenv:mypy]
basepython = python3
passenv = ftp_proxy
HTTP_PROXY
HTTPS_PROXY
deps =
mypy
-r{toxinidir}/requirements/base.txt
commands =
python -m mypy --install-types --non-interactive anomalib --config-file tox.ini
python -m mypy --install-types --non-interactive tools/train.py --config-file tox.ini
python -m mypy --install-types --non-interactive tools/test.py --config-file tox.ini
[testenv:pydocstyle]
basepython = python3
deps =
pydocstyle
commands = pydocstyle anomalib --config=tox.ini
[testenv:pre_merge]
basepython = python3
passenv = ftp_proxy
HTTP_PROXY
HTTPS_PROXY
CUDA_VISIBLE_DEVICES
ANOMALIB_DATASET_PATH
deps =
coverage
pytest
flaky
-r{toxinidir}/requirements/base.txt
-r{toxinidir}/requirements/openvino.txt
commands =
coverage erase
coverage run --include=anomalib/* -m pytest tests/pre_merge/ -ra --showlocals
; https://github.com/openvinotoolkit/anomalib/issues/94
coverage report -m --fail-under=85
coverage xml -o {toxworkdir}/coverage.xml
[testenv:nightly]
basepython = python3
passenv = ftp_proxy
HTTP_PROXY
HTTPS_PROXY
CUDA_VISIBLE_DEVICES
ANOMALIB_DATASET_PATH
deps =
coverage
pytest
flaky
-r{toxinidir}/requirements/base.txt
-r{toxinidir}/requirements/openvino.txt
commands =
coverage erase
coverage run --include=anomalib/* -m pytest tests/nightly/ -ra --showlocals
; https://github.com/openvinotoolkit/anomalib/issues/94
coverage report -m --fail-under=64
coverage xml -o {toxworkdir}/coverage.xml
[flake8]
max-line-length = 120
ignore = E203,W503
[pylint]
extension-pkg-whitelist = cv2
ignored-modules = cv2
disable = duplicate-code,
arguments-differ,
fixme,
import-error,
no-self-use,
too-many-arguments,
too-many-branches,
too-many-instance-attributes,
too-many-locals,
too-few-public-methods,
generated-members = numpy.*, torch.*
good-names = e, i, id
ignore = tests,docs,anomalib/models/components/freia
max-line-length = 120
max-parents = 15
min-similarity-lines = 5
[mypy]
ignore_missing_imports = True
show_error_codes = True
exclude = anomalib/models/components/freia/
[mypy-anomalib.models.components.freia.*]
follow_imports = skip
[mypy-torch.*]
follow_imports = skip
follow_imports_for_stubs = True
[coverage:report]
exclude_lines =
except ImportError
raise ImportError
except ApiException
raise ApiException
raise ValueError
[pydocstyle]
inherit = false
ignore = D107, ; Missing docstring in __init__
D202, ; No blank lines allowed after function docstring
D203, ; 1 blank line required before class docstring
D213, ; Multi-line docstring summary should start at the second line
D401, ; First line should be in imperative mood; try rephrasing
D404, ; First word of the docstring should not be This
D406, ; Section name should end with a newline
D407, ; Missing dashed underline after section
D413 ; Missing blank line after last section
|