forked from emdgroup/baybe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
106 lines (97 loc) · 2.84 KB
/
tox.ini
File metadata and controls
106 lines (97 loc) · 2.84 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
[tox]
min_version = 4.9
env_list = {fulltest,gputest,coretest,lint,mypy,audit}-py{310,311,312,313,314}
isolated_build = True
[testenv:fulltest,fulltest-py{310,311,312,313,314}]
description = Run PyTest with all extra functionality
extras = extras,examples,lint,test
passenv =
CI
BAYBE_USE_SINGLE_PRECISION_NUMPY
BAYBE_USE_SINGLE_PRECISION_TORCH
BAYBE_PARALLELIZE_SIMULATION_RUNS
setenv =
SMOKE_TEST = true
BAYBE_TEST_ENV = FULLTEST
commands =
python --version
pytest -p no:warnings --cov=baybe --durations=5 {posargs}
[testenv:gputest,gputest-py{310,311,312,313,314}]
description = Runs GPU tests
extras = test
passenv =
CI
BAYBE_USE_SINGLE_PRECISION_NUMPY
BAYBE_USE_SINGLE_PRECISION_TORCH
BAYBE_PARALLELIZE_SIMULATION_RUNS
setenv =
BAYBE_TEST_ENV = GPUTEST
commands =
python --version
python -c "import torch; assert torch.cuda.is_available()"
[testenv:coretest,coretest-py{310,311,312,313,314}]
description = Run PyTest with core functionality
extras = test
passenv =
CI
BAYBE_USE_SINGLE_PRECISION_NUMPY
BAYBE_USE_SINGLE_PRECISION_TORCH
BAYBE_PARALLELIZE_SIMULATION_RUNS
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,313,314}]
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,313,314}]
description = Run mypy
extras = mypy
setenv =
PYTHONPATH = {toxinidir}
commands =
python --version
mypy
[testenv:audit,audit-py{310,311,312,313}]
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:}
# This is separated from the other audit block because in 3.14 only core deps are tested
[testenv:audit-py314]
description = Run pip-audit
deps = pip-audit
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
BAYBE_USE_POLARS_FOR_CONSTRAINTS = false
commands =
python --version
uv run --extra docs docs/scripts/build_documentation.py {posargs}
[testenv:docs-quickbuild]
description = Force-build documentation, ignoring links and examples
skip_install = True
setenv =
SMOKE_TEST = true
commands =
python --version
uv run --extra docs docs/scripts/build_documentation.py -f -l