Skip to content

Add all_systems() function#185

Open
luke-kiernan wants to merge 2 commits into
mainfrom
lk/all-systems
Open

Add all_systems() function#185
luke-kiernan wants to merge 2 commits into
mainfrom
lk/all-systems

Conversation

@luke-kiernan

Copy link
Copy Markdown
Collaborator

Summary

  • Adds exported all_systems() function that builds every system in the catalog and returns a Dict{Tuple{DataType, String}, PSY.System}
  • Systems that fail to build (e.g., those requiring specific kwargs like avr_type) are skipped with a warning
  • Adds test for the new function

Closes #178

Test plan

  • test_all_systems passes: verifies return type, length, and contents using a single-system catalog

🤖 Generated with Claude Code

Closes #178

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_systems from 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.

Comment thread src/system_catalog.jl
Comment thread test/test_all_systems.jl Outdated
Comment thread src/system_catalog.jl
Comment thread src/system_catalog.jl
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov

codecov Bot commented Mar 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.64%. Comparing base (abd3f09) to head (471d50b).

Files with missing lines Patch % Lines
src/system_catalog.jl 81.81% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 92.64% <81.81%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/system_catalog.jl 87.75% <81.81%> (-1.72%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: all_systems()

2 participants