-
Notifications
You must be signed in to change notification settings - Fork 12
Logic to handle optional_extra in Vision Excel converter input #344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
60011ca
logic to handle optional_extra
Jerry-Jinfeng-Guo 7f00482
ignored file
Jerry-Jinfeng-Guo 5d78037
Update src/power_grid_model_io/converters/tabular_converter.py
Jerry-Jinfeng-Guo e375135
added tests for optional_extra fields
Jerry-Jinfeng-Guo d357c8a
append unit test for coverage
Jerry-Jinfeng-Guo ef1ce32
Update src/power_grid_model_io/converters/tabular_converter.py
Jerry-Jinfeng-Guo 826b266
Update src/power_grid_model_io/converters/tabular_converter.py
Jerry-Jinfeng-Guo a9bf00e
remove unused variable
Jerry-Jinfeng-Guo c9b3816
Update src/power_grid_model_io/converters/tabular_converter.py
Jerry-Jinfeng-Guo 1e4b625
Update src/power_grid_model_io/converters/tabular_converter.py
Jerry-Jinfeng-Guo 2f84ac9
made kwarg; add specfic tests
Jerry-Jinfeng-Guo 64c2132
same bahavior extra and optional extra w.i.c.t duplicated entries
Jerry-Jinfeng-Guo 8323616
fix test
Jerry-Jinfeng-Guo ad5ea50
Merge branch 'main' into feature/optional-extra
mgovers 0fe7a4c
test showing the ordering invariance
Jerry-Jinfeng-Guo 30d3a15
revert wrong commit
Jerry-Jinfeng-Guo 3bf7f7f
fix the type error and old tests not up-to-date with new logic
Jerry-Jinfeng-Guo 15c24a6
Merge branch 'main' into feature/optional-extra
Jerry-Jinfeng-Guo fac23ad
fix test after merging from main
Jerry-Jinfeng-Guo 1051478
format markdown
Jerry-Jinfeng-Guo 3829df7
markdown lint fix
Jerry-Jinfeng-Guo 734345b
resolve comments
Jerry-Jinfeng-Guo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
| # | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| --- | ||
| # Test mapping file for optional_extra feature | ||
| grid: | ||
| nodes: | ||
| node: | ||
| id: | ||
| auto_id: | ||
| key: node_id | ||
| u_rated: voltage | ||
| extra: | ||
| - ID | ||
| - Name | ||
| - optional_extra: | ||
| - GUID | ||
| - StationID | ||
|
|
||
| units: | ||
| V: | ||
| kV: 1000.0 | ||
|
|
||
| substitutions: {} |
Binary file not shown.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
|
||
| SPDX-License-Identifier: MPL-2.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
| # | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| --- | ||
| # Test mapping file for optional_extra feature with Vision Excel format | ||
| id_reference: | ||
| nodes_table: Nodes | ||
| number: Number | ||
| node_number: Node.Number | ||
| sub_number: Subnumber | ||
|
|
||
| grid: | ||
| Nodes: | ||
| node: | ||
| id: | ||
| auto_id: | ||
| key: Number | ||
| u_rated: Unom | ||
| extra: | ||
| - ID | ||
| - Name | ||
| - optional_extra: | ||
| - GUID | ||
| - StationID | ||
|
|
||
| units: | ||
| V: | ||
| kV: 1000.0 | ||
|
|
||
| substitutions: {} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
|
||
| SPDX-License-Identifier: MPL-2.0 |
Binary file not shown.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
|
||
| SPDX-License-Identifier: MPL-2.0 |
26 changes: 26 additions & 0 deletions
26
tests/data/vision/vision_optional_extra_ordering_invariance.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| id_reference: | ||
| nodes_table: Nodes | ||
| number: Number | ||
| node_number: Node.Number | ||
| sub_number: Subnumber | ||
|
|
||
| grid: | ||
| Nodes: | ||
| node: | ||
| id: | ||
| auto_id: | ||
| key: Number | ||
| u_rated: Unom | ||
| extra: | ||
| - optional_extra: | ||
| - GUID | ||
| - StationID | ||
| - ID | ||
| - Name | ||
| - GUID | ||
|
|
||
| units: | ||
| V: | ||
| kV: 1000.0 | ||
|
|
||
| substitutions: {} |
3 changes: 3 additions & 0 deletions
3
tests/data/vision/vision_optional_extra_ordering_invariance.yaml.license
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
|
||
| SPDX-License-Identifier: MPL-2.0 |
Binary file not shown.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| SPDX-FileCopyrightText: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org> | ||
|
|
||
| SPDX-License-Identifier: MPL-2.0 |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.