Releasing noodlelab¶
A release starts when you push a version tag. Everything after that is automated in
.github/workflows/release.yml:
git tag v0.3.0 → checks → build → smoke → GitHub Release → PyPI (→ MCP Registry) + Docker images + docs → verify
Step |
What it does |
|---|---|
checks |
Runs all of CI against the tagged commit: ruff, pytest on Python 3.11–3.13, the editor’s typecheck and build, and every installation tier on its own (only its own packs load, and its examples run). |
build |
Builds the editor into the package and runs |
smoke |
Installs the wheel with |
github-release |
Creates the GitHub Release for the tag with generated notes and attaches the wheel and sdist. |
publish-pypi |
Final versions: uploads to PyPI with trusted publishing, so no API token is stored anywhere. |
publish-testpypi |
Pre-releases ( |
publish-mcp-registry |
Final versions: stamps the version into |
docker |
Builds one image per tier for amd64 and arm64 and pushes it to |
docs |
Final versions: builds the documentation at the tag and publishes it to GitHub Pages as |
verify |
Runs |
If a step fails, nothing after it runs. For example, a failed smoke test means nothing is published. Re-running a failed workflow is safe:
the GitHub Release is updated rather than created again;
uv publish --check-urlskips files that are already on the index;the images are simply pushed again.
Versions come from the tag¶
pyproject.toml has no version number. hatch-vcs reads it from git:
tag
v0.3.0builds0.3.0;the commits after it build
0.3.1.devN+g<sha>;the installed package reports its version through
noodlelab --version,/api/healthand the admin System tab.
Tags must look like vX.Y.Z or vX.Y.Z followed by aN, bN or rcN. The build step rejects anything else.
Cutting a release¶
git switch main && git pull
git tag v0.3.0rc1 && git push origin v0.3.0rc1 # optional: rehearse on TestPyPI
git tag v0.3.0 && git push origin v0.3.0 # the release
The live demo on Render builds without git history, so it cannot read the tag. Its
version is pinned as NOODLELAB_VERSION in render.yaml: set it to
the new version in a commit on main, and the next deploy reports it.
Watch it under Actions → Release. When it finishes, users can install it:
uvx "noodlelab[full]" . # or any tier: maths, science, engineering, geo
uv tool install "noodlelab[engineering]"
pip install "noodlelab[science]"
docker run -p 8000:8000 ghcr.io/<owner>/noodlelab:0.3.0
Install a pre-release from TestPyPI (its dependencies still come from PyPI):
uvx --index https://test.pypi.org/simple/ --index-strategy unsafe-best-match \
--from "noodlelab[maths]==0.3.0rc1" noodlelab
The documentation site¶
The site is built with Sphinx from docs/ (the guides), the README (the home
page) and the code (the Python API, every node and the command line), and served
by GitHub Pages from the gh-pages branch, one folder per version:
Folder |
What |
Published by |
|---|---|---|
|
|
|
|
The latest 0.3.x release |
the release workflow’s docs step |
|
The latest final release; the site’s root redirects here |
the release workflow’s docs step |
Pre-releases are not published. CI builds the site on every pull request with
warnings as errors (a broken link, a docstring autodoc can’t read) and keeps the
HTML as the docs-html artifact. To build it locally:
uv sync --all-extras --group docs
make docs # docs/_build/html/index.html
To republish main by hand, run Actions → Docs → Run workflow.
One-time setup¶
PyPI trusted publisher.
On PyPI, go to Your account → Publishing and add a pending publisher (or go to Manage project → Publishing once the project exists).
Settings: owner
nkalis, repositorynoodlelab, workflowrelease.yml, environmentpypi.
TestPyPI trusted publisher. Do the same on test.pypi.org, with environment
testpypi.GitHub environments.
Under Settings → Environments, create
pypiandtestpypi.Add required reviewers to
pypiif you want to approve each upload by hand. The workflow waits at that step.
Container images.
The workflow pushes with the built-in
GITHUB_TOKEN, so nothing needs configuring.After the first release, open the package under Your profile → Packages → noodlelab → Package settings.
Make it public so
docker pullworks without logging in, and link it to the repository.
GitHub Pages.
Merge to
mainonce so that the Docs workflow creates thegh-pagesbranch.Under Settings → Pages → Build and deployment, choose Deploy from a branch, then
gh-pagesand/ (root).The site is then at
https://nkalis.github.io/noodlelab/. Pages is free for public repositories; a private one needs a paid GitHub plan.