Refactor output methods
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 323
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 12
Description
Goal
For every output method of the emissions tracker, we have a save_to_X param to pass.
See : https://github.com/mlco2/codecarbon/blob/master/codecarbon/emissions_tracker.py#L229-L236
This can become very complex in the long run.
A nice thing will be to have just one param called output that allows an array of strings.
Before
EmissionTracker( save_to_api=True, save_to_file= True, ...)
After
EmissionTracker( output=["api","file"] ...)
What do you think?
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 with codecarbon/emissions_tracker.py around lines 229-236, where the current save_to_X parameters are defined. Trace how each output method is configured and identify the tests covering those options. Done means output can select multiple destinations while preserving the intended output behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100