Build and Publish Docs#
Read the Docs configuration#
Documentation publishing is controlled by .readthedocs.yaml at the
repository root:
It defines the build environment
It points to the Sphinx configuration in
docs/conf.pyIt uses
environment.ymlfor dependency resolution
Sphinx project configuration#
docs/conf.py configures:
API autodoc via
sphinx.ext.autodocandsphinx.ext.napoleonGitHub source links via
sphinx.ext.linkcodeHTML theme via
pydata_sphinx_themeSource-link git ref resolution with fallbacks:
READTHEDOCS_GIT_COMMIT_HASH->git rev-parse HEAD->READTHEDOCS_GIT_IDENTIFIER->main
The documentation assumes CryoSwath is installed in the build environment; the Pixi and pip commands below install it before running Sphinx.
Build locally#
Recommended (Pixi-managed, lockfile-backed):
pixi install --locked -e docs
pixi run -e docs docs-build
Alternative (pip-based local build):
pip install -r docs/requirements.txt
pip install --editable .
make -C docs html
Or directly with Sphinx:
sphinx-build -b html docs docs/_build/html
The built pages are written to docs/_build/html.
PyPI publishing#
Package publishing is handled by .github/workflows/pypi-publish.yml.
Creating a GitHub release automatically builds the sdist and wheel.
The workflow checks that the release tag matches
pyproject.toml’s version (v0.2.5->0.2.5).If the version check passes, the workflow publishes to PyPI via GitHub trusted publishing.
Release checklist#
Merge the intended release changes into
mainand create a release branch from the updated branch.Move the
Unreleasedchangelog entries under a dated release heading and set the same version inpyproject.toml.Run the dependency compatibility jobs and the release-style checks from committed
HEAD:pixi run -e test test-fresh-committed
Build and inspect the distributions locally:
python -m build python -m twine check dist/*
Merge the release preparation after required CI passes, then create a GitHub release tagged
v<version>from that exact commit. Publishing the release triggers the PyPI workflow; creating only a tag does not.Confirm the new version and both wheel and source distribution on PyPI.
Conda-forge preflight and publishing#
Before publishing upstream or pushing a feedstock update, build the final source
distribution and prepare the version update in a personal fork of
conda-forge/cryoswath-feedstock. Temporarily point the local recipe at the
local source archive, rerender when required, and run the feedstock’s CI image:
python build-locally.py
Require the package build, recipe tests, output validation, and an installation
from build_artifacts to pass. Do not push the feedstock branch or open its
pull request until this local build succeeds.
After PyPI publishes, replace the temporary source with the final PyPI source
archive URL and checksum. If the published archive differs from the tested local
archive, rerun build-locally.py before pushing. The feedstock recipe must
reset its build number to 0 and reflect the release’s Python, xarray, and
runtime dependency requirements. Once the feedstock pull request passes and is
merged, conda-forge builds and uploads the package automatically.