Maintainers

CI, PyPI, and GitHub releases

Merge an unpublished foldlitedb version into master to publish its tested distributions to PyPI and its tested source revision to GitHub Releases.

The documentation workflow builds and checks the site on every push to master and publishes it to GitHub Pages.

Register the first publisher

Before the first upload, sign in to the existing PyPI account and add a pending publisher in PyPI publishing settings with these exact values:

FieldValue
PyPI project namefoldlitedb
GitHub owner255BITS
Repositoryfoldlitedb
Workflow filenamerelease.yml
Environmentpypi

The repository's pypi environment permits the master branch and tags matching v*. The publishing job alone receives id-token: write. No stored PyPI password or API token is needed. A pending publisher creates the project on its first successful upload. See the PyPI instructions.

Maintain the changelog and upgrade guide

Record changes in the canonical CHANGELOG.md. Before tagging, move the unreleased changes into a version section with its release link; confirm its UTC publication date against the published release. Preserve historical entries, and distinguish unpublished version preparations from published releases.

When storage or API behavior changes, update the upgrade guide with executable migration examples, compatibility changes, verification, and rollback expectations. Link that guide from the release notes. The same changelog is linked from the repository and website; do not maintain a separate copy of its history.

Release checks

release.yml runs on pushes to master and when a GitHub release is published. Branch runs skip the build and upload if PyPI already has files for the version in pyproject.toml. A GitHub release must use a matching v tag. Both paths check that the Python module, all three Rust crates, and the AssemblyScript view package declare that same version. Every build checks out the resolved source commit.

The reusable wheels.yml workflow runs the Rust tests, AssemblyScript checks, reproducible reducer Wasm verification, Python and browser tests, replay smoke, and documentation examples. It builds and tests CPython 3.11+ stable ABI wheels for Linux x86-64 and ARM64, macOS Intel and Apple Silicon, and Windows x86-64. It also rebuilds a wheel from the source archive and tests that installed package outside the checkout.

After every check succeeds, Twine validates the metadata and README. The workflow saves the tested source archive and five wheels as python-package-distributions. The publishing job downloads those exact artifacts and uploads them without rebuilding. Manually running wheels.yml performs the checks and builds without publishing.

Publish a new version

Merge the complete release source into master, including the native code, bundled Wasm assets, and version metadata. Monitor the release workflow. After PyPI publishes, the source release job confirms that every PyPI file has the same hash as the tested distributions from that run. It then publishes v<version> at the tested commit and links to the packages and changelog.

If the source release job fails after PyPI succeeds, rerun the failed job in the original workflow run. A manually published GitHub release against a verified commit remains available for release recovery. For example, for 0.5.0:

RELEASE_SHA=$(git rev-parse HEAD)
gh release create v0.5.0 --repo 255BITS/foldlitedb \
  --target "$RELEASE_SHA" --title "Foldlite DB 0.5.0" \
  --notes-file /tmp/foldlitedb-0.5.0-release-notes.txt

Write the release notes file before running this command. A matching GitHub release also lets operators rerun the test and publish jobs for a version with a partial upload.

Verify the published package

Confirm version 0.5.0 and distribution hashes on PyPI, then install in a fresh environment outside the checkout. Supported wheel platforms need Python 3.11+ and no Rust compiler. Building the source archive requires Rust/Cargo 1.90+ and a C compiler and linker.

python -m venv /tmp/foldlitedb-release-smoke
/tmp/foldlitedb-release-smoke/bin/python -m pip install --only-binary=:all: foldlitedb==0.5.0
cd /tmp
/tmp/foldlitedb-release-smoke/bin/python -I -c 'from importlib.metadata import version; from foldlitedb import Database, View; assert version("foldlitedb") == "0.5.0"; db = Database(":memory:", View.bundled("metrics")); db.add_many([{"metric": "loss", "value": 4}, {"metric": "loss", "value": 8}]); assert next(db.rows()).result["mean"] == 6; db.rebuild(); assert next(db.rows()).result["sum"] == 12; db.close()'

On Windows, use the virtual environment's Scripts\python.exe. Retain the GitHub Actions run and artifact hashes as the release receipt.