Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ComponentSelector from PowerAnalytics to InfrastructureSystems: PA portion #2

Merged
merged 5 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/PowerAnalytics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export categorize_data
export no_datetime

export ComponentSelector, ComponentSelectorElement, ComponentSelectorSet
export NAME_DELIMETER, subtype_to_string, component_to_qualified_string
export select_components, default_name, get_name, get_subselectors
export select_components, get_name, get_subselectors
export Metric, TimedMetric, TimelessMetric, ComponentSelectorTimedMetric,
ComponentTimedMetric,
SystemTimedMetric, ResultsTimelessMetric, CustomTimedMetric
Expand Down Expand Up @@ -40,9 +39,15 @@ import DataFrames: DataFrame, metadata, metadata!, colmetadata, colmetadata!
import YAML
import DataStructures: OrderedDict, SortedDict
import PowerSystems
import PowerSystems: Component, get_component, get_components, get_available
import PowerSystems:
Component,
ComponentSelector, ComponentSelectorElement, ComponentSelectorSet,
select_components, get_name, get_subselectors,
get_component, get_components,
get_available,
NAME_DELIMETER

import InfrastructureSystems
import InfrastructureSystems: get_name
import PowerSimulations
import InteractiveUtils

Expand All @@ -54,7 +59,6 @@ include("definitions.jl")
include("get_data.jl")
include("fuel_results.jl")

include("component_selector.jl")
include("metrics.jl")
include("input.jl")
include("builtin_component_selectors.jl")
Expand Down
243 changes: 0 additions & 243 deletions src/component_selector.jl

This file was deleted.

2 changes: 1 addition & 1 deletion test/test_builtin_component_selectors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name_and_type = component -> (typeof(component), get_name(component))
@test Set(name_and_type.(get_components(load_component_selector, test_sys))) ==
Set([(PowerLoad, "Bus2"), (PowerLoad, "Bus4"), (StandardLoad, "Bus3")])
@test Set(name_and_type.(get_components(storage_component_selector, test_sys2))) ==
Set([(GenericBattery, "Bat")])
Set([(EnergyReservoirStorage, "Bat")])
end

@testset "Test generator_selectors_by_fuel" begin
Expand Down
Loading