Thanks for your interest in simple-github! To participate in this community, please review our code of conduct.
To contribute to simple-github, you'll need to clone the repository:
# first fork simple-github
git clone https://github.com/<user>/simple-github
cd simple-github
git remote add upstream https://github.com/mozilla-releng/simple-github
We use a tool called uv to manage simple-github and its dependencies. First, follow the installation instructions.
Then run:
uv sync
This does several things:
- Creates a virtualenv for the project in a
.venv
directory (if necessary). - Syncs the project's dependencies as pinned in
uv.lock
(if necessary). - Installs
simple-github
as an editable package (if necessary).
Now you can prefix commands with uv run
and they'll have access to this
environment.
Tests are run with the pytest framework:
uv run pytest
Linters and formatters are run via pre-commit. To install the hooks, run:
pre-commit install -t pre-commit -t commit-msg
Now checks will automatically run on every commit. If you prefer to run checks manually, you can use:
pre-commit run
Most of the checks we enforce are done with ruff. See pre-commit-config.yaml for a full list of linters and formatters.
A tool called commitizen can optionally be used to assist with releasing the package. First install it with:
uv tool install commitizen
Then create the version bump commit:
cz bump
git show
Verify the commit is what you expect, then create a pull request and get the
commit merged into main
. Once merged, push your tag upstream:
git push upstream --tags
Finally, create a release in Github, choosing the tag that you just pushed.
This will trigger the pypi-publish
workflow and upload the package to pypi.