Add bounds for metadata
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 287
- Forks
- 140
- Avg merge
- 6d 14h
- Merged PRs (30d)
- 18
Description
Desired capability or behavior.
Add additional information to metadata to allow for specifying valid values for a given variable. This would be optional and allow Aviary to check if values in AviaryValues are within the valid bounds and raise an error if they are not. The limitation would be this check can only be done for input variables, and not calculated variables (outputs). We could have a check after the run (with warnings instead of errors??) to alert users if calculated values strayed outside of valid bounds.
Suggested implementation.
Add "minimum" and "maximum" fields to metadata. Add min/max bounds to all variables where that makes sense. Add new checks to AviaryValues alongside the typing checks to see that any value added to them is "allowable", raise and error or warning (depending on what we decide to implement) if they are not. Remove preprocessor checks that are replaced by this automated system.
Optionally look into a check after optimization on the final output. This could maybe be done by dumping every OM variable that exists in the hierarchy into an AviaryValues object to re-use the existing checks. That could then be spun into a report (the csv of the output AviaryValues, that could then be re-used for off-design runs).
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 by tracing metadata handling, AviaryValues typing checks, and the preprocessor checks that may be replaced. Identify how minimum and maximum fields would flow into validation for input variables, and separate the unresolved post-optimization output check from the core scope. Done should include bounds where appropriate and defined behavior for out-of-range values, including whether to raise errors or warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100