NREL-Sienna / PowerSystems.jl

Data structures in Julia to enable power systems analysis. Part of the Scalable Integrated Infrastructure Planning Initiative at the National Renewable Energy Lab.
https://www.nrel.gov/analysis/sienna.html
BSD 3-Clause "New" or "Revised" License
306 stars 76 forks source link

Add `is_component_in_aggregation_topology` #1146

Closed GabrielKS closed 2 months ago

GabrielKS commented 2 months ago

For PowerAnalytics/ComponentSelector-related reasons, it is useful to be able to test whether a given Component is within a given AggregationTopology without having a reference to the relevant System. This exposes that functionality. I also made the existing get_component_in_aggregation_topology test more thorough.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.61%. Comparing base (c40ec43) to head (a8708c2). Report is 2 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/NREL-Sienna/PowerSystems.jl/pull/1146/graphs/tree.svg?width=650&height=150&src=pr&token=AEzJsDhpxL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna)](https://app.codecov.io/gh/NREL-Sienna/PowerSystems.jl/pull/1146?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna) ```diff @@ Coverage Diff @@ ## main #1146 +/- ## ======================================= Coverage 84.60% 84.61% ======================================= Files 177 177 Lines 8108 8111 +3 ======================================= + Hits 6860 6863 +3 Misses 1248 1248 ``` | [Flag](https://app.codecov.io/gh/NREL-Sienna/PowerSystems.jl/pull/1146/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/NREL-Sienna/PowerSystems.jl/pull/1146/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna) | `84.61% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/NREL-Sienna/PowerSystems.jl/pull/1146?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna) | Coverage Δ | | |---|---|---| | [src/PowerSystems.jl](https://app.codecov.io/gh/NREL-Sienna/PowerSystems.jl/pull/1146?src=pr&el=tree&filepath=src%2FPowerSystems.jl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL1Bvd2VyU3lzdGVtcy5qbA==) | `100.00% <ø> (ø)` | | | [src/base.jl](https://app.codecov.io/gh/NREL-Sienna/PowerSystems.jl/pull/1146?src=pr&el=tree&filepath=src%2Fbase.jl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL2Jhc2Uuamw=) | `89.32% <100.00%> (+0.03%)` | :arrow_up: |