Add all_systems() function#185
Open
luke-kiernan wants to merge 2 commits into
Open
Conversation
Closes #178 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new public helper to build every PowerSystems.System described by a SystemCatalog, returning a dictionary keyed by (category, system_name) for bulk inspection / querying workflows (Issue #178).
Changes:
- Introduces exported
all_systems(; system_catalog=..., kwargs...)to iterate the catalog and build systems, skipping failures with a warning. - Exports
all_systemsfrom the package module. - Adds a focused test covering the basic return type/shape using a single-system catalog.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/system_catalog.jl |
Adds all_systems implementation + docstring, iterating categories/systems and warning on build failures. |
src/PowerSystemCaseBuilder.jl |
Exports the newly added all_systems API. |
test/test_all_systems.jl |
Adds test_all_systems to validate return type and contents for a minimal catalog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fd2f1ed to
471d50b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #185 +/- ##
==========================================
- Coverage 92.67% 92.64% -0.03%
==========================================
Files 18 18
Lines 4475 4485 +10
==========================================
+ Hits 4147 4155 +8
- Misses 328 330 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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
all_systems()function that builds every system in the catalog and returns aDict{Tuple{DataType, String}, PSY.System}avr_type) are skipped with a warningCloses #178
Test plan
test_all_systemspasses: verifies return type, length, and contents using a single-system catalog🤖 Generated with Claude Code