Skip to content

Refactor duplicated OrderedDict/DataFrame return logic in clearsky models #2682

@aman-coder03

Description

@aman-coder03

While reading clearsky.py, I noticed this TODO comment in bird():

TODO: be DRY, use decorator to wrap methods that need to return either
OrderedDict or DataFrame instead of repeating this boilerplate code

A few clearsky model functions (ineichen, simplified_solis, bird) repeat the same pattern of returning either an OrderedDict or a DataFrame depending on the input type.

It might be cleaner to introduce a small decorator to handle this logic and remove the duplicated boilerplate.

Happy to work on this if it sounds good.

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