-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathhatch.toml
More file actions
42 lines (38 loc) · 1.54 KB
/
Copy pathhatch.toml
File metadata and controls
42 lines (38 loc) · 1.54 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
[envs.default]
pre-install-commands = [
"pip install maturin setuptools_scm",
"python scripts/maturin_build.py develop --manifest-path rust-bindings/Cargo.toml",
"pip install -r requirements-testing.txt"
]
[envs.default.scripts]
sync = "pip install -r requirements-testing.txt"
# `test` runs the canonical full test suite with the 94% coverage gate
# enforced. CI invokes this. For ad-hoc subset runs during local
# development (e.g. `hatch run test-subset test/openjd/expr`), use
# `test-subset`, which collects coverage but does not enforce the gate
# (the gate only makes sense against a full-suite run that touches every
# coverable source tree).
test = "pytest test/ --cov-config pyproject.toml --cov-fail-under=94 --ignore=test/openjd/model_v0/benchmark --ignore=test/openjd/model_v1/benchmark {args}"
test-subset = "pytest --cov-config pyproject.toml --ignore=test/openjd/model_v0/benchmark --ignore=test/openjd/model_v1/benchmark {args}"
benchmark = "pytest test/openjd/model_v0/benchmark test/openjd/model_v1/benchmark --no-cov {args}"
typing = "mypy {args:src test}"
style = [
"ruff check {args:src test}",
"black --check --diff {args:src test}",
]
fmt = [
"black {args:src test}",
"style",
]
lint = [
"style",
"typing",
]
[[envs.all.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
[envs.release]
detached = true
[envs.release.scripts]
deps = "pip install -r requirements-release.txt"
bump = "semantic-release -v --strict version --no-push --no-commit --no-tag --skip-build {args}"
version = "semantic-release -v --strict version --print {args}"