Telegram module #10

Merged
skobkin merged 19 commits from feature_telegram into master 2022-05-30 20:54:27 +00:00
Collaborator

telegram module. Closes #2 #7.

Two service classes:

  • Notifier class
  • CommandProcessor class

Two middlewares:

  • UserAuthMiddleware
  • ExceptionHandlerMiddleware

One exception for usage in the code called by the bot:

  • DisplayableException

Merge ONLY after #9 is merged.

`telegram` module. Closes #2 #7. Two service classes: * `Notifier` class * `CommandProcessor` class Two [middlewares](https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples/middleware): * `UserAuthMiddleware` * `ExceptionHandlerMiddleware` One exception for usage in the code called by the bot: * `DisplayableException` Merge **ONLY** after #9 is merged.
skobkin added this to the MVP 0.1 milestone 2022-05-01 23:45:43 +00:00
skobkin added the
new feature
label 2022-05-01 23:45:43 +00:00
skobkin self-assigned this 2022-05-01 23:45:43 +00:00
skobkin added 2 commits 2022-05-01 23:45:44 +00:00
skobkin added a new dependency 2022-05-01 23:45:57 +00:00
skobkin added a new dependency 2022-05-01 23:48:10 +00:00
skobkin added a new dependency 2022-05-01 23:52:06 +00:00
skobkin force-pushed feature_telegram from 01dda4fafe to aa75492716 2022-05-02 12:55:08 +00:00 Compare
skobkin force-pushed feature_telegram from aa75492716 to eba2ab2252 2022-05-02 14:55:45 +00:00 Compare
skobkin added 1 commit 2022-05-02 15:11:22 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
20849ada60
telegram. Some pylama tweaks.
skobkin added 1 commit 2022-05-02 15:18:14 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
a3a38a856e
telegram. Registering handlers in CommandProcessor. Some docstrings added.
skobkin force-pushed feature_telegram from a3a38a856e to d39e046af2 2022-05-02 15:27:55 +00:00 Compare
skobkin added 1 commit 2022-05-02 15:30:22 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
d201850956
pylama. Hiding pylama installation in Drone CI logs.
skobkin added 1 commit 2022-05-02 16:14:14 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
1807424586
telegram. Implementing Telegram bot run script.
skobkin added 1 commit 2022-05-02 20:41:28 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
8cb5b4733a
telegram. Making more detailed logic of notification. Slight refactoring.
skobkin added 1 commit 2022-05-02 20:44:17 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
6c83447eb8
telegram. Code style changes.
skobkin force-pushed feature_telegram from 6c83447eb8 to ec6d707a56 2022-05-02 20:45:48 +00:00 Compare
skobkin force-pushed feature_telegram from ec6d707a56 to 74bd517238 2022-05-29 21:34:00 +00:00 Compare
skobkin force-pushed feature_telegram from 74bd517238 to 305f1afa3c 2022-05-29 21:36:34 +00:00 Compare
skobkin added 2 commits 2022-05-30 00:02:12 +00:00
skobkin added 1 commit 2022-05-30 00:17:14 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
9e4488b204
#7 Code style changes recommended by pylint.
skobkin force-pushed feature_telegram from 9e4488b204 to 3032c642be 2022-05-30 00:24:09 +00:00 Compare
skobkin force-pushed feature_telegram from 3032c642be to 882b4df5e1 2022-05-30 00:33:07 +00:00 Compare
skobkin changed title from WIP: Telegram package to WIP: Telegram module 2022-05-30 00:34:30 +00:00
skobkin added 1 commit 2022-05-30 00:35:18 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
af73458e29
#7 Removing unnecessary statement.
skobkin changed title from WIP: Telegram module to Telegram module 2022-05-30 00:35:27 +00:00
skobkin requested review from Miroslavsckaya 2022-05-30 00:35:34 +00:00
Author
Collaborator

@Miroslavsckaya This PR is more or less ready. Check it out when you have time.

@Miroslavsckaya This PR is more or less ready. Check it out when you have time.
skobkin added the
refactoring
label 2022-05-30 00:38:04 +00:00
skobkin reviewed 2022-05-30 08:52:31 +00:00
@ -11,2 +10,3 @@
"""Create a database file if not exists."""
self.conn = sqlite3.connect(path)
# TODO: think about removing check_same_thread=False
self.conn = sqlite3.connect(path, check_same_thread=False)
Author
Collaborator

check_same_thread=False is a bad solution which can backfire on us in the future.

But I didn't see any other good solution at the time.

`check_same_thread=False` is a bad solution which can backfire on us in the future. But I didn't see any other good solution at the time.
skobkin added 2 commits 2022-05-30 19:58:56 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
3bffd32df0
#7 Notifier now sends messages in HTML.
skobkin added 1 commit 2022-05-30 20:22:06 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
f9ffdac38a
#7 Notifier is now considering Telegram API sendMessage() rate limit.
skobkin added 1 commit 2022-05-30 20:23:25 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
8554689fef
#7 Notifier counter reset fix.
skobkin added 1 commit 2022-05-30 20:29:21 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
54cdb3f368
#7 Notifier inconsistent naming fix.
Miroslavsckaya approved these changes 2022-05-30 20:52:00 +00:00
skobkin merged commit 2e44df0bbd into master 2022-05-30 20:54:27 +00:00
skobkin deleted branch feature_telegram 2022-05-30 20:54:27 +00:00
skobkin referenced this issue from a commit 2022-05-30 20:54:27 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Blocks
#2 Telegram API integration
Miroslavsckaya/tg_rss_bot
Depends on
#9 Python venv
Miroslavsckaya/tg_rss_bot
Reference: Miroslavsckaya/tg_rss_bot#10
No description provided.