Breakthrough-Energy / Breakthrough-Energy/SwitchWrapper
Add a check that the inputs passed to prepare_inputs are consistent with each other
- Dominant language
- Python
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
# :rocket:
- [ ] Is your feature request essential for your project?
### Describe the workflow you want to enable
I wish that when I called `prepare_inputs`, there would be an informative error message if I passed a set of profiles that were not consistent with the grid.
### Describe your proposed implementation
Within `prepare_inputs`, we can create a check function to pass the grid and profiles to before we start to process them to generate inputs
Example docstring:
```
"""Check that the grid and profiles match.
:param powersimdata.input.grid.Grid grid: grid instance.
:param dict profiles: keys are {"demand", "hydro", "solar", "wind"}, values are the
corresponding pandas data frames, indexed by hourly timestamp, with columns
representing plant IDs (for hydro, solar, and wind) or zone IDs (for demand).
:raises ValueError: if the columns of the demand profile do not match with the zone IDs in the grid,
or if the columns of the {hydro/solar/wind} profiles don't match the plant IDs of each corresponding type.
"""
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.