Unasync is used to generate non-async code based on the async implementation. Only make changes to files in cerbos/sdk/_async
. Then run ./pw generate
to re-generate the code in cerbos/sdk/_sync
.
This project uses PDM with Pyprojectx for package management. The pw
script should be used when working with this project.
Adding a new dependency
./pw pdm add dataclasses-json
Adding a tool
# Add black to lint group
./pw pdm add -dG lint black
Formatting code
./pw format
Running tests
./pw test
Running a REPL
./pw pdm run python
- Run
./pw tag_release PATCH
to generate the changelog and tag the release. (ReplacePATCH
withMINOR
if you are incrementing the minor version.) - Push the new tag to GitHub to launch the CI release job
./pw pdm build
# Test PyPI
./pw twine upload -r testpypi dist/*