-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
43 lines (38 loc) · 1.53 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
[tox]
envlist = py{38,39,310,311}-full
isolated_build = true
[testenv]
deps = -r requirements/test.txt
commands =
full: python -m pytest --backend-tests --sftp-tests
!full: python -m pytest
[testenv:pydantic1]
envlist = py{311}-full
deps = -r requirements-pydantic1/test.txt
commands =
full: python -m pytest --backend-tests --sftp-tests
!full: python -m pytest
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
basepython = python3.11
deps = -r requirements/docs.txt
allowlist_externals = find
commands = python -m sphinx -v -b html -d {toxworkdir}/docs_doctrees docs html
python -m sphinx -v -b doctest -d {toxworkdir}/docs_doctrees docs html
python -m sphinx -v -b linkcheck -d {toxworkdir}/docs_doctrees docs html
find html -type f -name "*.ipynb" -not -path "html/_sources/*" -delete
[testenv:static]
description = Code formatting and static analysis
skip_install = true
deps = -r requirements/static.txt
allowlist_externals = sh
# The first run of pre-commit may reformat files. If this happens, it returns 1 but this
# should not fail the job. So just run again if it fails. A second failure means that
# either the different formatters can't agree on a format or that static analysis failed.
commands = sh -c 'pre-commit run -a || (echo "" && pre-commit run -a)'
[testenv:deps]
description = Update dependencies by running pip-compile-multi
deps = pip-compile-multi
skip_install = true
commands = pip-compile-multi -d requirements
pip-compile-multi -d requirements-pydantic1