|
| 1 | +# Contributing |
| 2 | + |
| 3 | +## Release Checklist |
| 4 | + |
| 5 | +Use this checklist whenever you cut a new version of the Python SDK. |
| 6 | + |
| 7 | +### Prerequisites |
| 8 | + |
| 9 | +- Docker installed (our helper scripts build and run inside the project Docker image). |
| 10 | +- Writable Transloadit GitHub repository access. |
| 11 | +- A PyPI API token with upload rights to `pytransloadit` (`PYPI_TOKEN`). Store it in your shell or `.env`. |
| 12 | +- Optionally, a TestPyPI token (`PYPI_TEST_TOKEN`) if you want to dry‑run the release before pushing to the real registry. |
| 13 | + |
| 14 | +### 1. Prepare the Release Commit |
| 15 | + |
| 16 | +1. Update the version in all synced files: |
| 17 | + - `pyproject.toml` |
| 18 | + - `transloadit/__init__.py` |
| 19 | + - `tests/test_request.py` (the `Transloadit-Client` header) |
| 20 | +2. Add a matching entry to `CHANGELOG.md`. |
| 21 | +3. Run the test matrix (add `PYTHON_SDK_E2E=1` if you want to exercise the live upload): |
| 22 | + ```bash |
| 23 | + ./scripts/test-in-docker.sh --python 3.12 |
| 24 | + ``` |
| 25 | +4. Commit the changes with a message such as `Prepare 1.0.3 release`. |
| 26 | + |
| 27 | +### 2. Tag the Release |
| 28 | + |
| 29 | +After landing the release commit on `main` (or the branch you will tag), create and push an annotated tag: |
| 30 | + |
| 31 | +```bash |
| 32 | +git tag -a v1.0.3 -m "v1.0.3" |
| 33 | +git push origin main --tags |
| 34 | +``` |
| 35 | + |
| 36 | +### 3. Publish to PyPI |
| 37 | + |
| 38 | +The `scripts/notify-registry.sh` helper publishes from inside our Docker image and performs the usual safety checks (clean git tree, version consistency, changelog entry). It looks for tokens in the environment or `.env`. |
| 39 | + |
| 40 | +Publish to the real registry: |
| 41 | + |
| 42 | +```bash |
| 43 | +PYPI_TOKEN=... scripts/notify-registry.sh |
| 44 | +``` |
| 45 | + |
| 46 | +### 4. Announce the Release |
| 47 | + |
| 48 | +1. Draft a GitHub release for the new tag and paste the changelog entry. |
| 49 | +2. Confirm that the [Read the Docs build](https://transloadit.readthedocs.io/en/latest/) completes (it is triggered when you publish the GitHub release). |
| 50 | + |
| 51 | +That’s it—PyPI and the documentation are now up to date. For additional background see the internal guide: <https://github.com/transloadit/team-internals/blob/HEAD/_howtos/2020-12-14-maintain-python-sdk.md>. |
0 commit comments