-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathtox.ini
74 lines (63 loc) · 2.21 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
[tox]
isolated_build = true
envlist = uv, format, lint, test, doc, build
uv_discovery = true
uv_seed = true
set_env =
PATH = {env:HOME}/.local/share/uv/python/cpython-3.12.5-linux-x86_64-gnu/bin:{env:HOME}/.local/share/uv/python/cpython-3.11.9-linux-x86_64-gnu/bin:{env:HOME}/.local/share/uv/python/cpython-3.10.14-linux-x86_64-gnu/bin:{env:HOME}/.local/share/uv/python/cpython-3.9.19-linux-x86_64-gnu/bin:{env:PATH}
[testenv:uv]
allowlist_externals = uv
commands =
uv run python --version
[testenv:test]
allowlist_externals = uv, cargo, rm, maturin, python, pytest
passenv = *
set_env =
LD_LIBRARY_PATH = {env:HOME}/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib:{env:HOME}/.local/share/uv/python/cpython-3.9.19-linux-x86_64-gnu/lib:$LD_LIBRARY_PATH
RUSTFLAGS = -L {env:HOME}/.local/share/uv/python/cpython-3.11.10-linux-x86_64-gnu/lib -L {env:HOME}.local/share/uv/python/cpython-3.9.19-linux-x86_64-gnu/lib
commands =
rm -rf .reports
python --version
maturin develop -r
cargo test
cargo llvm-cov
cargo llvm-cov report --html --output-dir .reports/rust
cargo bench
# - prefix to ignore errors
- pytest {tty:--color=yes} --benchmark-only --benchmark-autosave
pytest {tty:--color=yes}
[testenv:format]
allowlist_externals = uv, cargo
env_list = py10, py11, py12
commands =
cargo fmt
cargo clippy --fix --allow-dirty
uv sync
uv run ruff format py_src/fusion py_tests
uv run ruff check --fix py_src/fusion py_tests
[testenv:lint]
allowlist_externals = uv, cargo
set_env =
{tty:MYPY_FORCE_COLOR = 1}
commands =
cargo clippy
uv sync
uv run ruff check py_src/fusion py_tests
uv run mypy --disallow-untyped-defs py_src/fusion py_tests
uv run ruff check py_src/fusion py_tests --ignore-noqa --exit-zero
[testenv:doc]
allowlist_externals = uv
commands_pre = uv sync --all-extras
commands =
uv run mike deploy vtest -m "test doc build" --ignore
uv run mike delete vtest -m "remove doc build" --ignore
[testenv:build]
allowlist_externals = uv
commands =
uv sync
uv build
uv run twine check dist/*
[testenv:clean]
allowlist_externals = rm # for cleanup
commands =
rm -rf {toxinidir}/dist {toxinidir}/target {toxinidir}/downloads