graphite-project / graphite-project/graphite-web
Consolidate `add` and `offset` functions
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
As I see and discuss with @dzhdanov, add and offset are pretty much the same functions with different descriptions and small implementation details.
Describe the solution you'd like
One function should be an alias to another with only one implementation
Describe alternatives you've considered
The alternative would be to leave it as it is, but now it doesn't look good, even from the documentation side: add vs offset
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 webapp/graphite/render/functions.py, at the cited implementations of add and offset. Compare their behavior and descriptions, then consolidate them so one function aliases the other while preserving the existing interfaces. Done means there is only one implementation and both documented functions retain the intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100