-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
220 lines (191 loc) · 5.67 KB
/
pyproject.toml
File metadata and controls
220 lines (191 loc) · 5.67 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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
[project]
name = "python-env-bootstrap"
version = "1.4.0"
requires-python = ">=3.11"
description = "Zero-dependency script for robustly bootstrapping a Python developer environment."
authors = [
{name = "Jerilyn Franz", email = "opensource@snowhare.com"}
]
maintainers = [
{name = "Jerilyn Franz", email = "opensource@snowhare.com"}
]
readme = "README.rst"
keywords = ["bootstrap", "developer", "environment", "setup", "python", "development"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development",
"Topic :: Utilities"
]
dependencies = [
"tox>=4.22.0",
"tox-uv>=1.13.1"
]
[project.urls]
Homepage = "https://github.com/JerilynFranz/python-env-bootstrap"
Documentation = "https://python-env-bootstrap.readthedocs.io/en/latest/"
Repository = "https://github.com/JerilynFranz/python-env-bootstrap.git"
Issues = "https://github.com/JerilynFranz/python-env-bootstrap/issues"
Changelog = "https://github.com/JerilynFranz/python-env-bootstrap/blob/main/CHANGELOG.rst"
[dependency-groups]
# Dependencies for running the test suite
test = [
"pytest>=7.4.1,<9.0.0",
"pytest-cov>=4.2.1",
"coverage>=6.10.6",
]
# Dependencies for linting and code style
lint = [
"ruff>=0.14.11",
"mypy>=1.13.1",
]
# Dependencies for building documentation
docs = [
"furo>=2025.09.25",
"sphinx>=8.2.3,<9.0.0",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.6.1",
]
# A group for all other development tools
tools = [
"hatch>=1.13",
"hatchling>=1.27",
"mercurial>=6.1",
"pydeps>=1.23.2",
"testplan>=22.8.0",
"tox>=4.22.0",
"tox-uv>=1.13.1",
"uv>=0.9.18",
]
[tool.tox]
requires = ["tox>=4.22"]
env_list = [
# "py31{0-4},py38,py39",
"lint38",
"lint310",
]
install_command = ["uv", "pip", "install", "{opts}", "{packages}"]
# labels table for grouping environments
[tool.tox.labels]
test = ["py310", "py311", "py312", "py313", "py314", "doctest", "lint"]
# --- Base Test Environment for automation from env_list -
[tool.tox.env_run_base]
description = "Run test under {base_python}"
allowlist_externals = ["pytest", "flake8", "pylint", "mypy"]
dependency_groups = ["test", "lint", "tools"]
extras = ["all"]
commands = [["pytest", "{posargs:tests/}"]]
# --- Concrete Test Environments ---
# environments table
[tool.tox.env]
# tox devenv -e dev
[tool.tox.env.dev]
description = "Development environment with all tools"
package = "editable"
dependency_groups = ["test", "tools", "lint"]
base = ["testenv"]
base_python = ["python3.10", "python3.11", "python3.12", "python3.13", "python3.14"]
allowlist_externals = ["pytest", "mypy", "flake8", "pylint"]
commands = []
[tool.tox.env.lint38]
description = "Run linters for Python 3.8"
package = "skip"
base_python = ["python3.8"]
dependency_groups = ["lint"]
commands = [
["ruff", "check", "scripts/bootstrap-38.py"],
["mypy", "scripts/bootstrap-38.py"]
]
[tool.tox.env.lint310]
description = "Run linters for Python 3.10"
package = "skip"
base_python = ["python3.10"]
dependency_groups = ["lint"]
commands = [
["ruff", "check", "scripts/bootstrap-310.py"],
["mypy", "scripts/bootstrap-310.py"]
]
[tool.tox.env.docs]
# This environment is self-contained and does NOT inherit from basetest.
description = "Build the documentation"
base_python = ["python3.12"]
dependency_groups = ["docs", "test"]
extras = ["all"]
allowlist_externals = ["sphinx-build"]
commands = [["sphinx-build", "-b", "html", "docs_source/", "documentation/"]]
[tool.ruff]
# Assume Python 3.9+ syntax.
target-version = "py39"
# Exclude a variety of commonly ignored directories.
exclude = [
"venv",
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".venv-tools",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
]
# Same as Black.
line-length = 120
indent-width = 4
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["A", "E", "F", "W", "B", "ANN"]
ignore = ["ANN401"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "single"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = true
# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"