This repository was archived by the owner on Sep 22, 2026. It is now read-only.
Modernize packaging + CI: setup.cfg -> pyproject.toml, legacy workflow -> uv-CI stub (and fix the red CI) - #2
Merged
Conversation
Carries every field of the old setup.cfg across:
name, version (0.0.2 — matches the released PyPI version so CI's
automatic bump lands on 0.0.3), description, long_description
(README.md, text/markdown -> readme), url -> [project.urls].Homepage,
license apache-2.0 -> SPDX `license = "Apache-2.0"` (LICENSE kept),
packages = find: -> [tool.hatch.build.targets.wheel].packages,
install_requires (empty) -> dependencies = [].
Deliberately dropped, with reasons:
platforms / zip_safe setuptools-only, no effect on wheels
include_package_data hatchling ships package files by default
root_url read only by `populate` at creation time;
the derived project URL is now explicit
display_name = udos identical to the project name, which is
epythet's default, so nothing is lost
Added while here: authors, keywords, classifiers, requires-python and
Repository/Documentation urls, so the PyPI page is no longer bare.
`wads-deps` reports no runtime imports (the package is a single
docstring-only module); the two "missing" packages it flags are
setuptools (setup.py, now deleted) and epythet (docsrc/conf.py, a docs
tool), so `dependencies` stays empty.
docsrc/conf.py still passes `setup.cfg` to epythet's parse_config, which
falls back to pyproject.toml when that file is absent — verified locally:
it now resolves ('udos', '', 'Thor Whalen', '0.0.2', 'udos').
Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
`wads-migrate ci-to-uv` then `ci-to-stub`: ci.yml is now a stub calling i2mint/wads/.github/workflows/uv-ci.yml@master, with all configuration read from [tool.wads.ci.*] in pyproject.toml. The old workflow's only secret references were PYPI_USERNAME/PYPI_PASSWORD inside a `twine upload` run step. The reusable workflow publishes with token-only auth, so PYPI_PASSWORD is passed through in the stub's secrets: block and PYPI_USERNAME is no longer needed. No other secret was referenced, so nothing was carried into [tool.wads.ci.env]. This workflow was the last thing that used setup.cfg/setup.py (`python setup.py sdist`, `isee update-setup-cfg`), which the previous commit removed. MANIFEST.in and requirements.txt do not exist here. Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
wads CI runs `pytest --doctest-modules` with no path argument, so
collection is driven entirely by `testpaths`. udos is a placeholder
package — one module holding nothing but a docstring — so collection was
empty and pytest exited 5 ("no tests collected"), which is a non-zero
exit and therefore a red build. That is the root cause of the failing
run at actions/runs/17236567336, and it would have survived the
migration untouched.
Two ways to fix it:
(a) set [tool.wads.ci.testing].enabled = false — the sanctioned wads
knob for repos with no suite;
(b) give the repo one real, minimal test.
(b) is chosen. (a) would leave the test step switched off permanently:
the day udos grows actual modules, their doctests would silently not
run, which is exactly the fleet-wide failure mode `testpaths` hygiene
exists to prevent. No repo in the ecosystem currently disables testing,
and this placeholder is a poor place to set that precedent.
testpaths is set to ["udos", "tests"] rather than the migration tool's
default ["tests"], so package doctests are collected as soon as there
are any.
Also adds the .editorconfig the wads templates ship and this repo was
missing. No package behaviour is changed.
Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
The uv CI runs `uvx ruff format .` on every job. Running it here keeps the tree format-clean so the publish job's format-and-push-back step is a no-op instead of generating a drive-by commit on the default branch. Only quote normalisation in docsrc/conf.py and a trailing blank line in udos/__init__.py. No behaviour change. Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernizes
udosfrom legacy packaging (setup.cfg+setup.py+ the 2022-erainline CI workflow) to the current ecosystem standard:
pyproject.tomlwithHatchling, plus the 5-line wads uv-CI stub that reads everything from
[tool.wads.ci.*].It also fixes the long-standing red CI on
master— the cause turned out to be areal one, not an artifact of the old workflow. Details below.
[tool.wads.ci.publish]isenabled (fleet default), and this package is already on PyPI at
0.0.2.[project].versionis deliberately set to0.0.2so CI's automatic bump landson
0.0.3rather than re-publishing behind the released version. See"Decision for the maintainer" at the bottom before merging.
What changed
packaging:setup.cfg/setup.py→pyproject.toml(Hatchling); legacy files deletedci:uv-ci.yml@masterstubtests:.editorconfigstyle:ruff format .(the formatter the new CI runs)Inventory carried across from setup.cfg
Everything in the old
[metadata]/[options]was accounted for:name = udos[project].nameversion = 0.0.2[project].version(kept at the released version — see above)description[project].descriptionlong_description = file:README.md,long_description_content_type = text/markdown[project].readme = "README.md"url[project.urls].Homepagelicense = apache-2.0[project].license = "Apache-2.0"(SPDX string, not the deprecated[project.license]table);LICENSEkept and now shipped in the wheel'sdist-info/licenses/packages = find:[tool.hatch.build.targets.wheel].packages = ["udos"]install_requires(empty)dependencies = []keywords(empty)Deliberately dropped, each with a reason:
platforms = any,zip_safe = False— setuptools-only knobs with no effect onwheel builds.
include_package_data = True— Hatchling ships everything under the packagedirectory by default;
udos/has no data files anyway.root_url— read only bypopulateat project-creation time to derive theproject URL, which is now written out explicitly.
display_name = udos— identical to the project name, which is epythet'sdefault when
[tool.epythet].display_nameis absent, so nothing is lost.There were no
entry_points/ console scripts, nopackage_data, no extrasand no
python_requiresin the old config, so nothing of that kind could bedropped.
MANIFEST.inandrequirements.txtdo not exist in this repo.Added while here (the
[project]block was otherwise bare on PyPI):authors,keywords,classifiers,requires-python = ">=3.10", andRepository/DocumentationURLs. Also the standard[tool.ruff]block, withoutwhich the repo would drift onto ruff's moving defaults and go red on unrelated
style changes.
Latent bug this surfaced: the red CI was real
The last run on
master(actions/runs/17236567336) failed onValidation (3.10), and it would have kept failing after the migration.udosis a placeholder package:udos/__init__.pycontains a module docstringand nothing else. Both the old workflow (
pytest --doctest-modules -v udos) andthe new one (
pytest --doctest-modules, collection driven entirely bytestpaths) therefore collect zero items, and pytest exits with code5("no tests collected").
run-tests-uvruns underset -e, so a non-zero exit isa red build.
Two ways to fix it:
[tool.wads.ci.testing].enabled = false— the sanctioned wads knob for reposwith no suite.
(2) is what this PR does, in
tests/test_smoke.py. Option (1) would switchthe test step off permanently, so the day
udosgrows actual modules theirdoctests would silently not run — exactly the failure mode that
testpathshygiene exists to prevent. No repo in the ecosystem currently disables testing,
and an empty placeholder is a poor place to set that precedent.
Relatedly,
testpathsis set to["udos", "tests"]rather than the migrationtool's unconditional
["tests"], so package doctests are collected the momentthere are any.
No package behaviour was changed to make CI pass.
Docs build still works after deleting setup.cfg
docsrc/conf.pypassessetup.cfgtoepythet.config_parser.parse_config.That function falls back to
pyproject.tomlwhen the file is missing, so thePages job is unaffected. Verified locally — it now resolves to
('udos', '', 'Thor Whalen', '0.0.2', 'udos'), i.e. the same project and displayname as before, plus an author it previously had no way to find.
Verification
priv test-dependents udos, mirrors CI):baseline
no-tests(0 pass / 0 fail) → finalpass(1 pass / 0 fail).udoshas no local dependents.uv buildsucceeds; metadata inspected — SPDXLicense-Expression: Apache-2.0,License-File: LICENSE, all classifiers,URLs and keywords present, README rendered as the long description.
wads-deps. It flags onlysetuptools(from
setup.py, now deleted) andepythet(fromdocsrc/conf.py, a docstool). Neither is a runtime import, so
dependenciesstays empty — correctfor a module that imports nothing.
success.
Read Configuration✓,Validation (3.10)✓,Validation (3.12)✓,Windows Tests✓;PublishandPublish GitHub Pagesskipped as expected on anon-default branch.
python -m wads.repo_audit): HIGH 2 / MEDIUM 3 / LOW 3 →HIGH 1 / MEDIUM 0 / LOW 3. Cleared: no-pyproject, legacy packaging files,
legacy CI generation, no test files, missing
.editorconfig. The remainingHIGH is the historical failed run on
master, which clears when this merges.Left undone on purpose
the audit wants
https://i2mint.github.io/udos/and the slugified keywords.These are repo settings, not files, so they cannot ship in a PR, and the
command was not run in this session. To align:
gh repo edit i2mint/udos --homepage "https://i2mint.github.io/udos/"plus--add-topicfordataset data standard search acquisition sharing.wads-skillify) — out of scope for a packaging pass, andpremature for a package with no API yet.
The smoke test exists solely so the CI test step stays enabled and meaningful.
Decision for the maintainer
udoshas been a docstring-only placeholder since 2022 and has one PyPI release(
0.0.2). Merging republishes it as0.0.3— an empty package. That is harmless(it holds the name), but if you would rather not spend a release on it, set
[tool.wads.ci.publish].enabled = falsebefore merging and flip it back when thepackage actually has content. Tracked in #1.