Skip to content

Latest commit

 

History

History
125 lines (97 loc) · 5.32 KB

README.md

File metadata and controls

125 lines (97 loc) · 5.32 KB

Preparing and publishing a release

The PyPI distribution is nullius-eval. The import package and executable are nullius.

The draft release workflow prepares GitHub drafts with an installable wheel, a source distribution and SHA256SUMS. It does not publish the release or upload to PyPI. A separate manual publish to PyPI workflow uploads reviewed GitHub release assets.

The repository stays private; publication to PyPI makes the uploaded package and its included source public, independently of GitHub access.

pyproject.toml owns the package version. The release tag is that version prefixed with v. Release notes live in docs/releases/<tag>.md.

Build the downloads locally

From the repository root, with Python 3.12 or later and uv available:

python3 app/packaging/release.py build \
  --out-dir /tmp/nullius-release \
  --tag v0.2.0

The tag must match the package version, and the output directory must be absent or empty. Existing downloads are never overwritten. The output contains:

nullius_eval-0.2.0-py3-none-any.whl
nullius_eval-0.2.0.tar.gz
SHA256SUMS

The build checks the installed wheel with app/packaging/verify.py. It does not run a benchmark or read personal settings.

To check a wheel independently:

python3 app/packaging/verify.py /tmp/nullius-release/nullius_eval-0.2.0-py3-none-any.whl

To validate the complete downloaded set, including checksums and package metadata, without rebuilding it:

python3 app/packaging/release.py verify \
  --dist-dir /tmp/nullius-release \
  --tag v0.2.0

Current release checks run on Linux with Python 3.12; do not infer additional platform support from the wheel's py3-none-any filename.

Prepare the GitHub draft

  1. Review and merge the version, release notes and intended changes into main.
  2. Open Actions → draft release → Run workflow, select main, and provide the matching tag, such as v0.2.0.
  3. The workflow runs the backend and route suites, builds and verifies the packages, then creates a draft release for the exact commit it checked out: a prerelease for an rc tag such as v0.1.0rc2, the latest release otherwise.
  4. Review the draft's target commit, notes, assets and installation instructions. Download and test the wheel before requesting permission to publish.

The workflow refuses to overwrite an existing release. Publish only after the repository owner explicitly approves the reviewed release.

Once a release is published, keep its tag and history stable. Put subsequent changes in new commits and a new version; do not amend the initial commit or replace a published package under the same version.

Configure PyPI publishing once

  1. Check that nullius-eval is still available on PyPI, or that the publishing account controls the project if it already exists.
  2. Create a GitHub environment named pypi in ThinkFlowLab/nullius, restricted to main. Configure required reviewers where the repository's GitHub plan supports them. Naming an environment does not itself create an approval gate.
  3. In the intended PyPI owner's account, configure a pending Trusted Publisher for project nullius-eval, GitHub owner ThinkFlowLab, repository nullius, workflow filename publish.yml, and environment pypi. For an existing project, configure the same Trusted Publisher on that project instead.

No PyPI API token is stored in the repository. A pending publisher does not reserve a package name. See PyPI's pending-publisher guide.

Publish the reviewed release

  1. Obtain the repository owner's approval for the exact release and files. Confirm the package version, release notes, PyPI description in app/packaging/PYPI.md, wheel and source archive are ready to be public.
  2. Publish the reviewed GitHub draft as it was created.
  3. Open Actions → publish to PyPI → Run workflow, select main, enter the release tag and enable confirm.
  4. The validation job downloads the release's wheel, source archive and checksums, validates their names, versions and hashes, runs isolated installation checks, and runs twine check --strict on the distributions.
  5. The publishing job uploads the validated files unchanged; it does not rebuild.
  6. After a successful PyPI upload, a separate job advances docs-release to the release tag's commit without force-pushing. Cloudflare builds that production branch with previews disabled; see app/site/README.md for the required host settings. If this final job fails, rerun only the failed job after fixing it: the package is already published.

After a successful upload, verify an installation outside the source checkout:

uv tool install nullius-eval
nullius --version
nullius serve

For a previously installed private build under the old distribution name, uninstall that tool with uv tool uninstall nullius before installing nullius-eval. User settings, catalogue additions and runs are outside the tool environment and remain in place.

The default command installs the latest version without a pin. To select this specific version, use uv tool install nullius-eval==0.2.0. Add --force when replacing an existing installation. uv tool upgrade nullius-eval updates an unpinned installation; it retains an explicit version constraint.