-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathtox.ini
More file actions
73 lines (61 loc) · 1.59 KB
/
Copy pathtox.ini
File metadata and controls
73 lines (61 loc) · 1.59 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
[tox]
envlist =
py310,
py311,
py312,
py313,
lint,
mypy,
coverage,
docs,
[testenv]
description = run the tests with pytest
extras = test
deps = pdbpp
commands = pytest {posargs}
[testenv:coverage]
description = generate coverage report
commands =
pytest --cov tests --cov flask_uploads --cov-report term-missing --cov-report html --cov-context=test --cov-fail-under=100 {posargs}
[testenv:lint]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:mypy]
description = run type checker on code base
deps =
mypy
commands =
mypy --strict src tests {posargs}
[isort]
known_third_party = flask,flask_uploads,pytest,setuptools,sphinx_rtd_theme,werkzeug
force_single_line = True
[flake8]
ignore =
# line break after binary operator
W504,
[coverage:paths]
source =
src/
.tox/*/lib/python*/site-packages/
[coverage:html]
show_contexts = true
[pytest]
# only collect intended test classes, e.g. TestSaving
# do not collect e.g. TestingFileStorage
python_classes = Test[A-Z]*
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312, mypy, coverage, pre-commit
3.13: py313
[testenv:docs]
description = generate docs in HTML format
# specifying the exact python version as in .readthedocs.yaml for compatibility
basepython = python3.12
deps = -r docs/requirements.txt
commands = sphinx-build -b html docs _build/html
[testenv:upgradedocs]
description = upgrade dependencies to build docs
deps = pip-tools
commands = pip-compile --upgrade {toxinidir}/docs/requirements.in --output-file {toxinidir}/docs/requirements.txt