[WIP] (PR74) Docs/Add a tutorial notebook - legacy to GEMS converter - #199
Open
GuillaumeMaistre wants to merge 40 commits into
Open
[WIP] (PR74) Docs/Add a tutorial notebook - legacy to GEMS converter#199GuillaumeMaistre wants to merge 40 commits into
GuillaumeMaistre wants to merge 40 commits into
Conversation
20 tasks
Co-authored-by: Antoine Oustry, PhD <58943406+aoustry@users.noreply.github.com>
Co-authored-by: Antoine Oustry, PhD <58943406+aoustry@users.noreply.github.com>
Co-authored-by: Antoine Oustry, PhD <58943406+aoustry@users.noreply.github.com>
Collaborator
Author
|
I encountered this error from GemsPy v0.1.3 inside the notebook : code : from gems_craft.study.folder import load_study
study = load_study(study_dir)error : ---------------------------------------------------------------------------
ValidationError Traceback (most recent call last)
File ~/Documents/GEMS/GEMS/.venv/lib/python3.12/site-packages/gems_craft/model/parsing.py:126, in parse_yaml_library(input, schema)
125 try:
--> 126 return schema.model_validate(tree["library"])
127 except ValidationError as e:
File ~/Documents/GEMS/GEMS/.venv/lib/python3.12/site-packages/pydantic/main.py:732, in BaseModel.model_validate(cls, obj, strict, extra, from_attributes, context, by_alias, by_name)
727 raise PydanticUserError(
728 'At least one of `by_alias` or `by_name` must be set to True.',
729 code='validate-by-alias-and-name-false',
730 )
--> 732 return cls.__pydantic_validator__.validate_python(
733 obj,
734 strict=strict,
735 extra=extra,
736 from_attributes=from_attributes,
737 context=context,
738 by_alias=by_alias,
739 by_name=by_name,
740 )
ValidationError: 1 validation error for LibrarySchema
port-types.0.area-connection
Extra inputs are not permitted [type=extra_forbidden, input_value={'injection-to-balance': ...ied-energy-bound': None}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.13/v/extra_forbidden
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
Cell In[7], line 10
6
7 study_dir = output_path / study.name
8
9 print("STUDY LOADING")
---> 10 study = load_study(study_dir)
11 print("\tStudy loaded")
12
13 optim_config = OptimConfig(
File ~/Documents/GEMS/GEMS/.venv/lib/python3.12/site-packages/gems_craft/study/folder.py:46, in load_study(study_dir)
44 for lib_file in lib_folder.glob("*.yml"):
45 with lib_file.open() as lib:
---> 46 input_libraries.append(parse_yaml_library(lib))
48 with system_file.open() as c:
49 input_study = parse_yaml_system(c)
File ~/Documents/GEMS/GEMS/.venv/lib/python3.12/site-packages/gems_craft/model/parsing.py:128, in parse_yaml_library(input, schema)
126 return schema.model_validate(tree["library"])
127 except ValidationError as e:
--> 128 raise ValueError(f"An error occurred during parsing: {e}")
ValueError: An error occurred during parsing: 1 validation error for LibrarySchema
port-types.0.area-connection
Extra inputs are not permitted [type=extra_forbidden, input_value={'injection-to-balance': ...ied-energy-bound': None}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.13/v/extra_forbidden |
Collaborator
Author
I used a deprecated antares-legacy-models library without this area-connection part |
25 tasks
25 tasks
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.
Process ID
Process:
DOC-02
Description
Solves issue #181
It adds :
Impact Analysis
It adds a new e2e test for validating the tutorial notebook behavior
Checklist
library.versioninlibraries/<library>.yml)libraries/CHANGELOG-<library>.md)doc/0_Home/4_release_notes.md)COMPATIBILITY.md)AGENTS.mdreviewed for impact and updated if needed