forked from lab-cosmo/shiftml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
86 lines (73 loc) · 1.77 KB
/
tox.ini
File metadata and controls
86 lines (73 loc) · 1.77 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
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
75
76
77
78
79
80
81
82
83
84
85
86
[tox]
# list of env that will be executed when running `tox` without any argument
envlist =
lint
tests
build
[testenv:tests]
description = Run the tests of the Python package
deps =
ase
pytest
commands =
pytest {posargs}
[testenv:lint]
description =
lint the Python code with flake8 (code linter), black (code formatter), and
isort (sorting of imports)
package = skip
deps =
flake8==7.3.0
flake8-bugbear==24.12.12
black==25.1.0
blackdoc==0.4.2
isort
commands =
flake8 --extend-exclude "*/build/*" src tests
black --check --diff src tests
blackdoc --check --diff src tests
isort --check-only --diff --extend-skip-glob "*/build/*" src tests
[testenv:build]
description = builds the package and checks integrity
usedevelop = true
skip_install = true
deps =
build
check-manifest
twine
allowlist_externals = rm
commands_pre =
rm -f {toxinidir}/dist/*.whl
rm -f {toxinidir}/dist/*.tar.gz
commands =
python -m build
twine check dist/*.tar.gz dist/*.whl
check-manifest {toxinidir}
[testenv:pkg-smoke]
description = Install the built wheel (no deps) and sanity-check imports
deps =
pip
skip_install = true
commands =
python -m pip install --no-deps dist/*.whl
python -c "import shiftml, importlib.metadata as m; print('ok', m.version('shiftml'))"
[testenv:format]
description = Abuse tox to do actual formatting on all files.
package = skip
deps =
black==25.1.0
blackdoc==0.4.2
isort
commands =
black src tests
blackdoc src tests
isort src tests
[testenv:docs]
description = Invoke sphinx-build to build the HTML docs
deps =
sphinx
commands =
sphinx-build -d docs/build/doctrees -W -b html docs/src docs/build/html
[flake8]
max_line_length = 88
extend-ignore = E203