|
| 1 | +# Release |
| 2 | + |
| 3 | +This repository publishes the Python distribution `calle-ai`. Application code |
| 4 | +imports it as `calle`. |
| 5 | + |
| 6 | +## Current status |
| 7 | + |
| 8 | +The package source, CI, and publish workflow are ready. The first registry |
| 9 | +publish still requires one of these release identities: |
| 10 | + |
| 11 | +- GitHub Actions secret `TEST_PYPI_API_TOKEN` for TestPyPI, |
| 12 | +- GitHub Actions secret `PYPI_API_TOKEN` for PyPI, or |
| 13 | +- PyPI/TestPyPI Trusted Publishing configured for this repository and workflow. |
| 14 | + |
| 15 | +Until the first beta is published, use a local checkout for examples and |
| 16 | +integration testing. |
| 17 | + |
| 18 | +## Release gates |
| 19 | + |
| 20 | +Run these checks before publishing: |
| 21 | + |
| 22 | +```bash |
| 23 | +uv sync --all-groups |
| 24 | +uv run pytest -q |
| 25 | +uv run ruff check . |
| 26 | +uv run mypy src/calle |
| 27 | +uv run python -m py_compile examples/create_and_wait.py examples/webhook_server.py |
| 28 | +uv build |
| 29 | +uvx twine check dist/* |
| 30 | +``` |
| 31 | + |
| 32 | +The CI workflow also installs the built wheel in a fresh virtual environment and |
| 33 | +imports `CalleClient`. |
| 34 | + |
| 35 | +## TestPyPI rehearsal |
| 36 | + |
| 37 | +1. Confirm `pyproject.toml` has a unique beta version, for example `0.1.0b1`. |
| 38 | +2. Confirm GitHub Actions secret `TEST_PYPI_API_TOKEN` is configured, unless the |
| 39 | + package has been moved to TestPyPI Trusted Publishing. |
| 40 | +3. Open the `Publish Python package` workflow in GitHub Actions. |
| 41 | +4. Run the workflow from `main` with repository `testpypi`. |
| 42 | +5. Confirm the workflow completes the post-publish install smoke test. |
| 43 | + |
| 44 | +Manual verification: |
| 45 | + |
| 46 | +```bash |
| 47 | +python -m venv .venv |
| 48 | +. .venv/bin/activate |
| 49 | +pip install --index-url https://test.pypi.org/simple/ \ |
| 50 | + --extra-index-url https://pypi.org/simple \ |
| 51 | + calle-ai==0.1.0b1 |
| 52 | +python -c 'from calle import CalleClient; print(CalleClient)' |
| 53 | +``` |
| 54 | + |
| 55 | +## PyPI publish |
| 56 | + |
| 57 | +Use PyPI only after the TestPyPI package has been installed and tested in at |
| 58 | +least one backend integration. |
| 59 | + |
| 60 | +1. Increment the version in `pyproject.toml`. PyPI package versions are |
| 61 | + immutable. |
| 62 | +2. Confirm GitHub Actions secret `PYPI_API_TOKEN` is configured, unless the |
| 63 | + package has been moved to PyPI Trusted Publishing. |
| 64 | +3. Run the `Publish Python package` workflow from `main` with repository `pypi`. |
| 65 | +4. Confirm the workflow completes the post-publish install smoke test. |
| 66 | + |
| 67 | +## Registry identity notes |
| 68 | + |
| 69 | +PyPI Trusted Publishing is preferred once the repository is ready for public |
| 70 | +release. Configure a pending publisher for: |
| 71 | + |
| 72 | +- Owner: `CALLE-AI` |
| 73 | +- Repository: `server-sdk-python` |
| 74 | +- Workflow filename: `publish-python.yml` |
| 75 | +- Project name: `calle-ai` |
0 commit comments