-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtox.ini
More file actions
181 lines (153 loc) Β· 4.55 KB
/
Copy pathtox.ini
File metadata and controls
181 lines (153 loc) Β· 4.55 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
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
# To use a PEP 517 build-backend you are required to configure tox to use an isolated_build:
# https://tox.readthedocs.io/en/latest/example/package.html
isolated_build = True
# These environments are run in order if you just use `tox`:
envlist =
# always keep coverage-clean first
coverage-clean
# code formatters
format
# format-docs
# Code quality assessment
pyroma
lint
lint-markdown
mypy
# Documentation quality assurance
docs-lint
docstr-coverage
docs-test
# the actual tests
py
doctests
# always keep coverage-report last
coverage-report
[testenv]
description = Run unit and integration tests.
skip_install = true
allowlist_externals =
uv
uvx
commands =
uvx --from rust-just just test
[testenv:coverage-clean]
description = Remove testing coverage artifacts.
commands =
uvx --from rust-just just coverage-clean
[testenv:coverage-report]
commands =
uvx --from rust-just just coverage-report
[testenv:doctests]
description = Test that documentation examples run properly.
commands =
uvx --from rust-just just doctests
[testenv:treon]
description = Test that notebooks can be run to completion
commands =
uvx --from rust-just just treon
[testenv:format]
description = Format the code.
commands =
uvx --from rust-just just format
[testenv:format-docs]
description = Run documentation linters.
commands =
uvx --from rust-just just format-docs
[testenv:format-markdown]
description = Run markdown formatter.
commands =
uvx --from rust-just just format-markdown
[testenv:lint]
description = Check code quality using ruff and other tools.
commands =
uvx --from rust-just just lint
[testenv:lint-markdown]
description = Check markdown is properly formatted.
commands =
uvx --from rust-just just lint-markdown
[testenv:lint-justfile]
description = Check justfile is properly formatted.
commands =
uvx --from rust-just just lint-justfile
[testenv:pyroma]
description = Check the metadata health of the project
commands =
uvx --from rust-just just pyroma
[testenv:mypy]
description = Run the mypy tool to check static typing on the project.
commands =
uvx --from rust-just just mypy
[testenv:docs-lint]
description = Run the doc8 tool to check the style of the RST files in the project docs.
commands =
uvx --from rust-just just docs-lint
[testenv:docstr-coverage]
description = Run the docstr-coverage tool to check documentation coverage.
commands =
uvx --from rust-just just docstr-coverage
[testenv:docs]
description = Build the documentation locally, allowing warnings.
commands =
uvx --from rust-just just docs
[testenv:docs-test]
description = Test building the documentation in an isolated environment. Warnings are considered as errors via -W.
commands =
uvx --from rust-just just docs-test
####################
# Deployment tools #
####################
[testenv:bumpversion]
description = Bump the version number
commands =
uvx --from rust-just just bumpversion {posargs}
[testenv:bumpversion-release]
description = Remove the -dev tag from the version
commands =
uvx --from rust-just just bumpversion-release
[testenv:build]
commands =
uvx --from rust-just just build
[testenv:release]
description = Release the code to PyPI so users can pip install it, using credentials from keyring
commands =
uvx --from rust-just just release
[testenv:release-via-env]
description = Release the code to PyPI so users can pip install it, using credentials from the environment.
commands =
uvx --from rust-just just release-via-env
passenv =
UV_PUBLISH_USERNAME
UV_PUBLISH_PASSWORD
[testenv:finish]
description =
Run a workflow that removes -dev from the version, creates a tagged release on GitHub,
creates a release on PyPI, and bumps the version again.
passenv =
HOME
allowlist_externals =
uv
uvx
git
commands =
uvx --from rust-just just finish
[testenv:testrelease]
description = Release the code to the test PyPI site
commands =
uvx --from rust-just just test-release
[testenv:testfinish]
description =
Run a workflow that removes -dev from the version, creates a tagged release on GitHub,
creates a release on Test PyPI, and bumps the version again.
passenv =
HOME
commands =
uvx --from rust-just just test-finish
allowlist_externals =
uv
uvx
git