Refactor - Mail sending and EmailHandler
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Start with the EmailHandler class: remove the unused self.environment in init, then make setup_smtp_server() populate self.server so get_or_create_smtp_server() works as a getter. Next, move the body and subject strings from each send() method into a new mail_templates.py, and add logging around the actual sending. Done when the checklist items are ticked and the existing mail tests still pass. Renaming the send_() methods and rewording the mails need maintainer input.
索引モデルが issue の本文から書いたものです。
説明
EmailHandler specific:
__init__():
- Remove
self.environmentas it is unused
get_or_create_smtp_server()
- method should be fully dynamic. For that
_setup_smtp_server()should not return a server instance but populate theself.serverattribute. Thenget_or_create_smtp_server()calls it if server is not set or returns as if it was a getter.
All send_*() Methods:
- create
mail_templates.pyfile dedicated to store capitalized variables to store Mail body and subject strings - Move mail strings from the
send_*()methods to the newmail_templates.py - Move Subject strings from the
send_*()methods to the newmail_templates.py - If necessary, implement method handling formatting of mail strings
- rename
send_*()methods to more appropriate names where necessary. - Write short doc-strings to associate the methods with situations they are used in or the procedure they follow
- Add error handling/logging to the actual sending of mails
- Refactor/Rephrase mails
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 29分
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ClockGU/clockwork-backend のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ClockGU/clockwork-backend#169 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
ClockGU/clockwork-backend#165 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
ClockGU/clockwork-backend#164 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
ClockGU/clockwork-backend#163 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ClockGU/clockwork-backend#162 ·
メンテナーはふだん 1 日以内に返信
ClockGU/clockwork-backend の issue をすべて見る
似ている issue
-
bug ready-for-dev
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
OpenHands/extensions#897 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
tensorflow/datasets#11253 ·
メンテナーはふだん 1 日以内に返信
-
fix(core): a config section with all keys commented out crashes startup対応中かも @Aryanbhargava18 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
kubeflow/mcp-server#512 ·
メンテナーはふだん 1 日以内に返信
-
Stop trusting the compromised eMudhra CA certificates対応中かも @anth-volk が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
PolicyEngine/uk-triple-lock#54 ·
メンテナーはふだん 1 日以内に返信
-
DBFS append mode silently overwrites existing files対応中かも @IlyaKhalafi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
fsspec/filesystem_spec#2429 ·
メンテナーはふだん 1 日以内に返信