The project uses Rye for its development toolchain and to run development targets. Install it with:
$ curl -sSf https://rye.astral.sh/get | bashOr via Homebrew:
$ brew install ryeThen use it to set up a virtual environment:
$ rye syncCreate a test database and migrate with River's CLI:
$ go install github.com/riverqueue/river/cmd/river
$ createdb river_test
$ river migrate-up --database-url "postgres://localhost/river_test"Run all tests:
$ rye testRun a specific test (or without -k option for all tests in a single file):
rye test -- tests/driver/sqlalchemy/sqlalchemy_driver_test.py -k test_insert_with_unique_opts_by_queue$ rye lint$ make type-check$ rye fmtRye uses Ruff under the hood for code formatting.
$ make generate-
Pull existing
masterand tags, choose a version, and create a branch:git checkout master && git pull --rebase export VERSION=v0.x.0 git checkout -b $USER-$VERSION
-
Update
CHANGELOG.mdandpyproject.tomlto the new version number, and open a pull request. Get it reviewed and merged. -
Pull down the merged pull request, build the project (goes to
dist/), publish it to PyPI, cut a tag for the new version, and push it to GitHub:git pull origin master rye build rye publish git tag $VERSION git push --tags # or else PyPI will keep uploading old versions forever rm dist/*
-
Cut a new GitHub release by visiting new release, selecting the new tag, and copying in the version's
CHANGELOG.mdcontent as the release body.