A forked version of Unasync is used to generate non-async code based on the async implementation. Only make changes to files in src/cerbos/sdk/_async. Then run ./pw generate to re-generate the code in src/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-jsonAdding a tool
# Add Ruff to tool group
./pw pdm add -dG tools ruffFormatting code
./pw formatRunning tests
./pw testRunning a REPL
./pw pdm run pythonTESTCONTAINERS_DOCKER_SOCKET_OVERRIDE="unix://${XDG_RUNTIME_DIR}/podman/podman.sock" TESTCONTAINERS_RYUK_DISABLED=true ./pw test- Run
./pw tag_release PATCHto generate the changelog and tag the release. (ReplacePATCHwithMINORif 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/*