-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
151 lines (122 loc) · 2.69 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# ******************************************************************************
#
# sigcalc, significant figures calculations
#
# Copyright 2023-2024 Jeremy A Gray <gray@flyquackswim.com>.
#
# All rights reserved.
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# ******************************************************************************
[tox]
envlist =
clean-coverage
py{310,311,312}
lint
report
isolated_build = True
skip_missing_interpreters = True
requires =
pip>=20.0
[testenv]
description = Test supported environments.
deps =
hypothesis
mpmath
pytest
commands =
pytest --doctest-modules --doctest-glob='*.rst' -vvvv
[testenv:py312]
description = Generate test coverage data.
deps =
hypothesis
mpmath
pytest
pytest-cov
commands =
pytest --doctest-modules --doctest-glob='*.rst' -vvvv --cov sigcalc --cov-report term --cov-report html
[testenv:build]
description = Build packages.
deps =
build
skip_install = true
commands =
python3 -m build
[testenv:build-docs]
description = Generate documentation with sphinx.
deps =
Sphinx>=7
commands =
sphinx-build -M clean docs docs/_build/html
sphinx-build -b html -nW --keep-going -d docs/_build/.doctrees docs docs/_build/html
sphinx-build -b html -nW --keep-going -d docs/_build/.doctrees docs docs/_build/html
[testenv:clean-coverage]
description = Erase previous test coverage data.
deps =
coverage[TOML]
skip_install = true
commands =
coverage erase
[testenv:lint]
description = Run all linting checks.
skip_install = True
deps =
flake8
flake8-docstrings
black
isort
commands =
black --check --diff sigcalc
flake8 sigcalc
isort --check --df sigcalc
[testenv:lint-black]
description = Format python code with black.
skip_install = True
deps =
black
commands =
black --check --diff sigcalc
[testenv:lint-fix]
description = Fix all automatically fixable linting issues.
skip_install = True
deps =
black
isort
commands =
black sigcalc
isort sigcalc
[testenv:lint-flake8]
description = Run flake8 checks.
skip_install = True
deps =
flake8
flake8-docstrings
commands =
flake8 sigcalc
[testenv:lint-isort]
description = Format module imports.
skip_install = True
deps =
isort
commands =
isort --check --df sigcalc
[testenv:report]
description = Generate current test coverage report.
deps = coverage[TOML]
skip_install = true
commands =
coverage report
coverage html
[testenv:upload]
description = Upload packages to PyPI.
deps = twine
skip_install = true
commands =
python3 -m twine upload --verbose dist/*
[testenv:upload-test]
description = Test upload of packages to PyPI.
deps = twine
skip_install = true
commands =
python3 -m twine upload --verbose --repository testpypi dist/*