Modernize packaging: setup.cfg to pyproject.toml + wads uv CI stub - #2
Merged
Conversation
Legacy setuptools packaging replaced by a Hatchling-backed pyproject.toml. Everything declared in setup.cfg is carried across: - name / version (0.1.5, matching the released PyPI version) / description - long_description -> readme = "README.md" (text/markdown) - license apache-2.0 -> SPDX string `license = "Apache-2.0"` (LICENSE kept) - url -> [project.urls] Homepage - keywords "REPL" (broadened with CLI/shell/subprocess/console) - console_scripts `replize = replize.replize:_replize_cli` -> [project.scripts] (verified present in the built wheel's entry_points.txt) - install_requires was empty -> dependencies = [] - packages = find: -> Hatchling auto-discovery of the `replize` package - include_package_data: the package ships no non-Python data, so nothing to carry (no MANIFEST.in, no requirements.txt in the repo) Added while here: requires-python, classifiers, author, and the ecosystem-standard [tool.ruff] block so the repo does not drift with ruff's moving defaults. wads CI config notes: - [tool.wads.ci].project_name set to "replize" (the migration tool leaves it empty, which would break the lint/coverage target) - testpaths set to ["replize"] rather than the tool's default ["tests"]: wads CI runs `pytest --doctest-modules` with no path argument, so ["tests"] (a directory this repo does not have) would collect nothing and still report green. Verified locally: 1 doctest collected, passing. - docsrc added to [tool.wads.ci.testing].exclude_paths Verified with `uv build`: sdist + wheel build clean, metadata and console script intact. Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
`.github/workflows/ci.yml` was the pre-uv generation (setup-python v2, checkout v2, axblack/pylint/isee, hand-rolled publish). It is replaced by the 5-line stub calling `i2mint/wads/.github/workflows/uv-ci.yml@master`, which reads all of its configuration from [tool.wads.ci.*] in pyproject.toml. Migration path: `wads-migrate ci-to-uv` then `wads-migrate ci-to-stub`. Both scan the old workflow for secret references; the only ones the old workflow used were PYPI_USERNAME and PYPI_PASSWORD. The uv CI uses token-only PyPI auth, so PYPI_PASSWORD (already passed by the stub) is sufficient and PYPI_USERNAME is no longer referenced. This also retires the last consumer of setup.cfg (isee update-setup-cfg), which the previous commit removed. Claude-Session: https://claude.ai/code/session_01VipiLaG4xy7WctqY9w2475
Copied verbatim from a healthy repo in the ecosystem; the wads project templates ship one and this repo predates that. 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
replizefrom legacy setuptools packaging + the pre-uv CI templateto
pyproject.toml(Hatchling) + the wads uv reusable-workflow stub. Part of thefleet-wide wads repo-improvement rollout.
What changed
1.
setup.cfg/setup.py→pyproject.toml(wads-migrate setup-to-pyproject,then hand-corrected for the tool's known rough edges).
Full inventory carried across from
setup.cfg— nothing dropped:name = replize[project].nameversion = 0.1.5[project].version(matches the released PyPI version)description[project].descriptionlong_description = file:README.md+text/markdownreadme = "README.md"license = apache-2.0license = "Apache-2.0"(SPDX string, not the deprecated[project.license]table);LICENSEkepturl[project.urls].Homepagekeywords = REPL[project].keywords(broadened:REPL, CLI, shell, subprocess, console)console_scripts: replize = replize.replize:_replize_cli[project.scripts]install_requires(empty)dependencies = []packages = find:replize/include_package_data = TrueMANIFEST.in, norequirements.txtin the repo)zip_safe = FalseAdded while here:
requires-python = ">=3.10", trove classifiers, author, and theecosystem-standard
[tool.ruff]block (without it the repo falls through to ruff'smoving default and can go red on unrelated style drift).
Verified by building:
uv buildproduces a clean sdist + wheel, and the wheel'sentry_points.txtcontains thereplizeconsole script.2. wads CI config corrections (the migration tool's documented rough edges):
[tool.wads.ci].project_namewas emitted empty → set to"replize"(it is thelint/coverage target in the reusable workflow).
testpathswas emitted as["tests"]→ set to["replize"]. This matters:wads CI runs
pytest --doctest-moduleswith no path argument, so collectionis driven entirely by
testpaths, and this repo has no top-leveltests/directory —
["tests"]would have collected nothing while still reporting green.Verified locally:
pytest --doctest-modules -q(no path arg, i.e. exactly whatCI runs) collects and passes 1 doctest.
docsrcadded to[tool.wads.ci.testing].exclude_paths.[tool.wads.ci.install](the package has nodependencies at all), so nothing to do there.
3. Legacy CI → uv stub (
wads-migrate ci-to-uv, thenci-to-stub).The old workflow was the pre-uv generation (
actions/checkout@v2,actions/setup-python@v2, axblack + pylint + isee, hand-rolled twine publish).It is replaced by the 5-line stub calling
i2mint/wads/.github/workflows/uv-ci.yml@master, configured entirely from[tool.wads.ci.*].Secrets: the migration commands scan the old workflow for
secrets.*references.The only ones present were
PYPI_USERNAMEandPYPI_PASSWORD. The uv CI usestoken-only PyPI auth, so
PYPI_PASSWORD(already in the stub's pass-throughblock) is sufficient and
PYPI_USERNAMEis no longer referenced. No secret waslost.
4. Housekeeping: added
.editorconfig(wads templates ship one; this repopredates that). Repo settings were also aligned outside this PR: homepage set to
the docs URL and topics populated from the pyproject keywords. Pages
(
gh-pages/ root) and Discussions were already correct.Verification
test-dependents replize— baseline1 suites: 1 pass, 0 fail, 0 no-teststest-dependents replize— final1 suites: 1 pass, 0 fail, 0 no-tests(unchanged)pytest --doctest-modules -q(no path arg, as CI runs it)1 passeduv buildruff check replizeBranch CI jobs:
Read Configurationsuccess ·Validation (3.10)success ·Validation (3.12)success ·Windows Testssuccess ·Publishskipped ·Publish GitHub Pagesskipped.wads.repo_auditfindings: HIGH 1 → 0, MEDIUM 3 → 1, LOW 3 → 1(after the repo-settings alignment). Cleared: no pyproject.toml, legacy
packaging files present, CI is the legacy generation, missing .editorconfig,
homepage/topics drift. No new findings introduced.
Not done here (deliberately)
+SKIP(it would open an interactive REPL), so real coverage is effectively nil. Out
of scope for a packaging pass — filed separately as No behavioural test coverage: the only doctest is +SKIP #1
(not closed by this PR).
style;
ruff formatwill normalise it on the first publish push-back. Keepingit out of this PR keeps the diff reviewable.
dependencies, and it imports and runs clean on modern Python.