Skip to content

Commit

Permalink
add deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
RDaxini committed Nov 21, 2024
1 parent b21e1eb commit 57288e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pvlib/clearsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
from scipy.linalg import hankel
import h5py

from pvlib import atmosphere, tools
from pvlib import atmosphere, tools, renamed_kwarg_warning
from pvlib.tools import _degrees_to_index

renamed_kwarg_warning('11.2', 'clearsky_ghi', 'ghi_clear', removal="12.0")
renamed_kwarg_warning('11.2', 'clearsky', 'ghi_clear', removal="12.0")

def ineichen(apparent_zenith, airmass_absolute, linke_turbidity,
altitude=0, dni_extra=1364., perez_enhancement=False):
Expand Down
4 changes: 3 additions & 1 deletion pvlib/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
from pvlib import atmosphere, solarposition, tools
import pvlib # used to avoid dni name collision in complete_irradiance

from pvlib._deprecation import pvlibDeprecationWarning
from pvlib._deprecation import pvlibDeprecationWarning, renamed_kwarg_warning
import warnings

renamed_kwarg_warning('11.2', 'clearsky_ghi', 'ghi_clear', removal="12.0")
renamed_kwarg_warning('11.2', 'ghi_clearsky', 'ghi_clear', removal="12.0")

# Deprecation warning based on https://peps.python.org/pep-0562/
def __getattr__(attr):
Expand Down

0 comments on commit 57288e7

Please sign in to comment.