Skip to content

pvlib.irradiance.poa_horizontal_ratio should be removed #1697

Closed

Description

@mikofski

Describe the bug
Currently pvlib.irradiance.poa_horizontal_ratio is untested according to codecov

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://app.codecov.io/gh/pvlib/pvlib-python/blob/main/pvlib/irradiance.py#L259

Expected behavior
100% test coverage

Screenshots
image

Versions:

  • pvlib.__version__: 0.9.5-dirty
  • pandas.__version__: ?
  • python: ?

Additional context
This causes codecov to fail for any edits to irradiance.py that reduce the number of lines because then code coverage goes down.

Activity

  1. wholmgren commented on Mar 13, 2023

    @wholmgren
    Member

    Apparently I added this function 9 years ago during a large refactor, perhaps in an aborted effort at DRY code, but never used it. Tests were hardly a thing at that time. In any case, I suggest we delete it.

  2. Lakshyadevelops commented on Mar 19, 2023

    @Lakshyadevelops
    Contributor

    @wholmgren Function pvlib.irradiance.poa_horizontal_ratio is being used in example irradiance.ipynb
    also what is the following checking for?

    try:
        ratio.name = 'poa_ratio'
    except AttributeError:
        pass
    

    name attribute of a float?same try-except is for many other functions in irradiance module

  3. wholmgren commented on Mar 20, 2023

    @wholmgren
    Member

    Function pvlib.irradiance.poa_horizontal_ratio is being used in example irradiance.ipynb

    Those notebooks are not maintained and likely will be deleted in the future.

    also what is the following checking for?

    If the inputs are series, then ratio is also a Series and this line will assign a name to it. It's not a great pattern.

  4. changed the title [-]poa_horizontal_ratio is untested[/-] [+]`pvlib.irradiance.poa_horizontal_ratio` should be removed[/+] on Apr 5, 2023
  5. matsuobasho commented on Nov 10, 2023

    @matsuobasho
    Contributor

    Hi, I would like to tackle this issue. It seems like there is more to it aside from just deleting the poa_horizontal_ratio function. If I delete that function, then do I do anything with the docs/tutorials/irradiance.ipynb notebook that uses the function?

    Please recommend other requirements for this issue if applicable.

    Thanks.

  6. added a commit that references this issue on May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions