apprise/bin
2022-10-16 14:35:45 -04:00
..
apprise Added support for recent CPython and PyPy versions; Droped Python v2.7 Support (#680) 2022-10-07 20:28:36 -04:00
checkdone.sh Improve testing of NotifyMQTT (#700) 2022-10-16 14:35:45 -04:00
README.md update README.md file in folder bin (#493) 2021-12-13 19:50:53 -05:00
test.sh A simple set of development and testing tools (#285) 2020-08-31 21:54:37 -04:00

Apprise Development Tools

This directory just contains some tools that are useful when developing with Apprise. It is presumed that you've set yourself up with a working development environment before using the tools identified here:

# Using pip, setup a working development environment:
pip install -r dev-requirements.txt

The tools are as follows:

  • ⚙️ apprise: This effectively acts as the apprise tool would once Apprise has been installed into your environment. However apprise uses the branch you're working in. So if you added a new Notification service, you can test with it as you would easily. apprise takes all the same parameters as the apprise tool does.

    # simply make your code changes to apprise and test it out:
    ./bin/apprise -t title -b body \
          mailto://user:pass@example.com
    
  • ⚙️ test.sh: This allows you to just run the unit tests associated with this project. You can optionally specify a keyword as a parameter and the unit tests will specifically focus on a single test. This is useful when you need to debug something and don't want to run the entire fleet of tests each time. e.g:

    # Run all tests:
    ./bin/tests.sh
    
    # Run just the tests associated with the rest framework:
    ./bin/tests.sh rest
    
    # Run just the Apprise config related unit tests
    ./bin/tests.sh config
    
  • ⚙️ checkdone.sh: This script just runs a lint check against the code to make sure there are no PEP8 issues and additionally runs a full test coverage report. This is what will happen once you check in your code. Nothing can be merged unless these tests pass with 100% coverage. So it's useful to have this handy to run now and then.

    # Perform PEP8 and test coverage check on all code and reports
    # back. It's called 'checkdone' because it checks to see if you're
    # actually done with your code commit or not. :)
    ./bin/checkdone.sh
    

You can optionally just update your path to include this ./bin directory and call the scripts that way as well. Hence:

# Update the path to include the bin directory:
export PATH="$(pwd)/bin:$PATH"

# Now you can call the scripts identified above from anywhere...