Commit Graph

8 Commits

Author SHA1 Message Date
Simone Robutti 8a27de8981
add tests (#44)
* fixed test_window_no_event

* added strategy tests

* removed unused code

* added config tests

* added more config tests

* refactored tests

* updated pytest
2021-07-18 18:23:30 +02:00
Simone Robutti 9578f18078
first run (#36)
* added settings as CLI option

* added group missing error

* comments

* testing empty events

* fixed transaction

* main is working

* added logging and fixed publication

* refactored some publication code

* removed redundant field

* storage: query: Work around https://github.com/tortoise/tortoise-orm/issues/419 .

* storage: query: Update testing environment check.

* review

* tests: models: Test `MobilizonEvent.compute_status`.

Co-authored-by: Giacomo Leidi <goodoldpaul@autistici.org>
2021-07-12 22:17:49 +02:00
SlyK182 de3e503cd6
Notification system (#13)
* Fixed typo

* Added proper exceptions for publishers

* Updated publishers logics: using messengers to allow publications without events

* Added new exception 'InvalidSettings'

* Updated notifiers and publishers: retrieve credentials and destination from config, use only message/event in constructors, lesser refactoring

* Updated publishers' tests

* Updated notifiers and publishers config for Telegram service, updated settings.toml file

* Updated 'post()' method and removed useless config checks for Telegram bot

* Added jinja2 template management for message formatting methods

* Manage message validation in publishers' run() method

* Better config management for notifiers and publishers

* Lesser update to logging and error-raising management (#23)
2021-07-05 21:44:11 +02:00
Simone Robutti df837b17b6 changed visiblity log methods in publisher 2021-05-02 11:27:07 +02:00
Simone Robutti a45c2c19ec added test predicates 2021-05-02 11:23:31 +02:00
Simone Robutti fabc1e7eff added predicates 2021-05-02 10:47:38 +02:00
Simone Robutti a6a14d2689 changed logger to be more pythonic 2021-05-02 10:24:46 +02:00
ComradeSlyK b60971206f Add abstract functioning for publishers, mock-up for Telegram publisher 2021-05-02 10:07:52 +02:00