pvlib-python
pvlib-python copied to clipboard
`pvlib.irradiance.poa_horizontal_ratio` should be removed
Describe the bug
Currently pvlib.irradiance.poa_horizontal_ratio
is untested according to codecov
To Reproduce Steps to reproduce the behavior:
- Go to https://app.codecov.io/gh/pvlib/pvlib-python/blob/main/pvlib/irradiance.py#L259
Expected behavior 100% test coverage
Screenshots
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.
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.
@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
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.
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.