Contributions to this project are very much welcome, please make sure that your code changes are tested and that they follow Python best-practices.
$ pip install ".[test, ci]"
The tests require at least two environment variables: STREAM_KEY
and STREAM_SECRET
. There are multiple ways to provide that:
- simply set it in your current shell (
export STREAM_KEY=xyz
) - you could use direnv
Make sure you can run the test suite. Tests are run via pytest
.
$ export STREAM_KEY=my_api_key
$ export STREAM_SECRET=my_api_secret
$ make test
💡 If you're on a Unix system, you could also use direnv to set up these env vars.
We use Black (code formatter), isort (code formatter), flake8 (linter) and mypy (static type checker) to ensure high code quality. To execute these checks, just run this command in your virtual environment:
$ make lint
Since we're autogenerating our CHANGELOG, we need to follow a specific commit message convention.
You can read about conventional commits here. Here's how a usual commit message looks like for a new feature: feat: allow provided config object to extend other configs
. A bugfix: fix: prevent racing of requests
.
Releasing this package involves two GitHub Action steps:
- Kick off a job called
initiate_release
(link).
The job creates a pull request with the changelog. Check if it looks good.
- Merge the pull request.
Once the PR is merged, it automatically kicks off another job which will publish the package to Pypi, create the tag and created a GitHub release.