-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
131 lines (122 loc) · 3.32 KB
/
tox.ini
File metadata and controls
131 lines (122 loc) · 3.32 KB
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
[tox]
minversion = 4.0
envlist =
py{39,310,311,312},
flake8,
mypy,
docs,
clean,
build
isolated_build = True
requires =
pip >= 23.0.0
poetry >= 1.5.0
pytest-cov >= 4.1.0
pytest-xdist >= 3.5.0
[testenv:flake8]
basepython = python3.11
deps =
flake8>=6.1.0
flake8-black>=0.3.6
flake8-bugbear>=23.9.11
flake8-docstrings>=1.7.0
flake8-import-order>=0.18.2
flake8-annotations>=3.0.0
flake8-typing-imports>=1.14.0
flake8-builtins>=2.1.0
flake8-comprehensions>=3.14.0
flake8-print>=5.0.0
flake8-quotes>=3.3.2
flake8-string-format>=0.3.0
flake8-tidy-imports>=4.10.0
flake8-eradicate>=1.5.0
flake8-return>=1.2.0
flake8-simplify>=0.20.0
pep8-naming>=0.13.3
black>=23.11.0
isort>=5.12.0
commands =
black --check --diff src tests
isort --check-only --diff src tests
flake8 src tests
[testenv:mypy]
basepython = python3.11
deps =
mypy>=1.7.1
types-requests>=2.31.0.10
types-pyyaml>=6.0.12.11
types-tabulate>=0.9.0.5
types-python-dateutil>=2.8.19.14
-e .
commands =
mypy --install-types --non-interactive src/
[flake8]
max-line-length = 88
extend-ignore = E203, W503
exclude = .git,__pycache__,.tox,.mypy_cache,.pytest_cache,build,dist,venv
per-file-ignores =
# Allow non-abstract empty methods in abstract base classes
__init__.py: F401
# Allow wildcard imports in __init__.py files
__init__.py: F403
# Allow too many arguments in test files
tests/*.py: F811, F841, W503, E501
[pytest]
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
addopts = -v --import-mode=importlib --strict-markers --strict-config --doctest-modules -n auto
norecursedirs = .git .tox .mypy_cache .pytest_cache __pycache__ build dist
filterwarnings = error::DeprecationWarning
log_cli = true
log_cli_level = INFO
log_cli_format = %(asctime)s [%(levelname)8s] %(message)s (%(name)s:%(lineno)s)
log_cli_date_format = %Y-%m-%d %H:%M:%S
[mypy]
python_version = 3.9
warn_return_any = True
warn_unused_configs = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
warn_no_return = True
warn_unreachable = True
strict_equality = True
[testenv:docs]
basepython = python3.11
deps =
-e .[docs]
sphinx
sphinx-rtd-theme
sphinx-autodoc-typehints
commands =
sphinx-build -b html docs/source docs/build/html
[testenv:clean]
basepython = python3.11
commands =
python -c "import shutil; shutil.rmtree('build', ignore_errors=True)"
python -c "import shutil; shutil.rmtree('dist', ignore_errors=True)"
python -c "import shutil; shutil.rmtree('*.egg-info', ignore_errors=True)"
python -c "import shutil; shutil.rmtree('.pytest_cache', ignore_errors=True)"
python -c "import shutil; shutil.rmtree('htmlcov', ignore_errors=True)"
python -c "import os; os.remove('.coverage') if os.path.exists('.coverage') else None"
python -c "import os; os.remove('coverage.xml') if os.path.exists('coverage.xml') else None"
[testenv:build]
basepython = python3.11
deps =
build
twine
commands =
python -m build
twine check dist/*
[testenv:release]
basepython = python3.11
deps =
twine
commands =
twine upload dist/*