Skip to content

Fix deprecated setup.py commands, broken publish job, and README drift - #133

Open
scottclowe wants to merge 13 commits into
masterfrom
fix-setup-and-workflows
Open

scottclowe wants to merge 13 commits into
masterfrom
fix-setup-and-workflows

Conversation

@scottclowe

Copy link
Copy Markdown
Owner

Summary

Fixes several things in the template that are broken, deprecated, or out of date.

Packaging

  • Remove the test and upload custom commands from setup.py. The setuptools test command has been removed, and building with current setuptools (84.0.0) warns that references to it will cause build errors in the future.
  • README: recommend pip install --editable . and python -m build instead of invoking setup.py directly.

CI

  • test.yaml: remove the branches key under schedule. It is not valid there, and scheduled runs always use the default branch.
  • test-release-candidate.yaml:
    • Remove the duplicated macos-latest / 3.12 matrix entry.
    • Build wheels with python -m build --wheel. Wheels are still built on every OS and Python version, since a package made from the template may contain compiled extensions. The sdist is now built once, in the publish job.
    • Fix the publish job's artifact download. download-artifact@v4 needs pattern: wheel-* with merge-multiple: true; name: wheel-* matches nothing.
    • Publish to Test PyPI with Trusted Publishing (id-token: write, testpypi environment) instead of an API token, and replace the deprecated repository_url input with repository-url.

Docs

  • Remove the stale line-number links from the README.
  • Replace the black_nbconvert reference with nbQA, which is what the pre-commit config actually uses.
  • Remove the section on the nonexistent lint workflow (the README said five workflows; there are four).
  • Correct the claim that PyPI releases cannot easily be yanked. The real hazard is that a version number can never be reused.
  • Document the wheel caveats: wheels are identical for pure-Python packages, and compiled packages need manylinux wheels for PyPI.
  • Update the "Other CI/CD options" list: drop Travis CI and AppVeyor, add GitLab CI/CD.

Testing

  • python -m build succeeds with setuptools 84.0.0, with no test-command deprecation warning.
  • pre-commit passes on every commit.
  • Workflow YAML parses and setup.py compiles at every commit.
  • The workflows have not been run end to end. The publish job is still disabled by default, and enabling it requires registering a trusted publisher on Test PyPI first.

🤖 Generated with Claude Code

scottclowe and others added 13 commits October 3, 2026 09:12
The setuptools test command has been removed, and invoking setup.py
directly is deprecated. Building currently warns that references to
the test command will cause build errors in the future.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The schedule event does not accept a branches key; scheduled runs
always use the default branch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Wheels continue to be built on every OS and Python version, in case
the package contains compiled extensions. The sdist is built once,
in the publish job.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
download-artifact@v4 matches multiple artifacts with pattern, not name,
and needs merge-multiple to put them all into one directory.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replace the API token with OIDC-based Trusted Publishing, and update
the deprecated repository_url input to repository-url.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Yanking a release is straightforward. The real hazard is that a version
number can never be reused once it has been uploaded.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Note that wheels are identical for pure-Python packages, and that
packages with compiled extensions need manylinux wheels for PyPI.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant