NREL-Sienna / InfrastructureSystems.jl

Utility package for Sienna's simulation infrastructure
https://nrel-sienna.github.io/InfrastructureSystems.jl/
BSD 3-Clause "New" or "Revised" License
35 stars 20 forks source link

Move ComponentSelector from PowerAnalytics to InfrastructureSystems: IS portion #342

Open GabrielKS opened 3 months ago

GabrielKS commented 3 months ago

This draft PR will get filled in as @tengis-nrl and I move the ComponentSelector features from PowerAnalytics to InfrastructureSystems.

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 78.16%. Comparing base (d7e6629) to head (d4c3aff). Report is 4 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/NREL-Sienna/InfrastructureSystems.jl/pull/342/graphs/tree.svg?width=650&height=150&src=pr&token=I73yjxYxgn&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna)](https://app.codecov.io/gh/NREL-Sienna/InfrastructureSystems.jl/pull/342?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 #342 +/- ## ========================================== + Coverage 77.73% 78.16% +0.42% ========================================== Files 68 69 +1 Lines 5295 5330 +35 ========================================== + Hits 4116 4166 +50 + Misses 1179 1164 -15 ``` | [Flag](https://app.codecov.io/gh/NREL-Sienna/InfrastructureSystems.jl/pull/342/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/InfrastructureSystems.jl/pull/342/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna) | `78.16% <100.00%> (+0.42%)` | :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/InfrastructureSystems.jl/pull/342?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/InfrastructureSystems.jl](https://app.codecov.io/gh/NREL-Sienna/InfrastructureSystems.jl/pull/342?src=pr&el=tree&filepath=src%2FInfrastructureSystems.jl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL0luZnJhc3RydWN0dXJlU3lzdGVtcy5qbA==) | `90.00% <ø> (ø)` | | | [src/component\_selector.jl](https://app.codecov.io/gh/NREL-Sienna/InfrastructureSystems.jl/pull/342?src=pr&el=tree&filepath=src%2Fcomponent_selector.jl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna#diff-c3JjL2NvbXBvbmVudF9zZWxlY3Rvci5qbA==) | `100.00% <100.00%> (ø)` | | ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/NREL-Sienna/InfrastructureSystems.jl/pull/342/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL-Sienna)
tengis-nrl commented 3 months ago
image
GabrielKS commented 3 months ago

We need working implementations of get_components and get_subselectors here, not just in PowerSystems, because the ComponentSelector feature is meant to be usable without PowerSystems. You'll note a TODO here about making get_available optional; if you don't think we have time to do that now, I think the IS version of get_components should just not check availability and the PSY version should.

GabrielKS commented 3 weeks ago

Rebased onto main and tests pass.