-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
62 lines (56 loc) · 1.17 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
[tox]
minversion = 4.6.0
env_list =
py{39,310,311,312}
coverage
type
lint
format
docs
[testenv]
description = run tests
package = wheel
wheel_build_env = .pkg
extras =
dev
commands =
pytest {posargs}
[testenv:coverage]
description = check test coverage
extras =
dev
commands =
coverage run --source ffsim -m pytest {posargs}
coverage report --fail-under=80
[testenv:type]
description = run type check
extras =
dev
commands =
mypy
[testenv:lint]
description = check for lint
extras =
dev
allowlist_externals = cargo
commands =
ruff check
cargo clippy --all -- -D warnings
[testenv:format]
description = check formatting
extras =
dev
allowlist_externals = cargo
commands =
ruff format --check
cargo fmt --all -- --check
[testenv:docs]
description = build docs
extras =
dev
setenv =
SPHINX_APIDOC_OPTIONS = members,show-inheritance
commands =
python -c 'import shutil, pathlib; shutil.rmtree(pathlib.Path("docs") / "stubs", ignore_errors=True)'
python -c 'import shutil, pathlib; shutil.rmtree(pathlib.Path("docs") / "_build" / "html" / ".doctrees", ignore_errors=True)'
sphinx-build -b html -W {posargs} docs/ docs/_build/html