Skip to content

feat(distribution): switch on the parts that were built and never published - #509

Open
darklordVirtual wants to merge 1 commit into
masterfrom
feat/distribution-switches
Open

feat(distribution): switch on the parts that were built and never published#509
darklordVirtual wants to merge 1 commit into
masterfrom
feat/distribution-switches

Conversation

@darklordVirtual

Copy link
Copy Markdown
Owner

Prepares every distribution step and leaves the outward-facing action to you. Nothing publishes when this merges.

What was actually wrong

Not a missing distribution layer — a built one that was never switched on:

Already built Missing
release.yml: wheel, sdist, CycloneDX SBOM, SHA256SUMS, Sigstore build-provenance + SBOM attestations, verified in-run any publish step
mkdocs.yml, full docs/ tree under the document register any workflow that builds or deploys it
CITATION.cff with title, abstract, version, keywords DOI, ORCID, and the Zenodo metadata file
remora demo (eight offline scenarios), remora try a way to reach them without cloning

Blocking discovery: the PyPI name is taken

remora on PyPI is an unrelated project ("A replacement for NRPE", 0.0.1). Publishing under it is impossible, and pip install remora would install that. The distribution name becomes remora-assurance (verified available). The import package and console script stay remora; the three importlib.metadata.version(...) lookups move with the distribution name. Wheel builds as remora_assurance-0.11.0-py3-none-any.whl; artefact globs in release.yml and ci.yml are now name-agnostic.

Say the word if you want a different name — it is one field plus three lookups.

Two locks, both yours to open

PyPI (release.yml, new publish-pypi job): requires a tag push and repo variable PUBLISH_TO_PYPI=true. Trusted Publishing via OIDC, so no token in the repo. Publishes exactly the artefacts the same run attested, with the SBOM and checksums stripped.

Setup, once: create the PyPI project remora-assurance; add a Trusted Publisher (owner darklordVirtual, repo REMORA-research, workflow release.yml, environment pypi); create the pypi GitHub environment (add reviewers if you want a second pair of eyes per publish); set PUBLISH_TO_PYPI.

Docs (docs-site.yml, new): builds with mkdocs build --strict on every push and PR so a broken link fails where it is introduced. Deploys only on master and PUBLISH_DOCS=true.

Setup, once: Settings → Pages → Source: GitHub Actions; set PUBLISH_DOCS.

Zenodo/DOI: .zenodo.json committed. CITATION.cff carries the procedure, including the part that bites — archiving must be enabled before the release is published, and the concept DOI is the one that belongs in CITATION.cff. The ORCID field is left empty rather than guessed; it needs your iD in two places.

Deliberately not done

README and docs install lines still say pip install -e ".[dev]". They should change in the commit that follows a first successful publish, not before, so they never name a package nobody can install.

Verification

6492 passed, 24 skipped. mypy clean (359 files), ruff clean, mkdocs build --strict clean, wheel builds under the new name. Every pinned action SHA was resolved against the GitHub API rather than written from memory.

…lished

The distribution layer was not missing, it was built and left off. The
release workflow already produced wheel, sdist, CycloneDX SBOM, checksums
and Sigstore build-provenance attestations from the tagged commit, and
published none of them. mkdocs.yml existed and nothing ever built the
site. CITATION.cff carried the metadata with DOI and ORCID marked
pending. So reaching the eight-scenario offline CLI demo required cloning
the repository first, which is the barrier, not the absence of a demo.

The distribution name changes to remora-assurance. `remora` is taken on
PyPI by an unrelated project ("A replacement for NRPE", 0.0.1), so
publishing under it is impossible and `pip install remora` would install
that instead. The import package and the console script stay `remora`;
only the name pip resolves moves, and the three importlib.metadata
lookups move with it.

Nothing publishes on merge. The PyPI job requires a tag push AND the
repository variable PUBLISH_TO_PYPI; the Pages deploy requires master AND
PUBLISH_DOCS. Until those are set, a tag produces exactly what it
produced before and the docs job only builds. Publication authenticates
through Trusted Publishing, so no API token is stored in the repository.
Each workflow carries the one-time setup steps that must happen outside
it, and CITATION.cff carries the Zenodo procedure, including that
archiving has to be enabled before the release is published rather than
after.

The docs build runs with --strict on every push and pull request, so a
broken link fails where it is introduced rather than at deploy time.

README install lines are deliberately untouched: they should change in
the commit that follows a first successful publish, not before it, so
they never name a package nobody can install.

6492 passed, 24 skipped. mypy clean over 359 files, ruff clean, mkdocs
--strict clean.
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