openlibhums / openlibhums/janeway
Use constants in `log_dict`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 238
- Forks
- 97
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 8
Description
Problem
The email logs rely on a dictionary that is passed through about 5-6 layers of function calls, ending up here:
With the keys being strings, it is easy to introduce errors that result in inaccurate or incomplete logs. See #3810.
Proposed solution
Refactor using constants.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/utils/notify_plugins/email_log.py at lines 18-25, then trace the dictionary through the five to six function-call layers described in the issue. Identify the repeated string keys and replace their use with constants without changing the email log contents. Done means the logs remain accurate and the key-name errors described in #3810 are prevented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100