Thanks for getting interested in contributing to gramhopper! 👏👏
This document is a set of guidelines to help you contribute.
Bug reports are the easiest contributions one can do, and maybe the most important ones.
Before reporting a bug, please make sure (as much as you can) that this is really an issue caused by a bug in gramhopper.
When reporting a bug, please provide as much information as possible, to help us identify and solve it easily. Please follow the bug report template (which appears when creating an issue) and fill all applicable fields
Look at issues tagged with good first issue label and find one you'd like to work on.
We use Invoke CLI to execute development tasks like test, build, lint, etc.
To build, run:
invoke build
You can also use flags with this command:
- Use
--no-package
to avoid building the package. - Use
--no-docker-image
to avoid building the docker image. - Use
--docs
to build the documentation, too. - You can combine these flags however you want.
To run tests, run:
invoke test
Testing Telegram bots require a bot token, so we provide a pre-created token that's already configured for you.
To override this token, set the environment variable TOKEN
before running tests.
The same applies for a chat ID to test with, which you can override with the environment variable CHAT_ID
.
Our code generally follows PEP8, with some exceptions. We use some linters to make sure we keep following the required style. To run them all, run:
invoke lint
If you have a lint error, fix it; don't add a comment to ignore it.
Please write informative, detailed (but not too detailed) commit messages.
Preferably, start your commit message with tagging the issue you are working on, for example: #40 Created a sphinx page for filter triggers
.
If you're done coding and you've run the build, test and lint tasks, go ahead and submit a new pull-request.
After you submit your pull request, verify that all status checks (CI build checks) are passing.
Improving documentation is a great way to contribute, too!
Our documentation is built using Sphinx.
It is based on RST files located in docs/
directory, and on docstrings in the python code.
Find here issues related to documentation.
To build the documentation, run:
invoke build-docs
The build output will be in docs/build
directory.
To clear the documentation build outputs, run:
invoke clean --docs
This project is governed by the Contributor Covenant Code of Conduct. By participating, you are expected to follow this code.