diff --git a/Development_Contribution.md b/Development_Contribution.md index f645577..19edf0c 100644 --- a/Development_Contribution.md +++ b/Development_Contribution.md @@ -20,32 +20,42 @@ I also have this small (very simple) script that I run each time before I push m # apprise root directory (after being checked out from # github). -# Cleanup cleanup() { + # Simple safety checking (ensure we're in the right dir) + [ ! -d "apprise" ] && return 1 + [ ! -d "apprise/plugins" ] && return 1 + [ ! -d "apprise/config" ] && return 1 + [ ! -d "test" ] && return 1 + + # we can safely assume we're being ran at the root of the apprise + # directory rm -rf .tox/ .eggs .coverage .cache \ apprise.egg-info htmlcov build &>/dev/null + find . -type d -name __pycache__ \ + -exec rm -rf {} \; &>/dev/null + find . -maxdepth 1 -mindepth 1 -type f \ + -name '.coverage.*' -delete + return 0 } -# 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 +# Incase it wasn't ran before (or we ctrl-c'ed last time) cleanup -# Check for pep8 -flake8 . --count --show-source --statistics +flake8 . --show-source --statistics && \ + flake8-3 . --show-source --statistics if [ $? -ne 0 ]; then echo "pep8 failed; early exit." exit 1 fi -# Handle our coverage -coverage run ./setup.py test +coverage run --parallel -m pytest -vv && \ + coverage3 run --parallel -m pytest -vv if [ $? -ne 0 ]; then echo "tests failed; early exit." exit 1 fi -# Print it to screen +coverage combine coverage report --show-missing # Cleanup