mirror of
https://github.com/caronc/apprise.git
synced 2025-01-21 13:28:55 +01:00
Created Development_Contribution (markdown)
parent
e516a4b3e8
commit
b5cfb08385
53
Development_Contribution.md
Normal file
53
Development_Contribution.md
Normal file
@ -0,0 +1,53 @@
|
||||
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.
|
||||
|
||||
The following should get you all set up:
|
||||
```bash
|
||||
# Install our apprise development requirements
|
||||
pip install --requirement requirements.txt --requirement dev-requirements.txt
|
||||
```
|
||||
|
||||
I also have this small (very simple) script that I run each time before I push my changes. It may or may not be useful to others:
|
||||
```bash
|
||||
#!/bin/sh
|
||||
# Description: This is a checkdone.sh script used to check against the
|
||||
# apprise project that I reference before I commit any code
|
||||
# upstream.
|
||||
#
|
||||
# Note: this script was intended to be ran from within the
|
||||
# apprise root directory (after being checked out from
|
||||
# github).
|
||||
|
||||
# Cleanup
|
||||
cleanup() {
|
||||
rm -rf .tox/ .eggs .coverage .cache \
|
||||
apprise.egg-info htmlcov build &>/dev/null
|
||||
}
|
||||
|
||||
# In case it wasn't ran before (or we ctrl-c'ed last time); we
|
||||
# want to just clean up any lingering content from the last time
|
||||
# we may or may have not done a checkdone.sh
|
||||
cleanup
|
||||
|
||||
# Check for pep8
|
||||
pycodestyle
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "pep8 failed; early exit."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Handle our coverage
|
||||
coverage run ./setup.py test
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "tests failed; early exit."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Print it to screen
|
||||
coverage report --show-missing
|
||||
|
||||
# Cleanup
|
||||
cleanup
|
||||
```
|
Loading…
Reference in New Issue
Block a user