-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
82 lines (72 loc) · 2.49 KB
/
tox.ini
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
[tox]
envlist =
python3.8
python3.9
python3.10
isolated_build = true
skipsdist = true
[testenv]
deps =
pytest ~= 6.2.0
pytest-randomly ~= 3.8.0
commands =
pip install aaanimal --no-index --find-links=dist
pytest {posargs}
[testenv:docs]
basepython = python3.8
deps =
sphinx ~= 4.1.0
furo == 2021.8.11b42
commands =
pip install aaanimal --no-index --find-links=dist
sphinx-build -b html docs {posargs:docs/_build/html}
[testenv:static]
deps =
black ~= 21.8b0
flake8 ~= 3.9.0
flake8-bugbear ~= 21.4.0
flake8-commas ~= 2.0.0
flake8-docstrings ~= 1.6.0
pep8-naming ~= 0.12.0
mypy >= 0.910, < 1.0.0
commands =
pip install aaanimal --no-index --find-links=dist
black --check --diff tests/
flake8 --docstring-convention=google tests/
mypy tests/
[testenv:rust]
allowlist_externals =
cargo
commands =
cargo fmt --all -- --check
cargo clippy -- -D warnings
# If any Rust tests are written they can be run here with
# cargo test
[flake8]
# This flake8 configuration largely borrows from Black (https://git.io/JfTaC)
# D401 - First line should be in imperative mood
# E203 - whitespace before ‘:’
# E501 - line too long (82 > 79 characters)
# W503 - line break before binary operator
# B902 - invalid first argument used for method (https://github.com/PyCQA/flake8-bugbear/issues/33)
ignore = D401,E203,E501,W503,B902
# Line length is intentionally set to 80 here because we use Bugbear.
# See https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
# for more details.
max-line-length = 80
# McCabe originally recommended a maximum complexity of 10, but 15 has been
# observed as acceptable. It seemed like 12 would be a reasonable midpoint.
# https://en.wikipedia.org/wiki/Cyclomatic_complexity#Limiting_complexity_during_development
max-complexity = 12
# B is for flake8-bugbear (https://github.com/PyCQA/flake8-bugbear)
# B9 opts into flake8-bugbear's opinionated warnings (https://git.io/JfTae)
# C is for mccabe (https://github.com/PyCQA/mccabe)
# E & W are for pycodestyle (https://github.com/PyCQA/pycodestyle)
# F is for pyflakes (https://github.com/PyCQA/pyflakes)
# I is for flake8-import-order (https://github.com/PyCQA/flake8-import-order)
select = B,B9,C,E,F,I,W
# These lines configure the flake8-import-order plugin.
#
# A description of the pycharm style can be found in the flake8-import-order
# docs: https://github.com/PyCQA/flake8-import-order#styles
import-order-style = pycharm