-
Notifications
You must be signed in to change notification settings - Fork 42
/
tox.ini
96 lines (88 loc) · 2.61 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[tox]
min_version = 4.9
env_list = {fulltest,coretest,lint,mypy,audit}-py{310,311,312}
isolated_build = True
[testenv:fulltest,fulltest-py{310,311,312}]
description = Run PyTest with all extra functionality
extras = chem,examples,lint,onnx,polars,simulation,test
passenv =
CI
BAYBE_NUMPY_USE_SINGLE_PRECISION
BAYBE_TORCH_USE_SINGLE_PRECISION
setenv =
SMOKE_TEST = true
BAYBE_TEST_ENV = FULLTEST
commands =
python --version
pytest -p no:warnings --cov=baybe --durations=5 {posargs}
[testenv:coretest,coretest-py{310,311,312}]
description = Run PyTest with core functionality
extras = test
passenv =
CI
BAYBE_NUMPY_USE_SINGLE_PRECISION
BAYBE_TORCH_USE_SINGLE_PRECISION
setenv =
SMOKE_TEST = true
BAYBE_TEST_ENV = CORETEST
commands =
python --version
pytest -p no:warnings --cov=baybe --durations=5 {posargs}
[testenv:lint,lint-py{310,311,312}]
description = Run linters and format checkers
extras = lint,examples
skip_install = True
deps = pre-commit
commands =
python --version
pre-commit run --all-files {posargs:--show-diff-on-failure}
[testenv:mypy,mypy-py{310,311,312}]
description = Run mypy
extras = mypy
setenv =
PYTHONPATH = {toxinidir}
commands =
python --version
mypy
[testenv:audit,audit-py{310,311,312}]
description = Run pip-audit
extras = dev # audit entire environment
setenv =
# Add pip-audit exceptions here, like:
# EXCLUDES=--ignore-vuln EXCEPTION_ID1 --ignore-vuln EXCEPTION_ID2 ...
commands =
python --version
pip-audit {env:EXCLUDES:}
[testenv:docs-py310]
description = Build documentation, passing posargs to control what should be built
skip_install = True
setenv =
SMOKE_TEST = true
DOCS_LOCKFILE_PATH = .lockfiles/py310-dev.lock
commands =
python --version
uv pip sync {env:DOCS_LOCKFILE_PATH}
uv pip install --no-cache .
python docs/scripts/build_documentation.py {posargs}
[testenv:docs-quickbuild]
description = Force-build documentation, ignoring links and examples
skip_install = True
setenv =
SMOKE_TEST = true
DOCS_LOCKFILE_PATH = .lockfiles/py310-dev.lock
commands =
python --version
uv pip sync {env:DOCS_LOCKFILE_PATH}
uv pip install --no-cache .
python docs/scripts/build_documentation.py -f -l
[testenv:docs-lockfile]
description = Create uv lockfile for docs generation
basepython = py310
skip_install = True
passenv =
DOCS_LOCKFILE_PATH
setenv =
DEFAULT_DOCS_LOCKFILE_PATH = .lockfiles/py310-dev.lock
commands =
python --version
uv pip compile --universal --python 310 pyproject.toml --extra dev -o {env:DOCS_LOCKFILE_PATH:{env:DEFAULT_DOCS_LOCKFILE_PATH}} {posargs}