Refactor and clean old code
Refactor and clean old code
New features
- New CLI based on
click, with auto-generated help text (--helpto show it) - New mode
dry-runto test the setup without updating the DB or sending notifications - Uses
poetryas package manager, using the modern and standard waypyproject.toml; the project now provides the exact dependencies versions in thepoetry.lockfile - Added possibility to disable mail notification using the CLI toggle
--no-email - Added possibility to disable Mattermost notification using the CLI toggle
--no-mattermost - Added
LICENSEfile (MIT) - Added CI to automatically build and push a Python wheel and an container image to GitLab for each new tag
- Splitted Mattermost notifications into multiple posts to not reach the maximum allowed length
Changes
- Split the project in multiple modules, to make it modular and increase maintenability
- Uses
defusedxmlas a replacement of standard CPythonxmlmodule to prevent attacks on its known witnesses and vulnerabilities - Fetchers configuration format is now YAML and uses a new structure, see below
- Improved errors handling
- Changed environment variable
MM_SERVER_URLwithMM_SERVER_HOST - Changed environment variable
CONFIG_PATHwithFETCHERS_CFG(dockeronly)
Compatibility with the previous project
Database
No changes were made in the SQLite database structure, so full compatibility is expected.
Feeds configuration
All fetchers configuration must be adapted to the new syntax. The config_sample.yaml shows the new structure for each fetcher type.
Notifiers
The only change is the environment var MM_SERVER_URL that has been removed in favor of MM_SERVER_HOST.
Edited by Gaëtan Blond