Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.1 KB

DEVELOPMENT.md

File metadata and controls

56 lines (35 loc) · 1.1 KB

Development

Async and non-async

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.

Package management

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

Releases

  • Run ./pw tag_release PATCH to generate the changelog and tag the release. (Replace PATCH with MINOR if you are incrementing the minor version.)
  • Push the new tag to GitHub to launch the CI release job

Publishing to Test PyPI

./pw pdm build

# Test PyPI
./pw twine upload -r testpypi dist/*