-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
82 lines (73 loc) · 2.38 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
[tox]
; default testenv(s) to run on raw `tox` calls.
envlist = py312-test
[testenv]
# Run test suite ==============================================================
[testenv:py{310,311,312}-test]
description =
Run pyxu_finufft test suite.
usedevelop = true
commands =
python3 -m pytest \
--verbosity=1 \
-r a \
{toxinidir}/src/pyxu_finufft_tests/
# Pre-commit hooks ============================================================
[testenv:pre-commit]
description =
Run all pre-commit hooks.
This is a helper function to ease friction during git commits.
skip_install = true
allowlist_externals =
pre-commit
commands =
pre-commit run --all-files
# Generate documentation ======================================================
[testenv:doc]
description =
Build pyxu_finufft HTML documentation.
skip_install = true
allowlist_externals =
rm
sphinx-build
commands =
rm -rf {toxinidir}/build/html/
sphinx-build -b html \
-a \
-E \
-j auto \
-w {toxinidir}/build/html/WARNINGS.log \
{toxinidir}/doc/ \
{toxinidir}/build/html/
# Build PyPI wheels ===========================================================
[testenv:dist]
description =
Build universal wheels for PyPI.
Packages are placed under ./dist/.
skip_install = true
allowlist_externals =
hatch
commands =
hatch build -t wheel
# Flake8 Configuration ========================================================
[flake8]
max-complexity = 10
exclude =
# __init__.py often contain weird code to import top-level items.
__init__.py
extend-ignore =
# We follow Black's guidelines here.
# E501: line too long
# E203: whitespace before ':'
# E302: expected 2 blank lines, found 1
E501
E203
E302
# Do not use lambda expressions. (OK when used sparringly.)
E731
# Too many leading '#' for block comment.
# We use more '#' terms at times to improve visual delimiters of long block comments.
E266
# Implementation is too complex.
# (Sometimes necessary in scientific code.)
C901