NatLabRockies / NatLabRockies/EnergyPlusRegressionTool
[modernize] Use proper Enums and remove get_all
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 10
- Forks
- 18
- Avg merge
- 21m
- Merged PRs (30d)
- 1
Description
Transition to use Enums, which makes get_all unecessary
from enum import Enum
class ReportingFreq(Enum):
DETAILED = "Detailed"
TIME_STEP = "Timestep"
HOURLY = "Hourly"
DAILY = "Daily"
MONTHLY = "Monthly"
RUN_PERIOD = "RunPeriod"
ENVIRONMENT = "Environment"
ANNUAL = "Annual"
In [2]: [x for x in ReportingFreq]
Out [2]:
[<ReportingFreq.DETAILED: 'Detailed'>,
<ReportingFreq.TIME_STEP: 'Timestep'>,
<ReportingFreq.HOURLY: 'Hourly'>,
<ReportingFreq.DAILY: 'Daily'>,
<ReportingFreq.MONTHLY: 'Monthly'>,
<ReportingFreq.RUN_PERIOD: 'RunPeriod'>,
<ReportingFreq.ENVIRONMENT: 'Environment'>,
<ReportingFreq.ANNUAL: 'Annual'>]
(each enum has a .name and a .value attribute too)
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 epregressions/structures.py at lines 17-33, then inspect the existing get_all implementation and its callers. Identify the enum-like definitions covered by the issue and verify that their existing string values remain available after the transition; done means get_all is no longer needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100