Skip to content

Create the flag only_available for get_components functions #469

@daniel-thom

Description

@daniel-thom

A pattern has developed in IS/PSY where we have different methods for cases where a user wants to retrieve components that are available. For example, there is get_components and get_available_components. This is causing unnecessary developer burden because it multiplies the number of methods to create in each occurrence. At minimum, we have the two mentioned above as well as another set for methods that accept a filter function as the first argument.

We could instead implement a single method with a flag, such as the following:

function get_components(component_type::Type{<:InfrastructueSystemsComponent}, sys; only_available::bool = false)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions