cjaiello / cjaiello/Slack-Karma-Bot
Create helper functions and use them within the karma function
- Dominant language
- Python
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
The `karma` function in `app.py` is huge and should be broken down into helper functions. Note that there are also issues open where we need a [slack_client.py file](https://github.com/cjaiello/Slack-Karma-Bot/issues/7) and a [logger file](https://github.com/cjaiello/Slack-Karma-Bot/issues/6), so for this issue, create helper functions in `app.py` for things not related to talking to slack or logging.
For example, the "karma math" could be its own helper function(s):
You could maybe even make a `Karma` class, with `value` and `was_corrected` attributes, potentially!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the karma function in app.py and tracing its non-Slack, non-logging responsibilities. Extract the karma math and other suitable logic into helper functions in app.py, or a Karma class if that design fits, while preserving the existing behavior. Done means karma is no longer monolithic and Slack communication and logging remain outside this issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100