This repository was archived by the owner on Feb 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
112 lines (101 loc) · 2.23 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[base]
name = archngv
files = {[base]name} tests doc/source/conf.py
testdeps =
pytest
jsondiff
[tox]
envlist =
check-version
lint
py{38,39,310,311,312}
functional
[testenv]
extras = all
setenv =
SALLOC_ACCOUNT = {env:SALLOC_ACCOUNT:proj66}
deps = {[base]testdeps}
commands = pytest tests/unit
[testenv:check-packaging]
skip_install = true
deps =
build
twine
commands =
python -m build -o {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[testenv:lint]
deps =
isort
black==23.12.1
snakefmt>=0.4.2
codespell
pycodestyle
pylint
mypy
types-PyYAML
types-pkg-resources
commands =
isort --check-only --diff {[base]files}
codespell --skip="*.xml" {[base]files} README.md CHANGELOG.rst
black --check .
pycodestyle {[base]files}
pylint {[base]name}
snakefmt --check .
mypy --ignore-missing {[base]name}
[testenv:functional]
deps =
{[base]testdeps}
pulp==2.3.0
extras = all
changedir = tests/functional
commands =./run.sh
passenv =
# pass the module variables to make "module purge" work as expected
MODULESHOME
MODULEPATH
LOADEDMODULES
_LMFILES_
[testenv:coverage]
deps =
{[base]testdeps}
coverage
commands =
coverage run --source={[base]name} -m pytest tests/unit/
coverage report --show-missing
coverage xml
[testenv:docs]
changedir = doc
extras = docs
commands =
sphinx-build -b html \
{toxinidir}/doc/source \
{toxinidir}/doc/build/html \
-d {toxinidir}/doc/build/doctrees \
-W -T
allowlist_externals =
/bin/mkdir
[testenv:format]
deps =
black==23.12.1
isort
commands =
isort {[base]files}
black .
# E126 continuation line over-indented for hanging indent
# E127: continuation line over-indented for visual indent
# E128: continuation line under-indented for visual indent
# E203: whitespace before ':'
# E731: do not assign a lambda expression, use a def
# W503: Line break before binary operator
# W504: line break after binary operator
[pycodestyle]
exclude = extras,workflow,tests
ignore = E126, E127, E128, E203, E731, W503, W504
max-line-length = 100
[gh-actions]
python =
3.9: py39, lint
3.10: py310, coverage
3.11: py311, check-packaging
3.12: py312, docs