Pioreactor / Pioreactor/pioreactor
turn callback helpers in ODReader to decorators
Open
Nobody has claimed this yet.
enhancement
future
good first issue
- Dominant language
- Python
- Stars
- 149
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Current:
from pioreactor.background_jobs.od_reading import ODReader
# example of using callbacks to OD reading...
def hello(self):
print(f"Hello, {self}!")
def goodbye(self, readings):
print(f"Goodbye, {self}, witnessed {readings}!")
ODReader.add_pre_read_callback(hello)
ODReader.add_post_read_callback(goodbye)
Desired:
from pioreactor.background_jobs.od_reading import ODReader
# example of using callbacks to OD reading...
@ODReader.add_pre_read_callback
def hello(self):
print(f"Hello, {self}!")
@ODReader.add_post_read_callback
def goodbye(self, readings):
print(f"Goodbye, {self}, witnessed {readings}!")
Contributor guide
No contributing guide indexed for this repository
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 pioreactor.background_jobs.od_reading at the ODReader callback helpers and compare their current behavior with the decorator usage shown in the issue. Done means add_pre_read_callback and add_post_read_callback support the demonstrated decorator form while retaining the callback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100