-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
57 lines (50 loc) · 1.92 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
[tox]
envlist = py{310,311,312}-full
isolated_build = true
[testenv]
deps = -r requirements/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:mypy]
description = Type checking (mypy)
deps = -r requirements/mypy.txt
commands = python -m mypy .
[testenv:deps]
description = Update dependencies by running pip-compile-multi
deps = pip-compile-multi
skip_install = true
changedir = requirements
commands = pip-compile-multi -d . --backtracking
[testenv:prepare-release]
description = Run before a release. Pass the release version as a positional argument.
skip_install = true
deps =
allowlist_externals = sh
commands =
sh -c 'git grep -rl RELEASE_PLACEHOLDER docs/ src/scitacean | xargs sed -i "s/RELEASE_PLACEHOLDER/{posargs}/g"'
[testenv:check-release]
description = Check if a release can be made.
skip_install = true
deps =
allowlist_externals = sh
commands =
sh -c '! git grep -rl RELEASE_PLACEHOLDER docs/ src/scitacean'