Allowing default values for missing required parameters#956
Merged
Bachibouzouk merged 8 commits intodevfrom Oct 24, 2022
Merged
Allowing default values for missing required parameters#956Bachibouzouk merged 8 commits intodevfrom
Bachibouzouk merged 8 commits intodevfrom
Conversation
This is an object with methods to get the default, value, description, unit, type of a given parameter from the .csv file listing all parameters properties
If set_default is set to True, the parameter comparator will then set any missing required parameter by their default value
2 tasks
3c70c06 to
cb42b8f
Compare
9c64548 to
94f29ad
Compare
94f29ad to
2c785b7
Compare
This was referenced Oct 16, 2022
Merged
ciaradunks
approved these changes
Oct 24, 2022
| - The if statement for adapting `MAXIMUM_CAP` for non-dispatchable production assets is now based on the value of `DISPATCHABILITY` and not on the existence of the key `FILENAME` in the `asset_dict` (#939) | ||
| - The default values for the constraints are now located in `src/constants.py` under the variable `DEFAULT_CONSTRAINT_VALUES` (#953) | ||
|
|
||
| - When a required parameter is missing its default value, defined in `docs/MVS_parameters_list.csv`, is used instead of raising an error (#956) |
Contributor
There was a problem hiding this comment.
Suggested change
| - When a required parameter is missing its default value, defined in `docs/MVS_parameters_list.csv`, is used instead of raising an error (#956) | |
| - When a required parameter is missing a value, a default value defined in `docs/MVS_parameters_list.csv` is used instead of raising an error (#956) |
Co-authored-by: ciaradunks <[email protected]>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to open-plan-tool/gui#38
Changes proposed in this pull request:
PARAMETER_DOCinutilscan be used to get information about a parameter directly from the csv filedocs/MVS_parameters_list.csvdocs/MVS_parameters_list.csv, is used instead of raising an errorThe following steps were realized, as well (if applies):
black . --exclude docs/)EXECUTE_TESTS_ON=master pytest)