mozilla / mozilla/experimenter
Break up experiments/constants.py
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 151
- Forks
- 229
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 212
Description
constants.py has become a dumping ground:
- Application configurations classes
- Channels
- Randomization Units
- Changelog events
- Firefox Labs metadata
- The Application text choices
- Application configuration instances
- The NimbusConstants class:
- a bunch of unrelated constants
- a bunch of unrelated TextChoices
- a hojillion error strings
This should be split up by use / function:
- Applications should go in a new "applications" Django app (experimenter/applications)
- Errors should go relative to where they are triggered (e.g., serializer errors should go in api/errors.py or similar)
etc.
┆Issue is synchronized with this Jira Task
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 by reading constants.py and tracing each listed group to its callers; the issue specifically points to experimenter/applications for application code and api/errors.py (or similar) for serializer errors. Map the remaining constants by use before choosing destinations. Done means the dumping ground is split by function without leaving the listed responsibilities together.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100