matrix-alertbot/CONTRIBUTING.md

61 lines
1.5 KiB
Markdown
Raw Normal View History

# Contributing to Matrix AlertBot
2020-08-12 02:38:25 +02:00
Thank you for taking interest in this little project. Below is some information
to help you with contributing.
## Setting up your development environment
See the
[Install the dependencies section of SETUP.md](SETUP.md#install-the-dependencies)
for help setting up a running environment for the bot.
2020-08-12 02:38:25 +02:00
### Development dependencies
2020-08-12 02:38:25 +02:00
There are some python dependencies that are required for linting/testing etc.
You can install them with:
```
2022-08-13 13:33:14 +02:00
pip install -U -r requirements.txt
2020-08-12 02:38:25 +02:00
```
## Code style
Please follow the [PEP8](https://www.python.org/dev/peps/pep-0008/) style
guidelines and format your import statements with
[isort](https://pypi.org/project/isort/).
## Linting
Run the following script to automatically format your code. This *should* make
the linting CI happy:
```
./scripts-dev/lint.sh
```
2022-08-13 13:33:14 +02:00
## Testing
Run the tests with the following:
```
pytest .
```
Code coverage can be generated with:
2022-08-13 13:48:49 +02:00
2022-08-13 13:33:14 +02:00
```
coverage run --source matrix_alertbot -p -m pytest
```
Then, run either `coverage html` or `coverage lcov` to generate the report.
For html report, the results can be found in `htmlcov` directory.
2020-08-12 02:38:25 +02:00
## What to work on
Take a look at the [issues
list](https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot/-/issues). What
2020-08-12 02:38:25 +02:00
feature would you like to see or bug do you want to be fixed?
If you would like to talk any ideas over before working on them, you can reach
2022-08-13 13:33:14 +02:00
us on our [Mattermost channel](https://chat.neutrinet.be/neutrinet/channels/hub-dev).