- Install Poetry:
pipx install poetry - Install dependencies:
poetry install - Install OpenAPI Generator (on macOS:
brew install openapi-generator) - Run tests:
poetry run pytest
- Run
scripts/generate.sh. This will bump the package version and generate the API client from the latest OpenAPI spec. The bump defaults tominor; passmajororpatchto change it (scripts/generate.sh patch), ornoneto regenerate without bumping. Once generated, you should open a PR and merge the changes.
The version that gets published is whatever pyproject.toml on the main branch says, so publishing is two steps.
- Merge a PR that sets the new version.
scripts/generate.shdoes this for you. For a release that does not involve re-generating the client, runpython3 scripts/update_version.py minor(ormajor/patch), which updatespyproject.tomlandopenapi-generator-config.yamlwithout creating a commit or tag. - Run the "Publish" GitHub Actions workflow. This builds, tests, and publishes that version to PyPI, then tags the commit and creates a GitHub release.
The workflow never changes the version itself. If the version in pyproject.toml has already been released, the workflow fails before publishing anything.