Core Library
Ce contenu n’est pas encore disponible dans votre langue.
Contributing to the Apprise Core Library
Section titled “Contributing to the Apprise Core Library”Thank you for your interest in contributing to Apprise.
Contributions are welcome across code, bug fixes, CLI improvements, documentation, and deployment tooling.
This repository is the core application and CLI layer that makes up the heart of Apprise.
Development Requirements
Section titled “Development Requirements”Supported Python Versions
Section titled “Supported Python Versions”Apprise supports Python 3.9 and newer. All contributions must remain compatible with the lowest supported version unless explicitly discussed.
Tooling Expectations
Section titled “Tooling Expectations”Apprise development uses a small toolchain:
- tox for environment orchestration. It leverages the following:
- pytest for testing;
- ruff for linting and formatting
- coverage for reporting
- pyproject.toml as the authoritative project definition
Local development environments are expected to mirror CI behaviour.
Retrieve from GitHub
Section titled “Retrieve from GitHub”git clone git@github.com:caronc/apprise.gitcd appriseInstall Tox
Section titled “Install Tox”The most common way to install this dependency is:
pip install toxIf you are not using a virtual environment or have proper rights on the machine you’re using, you may need to use pip3 or add the --user flag:
pip3 install tox --userDevelopment Environment
Section titled “Development Environment”Apprise works best just using a simple bare metal setup. The following commands can assist you:
Run the apprise cli from within the pulled code against any changes you made:
# Print version and exittox -e apprise -- -vSimply use tox -e apprise -- to act equivalently to the apprise CLI in an installed environment:
# Test a new or modified plugin (example: foobar://)tox -e apprise -- -t "my title" -b "my body" \ "foobar://credentials/direction?options="Running Tests
Section titled “Running Tests”Test your added test coverage in tests/ a similar way:
# 'minimal' just pulls in less dependencies which is usually adequate:tox -e minimalA Full QA can be run by swapping minimal with qa.
# 'qa' loads all dev librariestox -e qaThere is a ‘lot’ of tests; Apprise aims to maintain 100% test coverage. To avoid running through everything and only focus on your new tests, you can scope the tests runner to do this like so;
# use -k to filter the tests are run:tox -e minimal -- -k "test_foobar"Quality Assurance and Testing
Section titled “Quality Assurance and Testing”Keep linting and formatting consistent across contributor environments:
# Lint (calls ruff under the hood)tox -e lintIf you get an error with the above, you can use the auto-formatting which fixes most mistakes.
# Auto-formattox -e formatTest Expectations
Section titled “Test Expectations”Changes to core behaviour must include tests unless there is a strong justification.
General expectations:
- Test coverage for Apprise to remain at 100%
- Tests should reflect actual runtime behaviour
- Edge cases should be explicitly covered
- Existing test patterns should be followed
- Logging noise should be avoided in tests
Tests are part of the public contract of the project.
Pull Request Guidelines
Section titled “Pull Request Guidelines”Before submitting a pull request:
- Tests pass locally for relevant environments
- Linting and formatting checks pass
- Changes are scoped and well-described
- Behavioural changes include rationale
If you added a new plugin, ensure that:
- The
README.mdin the root of the Apprise Repository is updated to reflect the change if necessary. - The
packaging/redhat/apprise.specis updated to reflect the new service - The
pyproject.tomlsection calledkeywordsincludes the name of the new plugin - Documentation has been prepared for the Apprise Docs Repository (later reflected on https://appriseit.com).
Pull requests are reviewed for correctness, maintainability, and long-term impact.
Quick Checklist Before You Submit
Section titled “Quick Checklist Before You Submit”- Your change includes tests when practical.
tox -e qapasses locally.tox -e lintpasses locally.- You run
tox -e formatwhen formatting changes are needed. - Your pull request description clearly explains what changed and why.
Licensing and Attribution
Section titled “Licensing and Attribution”Apprise is released under the BSD 2-Clause licence.
All contributions must be compatible with this licence, and new files should include appropriate headers where required.