-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
pvlib.solarposition.spa_python
has **kwargs
in the signature, but it doesn't mention it in the docstring, and it doesn't do anything with it in the function body.
pvlib-python/pvlib/solarposition.py
Lines 276 to 278 in c243183
def spa_python(time, latitude, longitude, | |
altitude=0, pressure=101325, temperature=12, delta_t=67.0, | |
atmos_refract=None, how='numpy', numthreads=4, **kwargs): |
This is bad because it silently ignores misspelled optional parameters, for example: pvlib.solarposition.spa_python(times, 40, -80, atlitude=100)
.
We could just deprecate and remove **kwargs
like #1053:
pvlib-python/pvlib/location.py
Lines 83 to 87 in a6667a3
if kwargs: | |
warnings.warn( | |
'Arbitrary Location kwargs are deprecated and will be ' | |
'removed in v0.9', pvlibDeprecationWarning | |
) |
Or we could keep **kwargs
and pass them through to spa.solar_position()
, thereby exposing the sst
and esd
parameters. Though if we want to expose those, I'd prefer just exposing them directly instead of hiding them in **kwargs
.
This could be a good "easy first issue" once we decide what the fix should be.