Rehearse CLI releases on TestPyPI

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, python, yaml
Domain
ci-cd, release

Research direction

Start by reading .github/workflows/release.yml and diffing it against the same file at commit 5d81e1b, which already contains the job to restore. The edit is a workflow_dispatch trigger plus a job gated on main, ordered after build and verify, publishing to https://test.pypi.org/legacy/ with skip-existing: true; then add the optional rehearsal step to the "Releasing" section of CONTRIBUTING.md. Note that the testpypi environment and the pending publisher on test.pypi.org are repository and account settings only a maintainer can create, so a first-timer needs those in place before the done-when checks (manual run, rendered project page, pip install --index-url https://test.pypi.org/simple/ cobalto) can pass.

Written by the indexing model from the issue text.

Description

release

After the first release, add a manual rehearsal of the CLI release on TestPyPI, so later releases can be checked end to end before their tag is pushed.

Why

Before it publishes, release.yml checks everything it can: the tag against the version, the date in the changelog, twine check --strict, and a clean install of the wheel and the sdist with the example regression. Three things are only tested when a tag is pushed: the Trusted Publishing exchange with the index, the project page as the index renders it, and pip install from an index. A run against TestPyPI covers all three without using up a version number on PyPI.

It was left out of the first release (#16), which publishes to PyPI only.

What it takes

  • A pending publisher on test.pypi.org (an account separate from pypi.org) for project cobalto: owner abstracta, repository cobalto, workflow release.yml, environment testpypi.
  • A testpypi environment in this repository, limited to main.
  • In release.yml, a workflow_dispatch trigger and a job that runs only when it is started by hand on main, after the build and verify jobs, and publishes to https://test.pypi.org/legacy/ with skip-existing: true. The first commit of #16 had such a job: release.yml at 5d81e1b.
  • The rehearsal as an optional step in the "Releasing" section of CONTRIBUTING.md.

TestPyPI also refuses a version it already has. A rehearsal of a version that is already there is skipped, so it is worth running once the version has been raised and before the tag.

Done when

  • Starting the workflow by hand on main publishes the package to TestPyPI.
  • The project page on TestPyPI shows the README with the logo and the demo GIF.
  • pip install --index-url https://test.pypi.org/simple/ cobalto installs it, and cobalto --version prints that version.
  • CONTRIBUTING.md describes the rehearsal.
Dominant language
Python
Stars
2
Forks
0
Avg merge
4h 51m
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from abstracta/cobalto

All issues in abstracta/cobalto

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.