-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated pvlib.atmosphere.first_solar_spectral_correction
not scheduled for removal
#2130
Comments
pvlib.atmosphere.first_solar_spectral_correction
not scheduled for removingpvlib.atmosphere.first_solar_spectral_correction
not scheduled for removal
Just wondering something general about deprecations like this In code such as:
is it possible to hyperlink the alternative function? I did not quite understand the syntax of the |
Yeah @RDaxini , that's also one of the hardest patterns of Python for me. Here,
These are some other arguments the decorator takes (strings), that get used to create a warning admonition that gets put at the start of the docstring of the new function that will be returned. The last parameter Additionally, the decorator adds a warning on every call of the function. Lastly, the return function with extra code and modified docstring gets assigned to a variable. Since it's type is a function and it is listed on a table of contents, sphinx is able to use it's mangled docstring to create a page. And it can get used just as the decorated function, but from another namespace.
This observation is very valuable IMO. pvlib-python/pvlib/_deprecation.py Line 137 in 8e2bc91
I don't have a preference. Btw, this is the updated deprecation module of matplotlib with some new features we may consider: https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/_api/deprecation.py |
If the deprecation alternative was hyperlinked, where would it appear? It's outside the docstring so not on the readthedocs pages. The message is printed to the terminal window where a hyperlink isn't useful (AFAIK). Am I missing something? |
Aha, thank you. |
Describe the bug
pvlib.atmosphere.first_solar_spectral_correction
was deprecated in v0.10.0 but it doesn't have an scheduled removal version. No issues or PRs open for it.To Reproduce
See https://pvlib-python.readthedocs.io/en/stable/reference/generated/pvlib.atmosphere.first_solar_spectral_correction.html
And tests for https://github.com/pvlib/pvlib-python/blob/048b70ffa8a90c788491576e5057bcfc0667d8ea/pvlib/tests/test_atmosphere.py#L91C1-L94C65 do not show when it should fail.
Expected behavior
pvlib.atmosphere.first_solar_spectral_correction
to have disappeared in v0.11, or the repo to have the corresponding test failures set to some version.Versions:
pvlib.__version__
: 0.11.0Additional context
#1810
The text was updated successfully, but these errors were encountered: