@@ -19,9 +19,12 @@ dev = [
1919 " sphinx-copybutton" ,
2020 " sphinx-design" ,
2121 " tox" ,
22- " tox-direct" ,
2322]
2423
24+ # # Without this, setuptools apparently try to scan the whole image's filesystem while working in /
25+ # [tool.setuptools.packages.find]
26+ # where = []
27+
2528[tool .setuptools_scm ]
2629
2730[tool .pytest .ini_options ]
@@ -32,27 +35,54 @@ addopts = """
3235# Doctest python code in docs, python code in src docstrings, test functions in tests
3336testpaths = " tests"
3437
35- # tox must currently be configured via an embedded ini string
36- # See: https://github.com/tox-dev/tox/issues/999
38+
3739[tool .tox ]
38- legacy_tox_ini = """
39- [tox]
40- skipsdist=True
40+ skipsdist = true
41+
42+ [tool .tox .env .pre-commit ]
43+ description = " Run pre-commit"
44+ direct = true
45+ allowlist_externals = [" pre-commit" ]
46+ commands = [
47+ [
48+ " pre-commit" ,
49+ " run" ,
50+ # "--all-files",
51+ " --show-diff-on-failure" ,
52+ " {posargs}" ,
53+ ],
54+ ]
4155
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- """
56+ [tool .tox .env .tests ]
57+ description = " Run tests"
58+ direct = true
59+ allowlist_externals = [" pytest" ]
60+ commands = [
61+ [
62+ " pytest" ,
63+ " --cov=phoebus_guibuilder" ,
64+ " --cov-report" ,
65+ " term" ,
66+ " --cov-report" ,
67+ " xml:cov.xml" ,
68+ " {posargs}" ,
69+ ],
70+ ]
71+
72+ [tool .tox .env .docs ]
73+ description = " Run docs"
74+ direct = true
75+ allowlist_externals = [" sphinx-build" , " sphinx-autobuild" ]
76+ commands = [
77+ [
78+ " sphinx-{posargs:build}" ,
79+ " -EW" ,
80+ " --keep-going" ,
81+ " -T" ,
82+ " docs" ,
83+ " build/html" ,
84+ ],
85+ ]
5686
5787[tool .ruff ]
5888src = [" src" , " tests" ]
0 commit comments