Skip to content

Latest commit

 

History

History
80 lines (62 loc) · 3.3 KB

CONTRIBUTING.md

File metadata and controls

80 lines (62 loc) · 3.3 KB

Contributing to gramhopper

Thanks for getting interested in contributing to gramhopper! 👏👏

This document is a set of guidelines to help you contribute.

Reporting bugs

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

Contributing code

Find an issue to work on

Look at issues tagged with good first issue label and find one you'd like to work on.

How to build and test

We use Invoke CLI to execute development tasks like test, build, lint, etc.

Building

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.

Testing

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.

Follow the style guide

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.

Commit messages

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.

Submit a pull request

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

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.

Building the 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

Code of conduct

This project is governed by the Contributor Covenant Code of Conduct. By participating, you are expected to follow this code.