Remove PM parser - #230
Merged
Merged
Remove PM parser#230
Conversation
The OpenAPI document has no system base, so from_openapi defaulted every PSS/E and Matpower case to 100 MVA. make_system also validated the built System unless runchecks=false; system_from_openapi now does the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…enapi Every switched builder produces the same System as make_system did, component for component, when built both ways. build_psse_ACTIVSg2000_sys also stops splatting its kwargs positionally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PowerFlowFileParser's readers call the branch, three-winding and HVDC name formatters with bus names rather than ACBus objects, so the formatters now take strings. The VSC formatter is registered under vsc_line_name_formatter, the key both parsers read; under vscline_name_formatter it was never applied. solved_case is taken explicitly so it reaches PowerModelsData. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PowerFlowFileParser rejects data make_system skipped silently: the TNEP cases' ne_branch candidate branches and RTS_GMLC.m's storage unit in the gen table. Both are dropped by exact match before conversion, so every Matpower fixture builds the System it did before. case5_strg's storage units are now named storage-1/storage-2, PowerFlowFileParser's naming, instead of 1/2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The inverted-band test now builds frankenstein_70.raw, whose T1 carries the inverted VMA1/VMI1, plus a copy with RMA1/RMI1 swapped, instead of calling make_system's control-field helper directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every PSS/E and Matpower case now goes PowerFlowFileParser -> OpenAPI document -> PowerSystems, so make_system, system_via_power_models, the generator mapping they read, and the fuel/prime-mover helpers only they used are deleted. PSSE_DYR_MAPPING_FILE moves next to the .dyr parser, its one reader; Unicode was only imported for those helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Fix the stale-fixture helper’s absent-section failure and overly broad deletion behavior.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Removes the legacy PowerModels parser and migrates PSS/E and Matpower construction to the OpenAPI pipeline.
Changes:
- Removes obsolete parser code, helpers, mappings, and dependency.
- Updates builders, metadata reimport, fixtures, and parser tests.
- Adds handling for known stale Matpower fixture data.
| File | Summary | Findings |
|---|---|---|
test/test_transformer_parsing.jl |
Updates transformer parsing tests. | — |
test/test_switched_shunt_parsing.jl |
Updates switched-shunt parsing tests. | — |
src/PowerSystemCaseBuilder.jl |
Updates parser includes and imports. | — |
src/parsers/psse_metadata_reimport.jl |
Migrates metadata reimport to OpenAPI. | — |
src/parsers/psse_dynamic_data.jl |
Relocates dynamic mapping configuration. | — |
src/parsers/power_models_data.jl |
Removes the legacy parser. | — |
src/parsers/openapi_pipeline.jl |
Adds OpenAPI-based system construction. | — |
src/parsers/known_stale_fixture_data.jl |
Handles stale Matpower fixture data. | Critical: absent sections can cause KeyError; global deletions may silently discard unrelated data. |
src/parsers/generator_mapping_pm.yaml |
Removes obsolete generator mappings. | — |
src/parsers/common.jl |
Removes legacy parser utilities. | — |
src/library/psytest_library.jl |
Migrates fixture builders to OpenAPI. | — |
src/library/pssetest_library.jl |
Migrates fixture builders to OpenAPI. | — |
src/library/psitest_library.jl |
Migrates fixture builders to OpenAPI. | — |
src/library/psidtest_library.jl |
Migrates fixture builders to OpenAPI. | — |
src/library/psid_library.jl |
Migrates fixture builders to OpenAPI. | — |
src/library/psi_library.jl |
Migrates fixture builders to OpenAPI. | — |
src/library/matpowertest_library.jl |
Migrates Matpower builders to OpenAPI. | — |
Project.toml |
Removes the unused Unicode dependency. | — |
.claude/CLAUDE.md |
Updates parser architecture documentation. | — |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+140
to
+141
| for section in KNOWN_UNREAD_MATPOWER_SECTIONS | ||
| delete!(data, section) |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
jd-lara
approved these changes
Sep 24, 2026
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.

No description provided.