Skip to content

F21.1 — PyPI as the index

State Closed
Parent E21
Iteration Release 7
Start Date 2026-10-26
Closed Date 2026-10-28
Predecessors —
Source Owner request, 2026-10-26

Stories: 2 Closed

Story State Depends on
S21.1.1 — Revise ADR-0004 Closed —
S21.1.2 — The PyPI projects can accept uploads from CI Closed —

This feature records the distribution decision in ADR-0004 and has the owner set up the PyPI side, so CI can upload.

Design

The owner accepted these on 2026-10-26 (E21); the settled rules (publish to PyPI by trusted publishing, no index declaration, immutable versions, tags and umbrella releases) are in ADR-0004, and the upload workflow is in the release runbook.

  • Ownership. The projects belong to the PyPI organization rn-forge, approved 2026-10-28. Pending publishers are added on the owner's account, so each project is created there by its first upload and then added to the organization (S21.3.3). The test.pypi.org projects stay on the owner's account; TestPyPI has no rn-forge organization.
  • Licence. MIT (F21.2).

S21.1.1 — Revise ADR-0004

State: Closed

Acceptance: ADR-0004 reads as under Design, and the root docs site builds with --strict.

S21.1.2 — The PyPI projects can accept uploads from CI

State: Closed

The owner completes these steps; none of them can be scripted:

  1. Make the owner's membership of the rn-forge GitHub organization public.
  2. Link the owner's PyPI and GitHub accounts under PyPI's Account associations.
  3. Tell PyPI staff both are done, and correct the organization request's URL to https://github.com/rn-forge.
  4. Create the GitHub environments in rn-forge/pykit:
    • pypi, with a deployment branch policy allowing only main;
    • testpypi, with no branch policy, so the dry run can run from a release branch.

The trusted publishers are not part of this story. The workflow cannot create a project, so the owner creates each project and attaches its publisher before the first publish (F21.3).

Acceptance:

  • Both environments exist, and pypi allows only main.
  • The owner's membership is public.

Acceptance

set -euo pipefail
grep -q 'pypi.org\|PyPI' docs/adr/ADR-0004.md                                        # S21.1.1
[ "$(grep -o 'revision accepted' docs/adr/ADR-0004.md | wc -l)" -ge 2 ]             # S21.1.1
uv run --group docs mkdocs build --strict -q                                         # S21.1.1
gh api repos/rn-forge/pykit/environments/pypi --jq '.deployment_branch_policy.custom_branch_policies' | grep -qx true   # S21.1.2
gh api repos/rn-forge/pykit/environments/pypi/deployment-branch-policies --jq '.branch_policies[].name' | grep -qx main # S21.1.2
gh api repos/rn-forge/pykit/environments/testpypi >/dev/null                         # S21.1.2
gh api orgs/rn-forge/public_members --jq '.[].login' | grep -qx rohitnarayanan       # S21.1.2

The owner confirms what cannot be scripted: the PyPI organization request has been answered (approved 2026-10-28).