@@ -9,19 +9,22 @@ requires-python = ">=3.10"
9
9
10
10
[project .optional-dependencies ]
11
11
dev = [
12
+ " basedpyright>=1.27.1" ,
12
13
" copier" ,
14
+ " hatch>=1.14.0" ,
13
15
" myst-parser" ,
14
16
" pre-commit" ,
15
17
" pydata-sphinx-theme>=0.12" ,
16
- " pytest" ,
18
+ " pytest>=8.3.4 " ,
17
19
" ruff" ,
18
20
" sphinx-autobuild" ,
19
21
" sphinx-copybutton" ,
20
22
" sphinx-design" ,
21
- " tox" ,
22
- " tox-direct" ,
23
23
]
24
24
25
+ [tool .uv ]
26
+ default-groups = []
27
+
25
28
[tool .setuptools_scm ]
26
29
27
30
[tool .pytest .ini_options ]
@@ -32,27 +35,33 @@ addopts = """
32
35
# Doctest python code in docs, python code in src docstrings, test functions in tests
33
36
testpaths = " tests"
34
37
35
- # tox must currently be configured via an embedded ini string
36
- # See: https://github.com/tox-dev/tox/issues/999
37
- [tool .tox ]
38
- legacy_tox_ini = """
39
- [tox]
40
- skipsdist=True
38
+ [tool .hatch .envs .default .scripts ]
39
+ all = [
40
+ " hatch run precommit:precommit" ,
41
+ " hatch run type-check:type-check" ,
42
+ " hatch run tests:tests" ,
43
+ " hatch run docs:docs"
44
+ ]
45
+ precommit = [" hatch run precommit:precommit" ]
46
+ type-check = [" hatch run type-check:type-check" ]
47
+ tests = [" hatch run tests:tests" ]
48
+ docs = [" hatch run docs:docs" ]
49
+
50
+ [tool .hatch .envs .precommit ]
51
+ description = " Run pre-commit"
52
+ scripts = { precommit = [" pre-commit run --show-diff-on-failure {args}" ] }
53
+
54
+ [tool .hatch .envs .type-check ]
55
+ description = " Run type-checking"
56
+ scripts = { type-check = [" basedpyright --stats src {args}" ] }
57
+
58
+ [tool .hatch .envs .tests ]
59
+ description = " Run tests"
60
+ scripts = { tests = [" pytest {args}" ] }
41
61
42
- [testenv:{pre-commit,tests,docs}]
43
- # Don't create a virtualenv for the command, requires tox-direct plugin
44
- direct = True
45
- passenv = *
46
- allowlist_externals =
47
- pre-commit
48
- pytest
49
- sphinx-build
50
- sphinx-autobuild
51
- commands =
52
- pre-commit: pre-commit run --all-files --show-diff-on-failure {posargs}
53
- tests: pytest {posargs}
54
- docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
55
- """
62
+ [tool .hatch .envs .docs ]
63
+ description = " Run docs"
64
+ scripts = { docs = [" sphinx-{args:build} -EW --keep-going -T docs build/html" ] }
56
65
57
66
[tool .ruff ]
58
67
src = [" src" , " tests" ]
0 commit comments