Add PSLF EPC reader + Improve coverage of PW vintages#125
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds read support for GE PSLF .epc cases and expands PowerWorld binary/display coverage, wiring the new format through the Rust hub, CLI, Python stubs, and C ABI docs while keeping PSLF read-only.
Changes:
- Implement PSLF
.epcreader that maps core power-flow data intoNetwork, retains source text, and emits read warnings for unsupported sections. - Add PSLF format inference/aliases through
parse_file/parse_str, Rust re-exports, CLI--from, and Python type stubs; explicitly reject PSLF as a conversion target. - Broaden PowerWorld
.pwbvintage support (additional header constants, resilience improvements) and make.pwdparsing return metadata even when the substation table is absent; add/extend tests and docs accordingly.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Document PSLF EPC as a supported (read-only) input and update format table/examples. |
| python/powerio/_powerio.pyi | Add Pslf to the source_format literal typing. |
| python/powerio/init.pyi | Add Pslf to the Network.source_format literal typing. |
| python/powerio/init.py | Update Python package docstring and docs for PSLF read warnings / convert behavior. |
| powerio/tests/pslf.rs | Add integration tests for PSLF aliases, .EPC inference, and read-only target guard. |
| powerio/tests/powerworld_pwd.rs | Update tests to match new .pwd behavior when no substation identity table exists. |
| powerio/tests/powerworld_pwb.rs | Expand .pwb coverage tests (more header constants, truncation safety, corpus-gated parity checks). |
| powerio/src/network.rs | Add SourceFormat::Pslf. |
| powerio/src/lib.rs | Re-export PSLF parser and update crate-level docs to mention read-only PSLF EPC. |
| powerio/src/format/pslf.rs | New PSLF EPC reader implementation mapping EPC sections into Network + warnings/extras retention. |
| powerio/src/format/powerworld/pwd.rs | Change .pwd parsing to return metadata with empty substations when identity table is absent. |
| powerio/src/format/powerworld/pwb.rs | Expand .pwb vintage support and robustness (header constants, table search heuristics, truncation safety). |
| powerio/src/format/mod.rs | Wire PSLF into the format hub: aliases, .epc inference, and read-only handling (not in TargetFormat). |
| powerio/README.md | Update crate README to mention PSLF .epc and .pwb as read-only inputs. |
| powerio-py/src/lib.rs | Update Python binding docstring for parse_str to include pslf/epc. |
| powerio-matrix/src/lib.rs | Re-export parse_pslf from the matrix crate’s umbrella re-exports. |
| powerio-cli/src/main.rs | Add CLI --from pslf/epc and reject PSLF as a convert --to target. |
| powerio-capi/src/lib.rs | Update C ABI documentation comments to include pslf/epc as accepted inputs. |
| powerio-capi/include/powerio.h | Update header docs to include pslf/epc as accepted inputs. |
| docs/powerworld.md | Update PowerWorld vintage documentation and coverage matrix; note new behaviors (including header 554). |
| docs/format-fidelity.md | Document PSLF shunt per-unit interpretation and PSLF read-only fidelity notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Adds read support for GE PSLF
.epcpower flow cases.Network..epcdetection andpslf/epcaliases throughparse_file,parse_str, CLI--from, Rust re-exports, and Python type stubs..EPCinference, and the read only target guard.Improve coverage of .pwb and .pwd vintages based on UIUC corpus
Validation
cargo fmt --all --checkcargo clippy --all-targetscargo testcargo test -p powerio --test pslf