Thank you for considering contributing to Granian!
Please don't use issues for this. Issues are the designed tool to address bugs and feature requests in Granian itself. Use our Github Discussions section for questions about using Granian or issues with your own code.
Include the following information in your post:
- Describe what you expected to happen.
- If possible, include a minimal reproducible example to help us identify the issue. This also helps check that the issue is not with your own code.
- Describe what actually happened. Include the full traceback or dump if there was an exception or panic.
- List your Python and Granian versions, also including, if possible, the OS used and the CPU architecture, and, on async protocols, the
asyncio
loop implementation used. If possible, check if this issue is already fixed in the latest releases or the latest code in the repository.
If there is not an open issue for what you want to submit, prefer opening one for discussion before working on a PR. You can work on any issue that doesn't have an open PR linked to it or a maintainer assigned to it. These show up in the sidebar. No need to ask if you can work on an issue that interests you.
Include the following in your patch:
- Use the provided formatting commands to format your code. You can setup the environment to run these commands using the instructions below.
- Include tests if your patch add new features or alter existing behavior. Make sure the test fails without your patch.
- Update any relevant documentation.
-
Make sure you have a GitHub account.
-
Make sure you have an updated version of
git
. -
Configure git with your
username
andemail
if needed.$ git config --global user.name 'your name' $ git config --global user.email 'your email'
-
Fork Granian to your GitHub account by clicking the Fork button.
-
Clone your fork locally, replacing
your-username
in the command below with your actual username.$ git clone https://github.com/your-username/granian $ cd granian
-
Make sure you have the latest stable version of Rust language installed.
-
Make sure you have an updated version of uv.
-
Init the environment and build Granian.
$ make build-dev
-
Create a branch to identify the issue you would like to work on. A good format would be using the issue number followed by a minimal description.
$ git fetch origin $ git checkout -b 123-add-some-feature origin/master
-
Using your favorite editor, make your changes, committing as you go.
-
Use the provided formatters and linters on your changes.
$ make format $ make lint
-
Push your commits to your fork on GitHub and create a pull request. Link to the issue being addressed with
closes #123
in the pull request description.
Run the basic test suite with the provided command.
$ make build-dev
$ make test
This runs the tests for the current environment, which is usually sufficient. CI will run the full suite when you submit your pull request.