-
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements logic to handle optional extra columns in the tabular converter, addressing issue #338. The feature allows specifying columns that should be included in extra_info if present but won't cause conversion failure if missing.
Key Changes:
- Added
allow_missingparameter throughout the column definition parsing chain to support optional columns - Implemented
optional_extrawrapper in column definitions to mark columns as optional - Enhanced error handling to gracefully skip missing optional columns while preserving required column behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/power_grid_model_io/converters/tabular_converter.py | Core implementation of optional_extra logic with allow_missing parameter propagation and empty DataFrame handling for missing columns |
| tests/unit/converters/test_tabular_converter.py | Comprehensive test coverage for optional_extra feature including edge cases and integration tests |
| docs/converters/vision_converter.md | Documentation explaining optional_extra syntax, behavior, and use cases for Vision Excel exports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jerry Guo <6221579+Jerry-Jinfeng-Guo@users.noreply.github.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jerry Guo <6221579+Jerry-Jinfeng-Guo@users.noreply.github.com>
Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jerry Guo <6221579+Jerry-Jinfeng-Guo@users.noreply.github.com>
Signed-off-by: Jerry Guo <Jerry.Jinfeng.Guo@alliander.com>
|



Closes #338
In this PR:
optional_extra