-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
212 lines (191 loc) · 4.54 KB
/
Copy pathpyproject.toml
File metadata and controls
212 lines (191 loc) · 4.54 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
[build-system]
# >=1.27 for PEP 639 (`license` as an SPDX expression + `license-files`).
requires = [
"hatchling>=1.27",
]
build-backend = "hatchling.build"
[project]
name = "cw"
version = "0.1.6"
description = "Command line Wizard - turn your Python functions into a CLI"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
license-files = [
"LICENSE",
]
keywords = [
"argparse",
"argh",
"cli",
"command-line",
"console",
]
authors = [
{ name = "Thor Whalen" },
]
# Deliberately empty, and asserted by tests/test_import_is_cheap.py: `import cw` is
# stdlib-only. i2 is an optional extra used only by cw.resolution.resource_inputs.
dependencies = []
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
]
[project.urls]
Homepage = "https://github.com/i2mint/cw"
Issues = "https://github.com/i2mint/cw/issues"
[project.optional-dependencies]
resource = [
"i2",
]
completion = [
"argcomplete>=3",
]
# The extra CI installs -- and CI really does install it, because
# `[tool.wads.ci.install].extras` below says so. Without that section wads' reusable
# workflow runs a bare `uv pip install -e .` and three shipped `cw.resolution` tests fail
# on a missing i2.
#
# Deliberately NO argh: `python -m cw.testing parity` -- the definition of v1 -- runs
# against committed goldens and must prove it needs nothing but cw. The
# `tests/argh_parity` differential (and the two tests outside it that share its corpus)
# skip themselves when argh is absent.
#
# `cw[resource]` IS here, and that is not a contradiction: i2 is the house's own package,
# not the LGPL one cw exists to replace, and `cw.resolution.resource_inputs` is a shipped
# feature whose tests and doctests need it. Without this line CI silently skipped them.
test = [
"cw[resource]",
"pytest>=7.0",
"pytest-cov>=4.0",
]
# What a developer installs. argh is here and ONLY here: `tests/argh_parity` builds the
# same parser with argh and with cw and diffs them, and `misc/record_goldens.py` records
# the parity goldens. cw itself never imports argh (LGPL-3.0-or-later; cw is MIT), and
# `tests/test_import_is_cheap.py` enforces that.
dev = [
"cw[test]",
"ruff>=0.1.0",
"argh==0.31.3",
]
docs = [
"sphinx>=6.0",
"sphinx-rtd-theme>=1.0",
]
[tool.ruff]
line-length = 88
target-version = "py310"
exclude = [
"**/*.ipynb",
".git",
".venv",
"build",
"dist",
"tests",
"examples",
"scrap",
]
[tool.ruff.lint]
select = [
"D100",
]
ignore = [
"D203",
"E501",
"B905",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"**/tests/*" = [
"D",
]
"**/examples/*" = [
"D",
]
"**/scrap/*" = [
"D",
]
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
"tests",
"cw",
]
addopts = "--doctest-modules"
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"ELLIPSIS",
]
[tool.wads.ci]
project_name = ""
# What `uv pip install -e ".[...]"` gets in CI. wads' reusable workflow reads this key
# (`wads/ci_config.py:install_extras`); with no section it installs the package bare, and
# `cw[resource]`'s i2 is then missing for `cw.resolution`'s test and two doctests.
[tool.wads.ci.install]
extras = "test"
[tool.wads.ci.commands]
pre_test = []
test = []
post_test = []
lint = []
format = []
[tool.wads.ci.env]
required_envvars = []
test_envvars = []
extra_envvars = []
[tool.wads.ci.env.defaults]
[tool.wads.ci.quality.ruff]
enabled = true
[tool.wads.ci.quality.black]
enabled = false
[tool.wads.ci.quality.mypy]
enabled = false
[tool.wads.ci.testing]
python_versions = [
"3.10",
"3.12",
]
pytest_args = [
"-v",
"--tb=short",
]
coverage_enabled = true
coverage_threshold = 0
coverage_report_format = [
"term",
"xml",
]
exclude_paths = [
"examples",
"scrap",
]
test_on_windows = true
[tool.wads.ci.metrics]
enabled = true
config_path = ".github/umpyre-config.yml"
storage_branch = "code-metrics"
python_version = "3.10"
force_run = false
[tool.wads.ci.build]
sdist = true
wheel = true
[tool.wads.ci.publish]
enabled = true
[tool.wads.ci.docs]
enabled = true
builder = "epythet"
ignore_paths = [
"tests/",
"scrap/",
"examples/",
]