mirror of
https://github.com/caronc/apprise.git
synced 2024-12-04 22:11:25 +01:00
Updated Development_Contribution (markdown)
parent
249d79569c
commit
2e49cef2bb
@ -2,14 +2,35 @@
|
||||
Thanks to all who have landed on this page with the intent of contributing to the apprise library. Any changes you make are going to easily make it upstream as long as there is there are:
|
||||
* **Unit tests**: apprise is currently sitting at 100% test coverage. The goal is to keep it this way! :slightly_smiling_face:
|
||||
* **PEP8 Compliance**: Following the [PEP 8 Style Guide for Python](https://www.python.org/dev/peps/pep-0008/) is a must. Most editors have PEP8 plugins and allow you to keep everything compliant as you go.
|
||||
* **Python 2.7 backwards support**. I'd like to support Python 2.7 for as long as i can only because there is a huge amount of servers still using this today. When you push your code upstream, a code-runner will test all this for you if you're uncertain.
|
||||
|
||||
## Directory Structure
|
||||
- `test/`: You will find all unit tests in this directory and there are plenty of examples of how to build your own or add to existing ones.
|
||||
- `packaging/`: You will find the MAN pages here and the SPEC files used to construct an RPM files
|
||||
- `apprise/plugins/`: This is where Apprise plugins are found
|
||||
|
||||
## Development Environment
|
||||
The following should get you all set up:
|
||||
```bash
|
||||
# Install our apprise development requirements
|
||||
pip install --requirement requirements.txt --requirement dev-requirements.txt
|
||||
```
|
||||
|
||||
If you prefer, sometimes it's easier to use the Docker containers to build your environment.
|
||||
```bash
|
||||
# The following would get you a shell that you could instantly leverage
|
||||
# the local ./bin/apprise tool to test with (against code changes you make directly
|
||||
# to the branch.
|
||||
docker-compose run --rm test.py311 bash
|
||||
|
||||
# You can also run ./bin/checkdone.sh and ./bin/test.sh from here if you like as well
|
||||
|
||||
# The following is a great way to test your code to see if there is
|
||||
# test coverage; there can not be an error when you create a pull request
|
||||
docker-compose run --rm test.py311 bin/checkdone.sh
|
||||
|
||||
``
|
||||
Note: `bin/checkdone.sh` does a full scan of the product where `test.sh` is a quick way to just test the code directly and also sectionaly test it.. hence `bin/test.sh discord` would only run the _discord related_ unit tests.
|
||||
|
||||
# Building Your Own Notification Plugin
|
||||
|
||||
It basically boils down to this:
|
||||
|
Loading…
Reference in New Issue
Block a user