Skip to content

Commit def1490

Browse files
committed
remove expired pvlib.irradiance deprecations
1 parent aa5fc55 commit def1490

2 files changed

Lines changed: 0 additions & 65 deletions

File tree

pvlib/irradiance.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,11 +1613,6 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
16131613
return ghi
16141614

16151615

1616-
@renamed_kwarg_warning(
1617-
since='0.11.2',
1618-
old_param_name='clearsky_ghi',
1619-
new_param_name='ghi_clear',
1620-
removal="0.14.0")
16211616
def clearsky_index(ghi, ghi_clear, max_clearsky_index=2.0):
16221617
"""
16231618
Calculate the clearsky index.
@@ -2156,16 +2151,6 @@ def _dirint_bins(times, kt_prime, zenith, w, delta_kt_prime):
21562151
return kt_prime_bin, zenith_bin, w_bin, delta_kt_prime_bin
21572152

21582153

2159-
@renamed_kwarg_warning(
2160-
since='0.11.2',
2161-
old_param_name='ghi_clearsky',
2162-
new_param_name='ghi_clear',
2163-
removal="0.14.0")
2164-
@renamed_kwarg_warning(
2165-
since='0.11.2',
2166-
old_param_name='dni_clearsky',
2167-
new_param_name='dni_clear',
2168-
removal="0.14.0")
21692154
def dirindex(ghi, ghi_clear, dni_clear, zenith, times, pressure=101325.,
21702155
use_delta_kt_prime=True, temp_dew=None, min_cos_zenith=0.065,
21712156
max_zenith=87):
@@ -3662,11 +3647,6 @@ def _get_dirint_coeffs():
36623647
return coeffs[1:, 1:, :, :]
36633648

36643649

3665-
@renamed_kwarg_warning(
3666-
since='0.11.2',
3667-
old_param_name='clearsky_dni',
3668-
new_param_name='dni_clear',
3669-
removal="0.14.0")
36703650
def dni(ghi, dhi, zenith, dni_clear=None, clearsky_tolerance=1.1,
36713651
zenith_threshold_for_zero_dni=88.0,
36723652
zenith_threshold_for_clearsky_limit=80.0):

tests/test_irradiance.py

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,20 +1110,6 @@ def test_dirindex(times):
11101110
equal_nan=True)
11111111

11121112

1113-
@fail_on_pvlib_version("0.14")
1114-
def test_dirindex_ghi_clearsky_deprecation():
1115-
times = pd.DatetimeIndex(['2014-06-24T18-1200'])
1116-
ghi = pd.Series([1038.62], index=times)
1117-
ghi_clearsky = pd.Series([1042.48031487], index=times)
1118-
dni_clearsky = pd.Series([939.95469881], index=times)
1119-
zenith = pd.Series([10.56413562], index=times)
1120-
pressure, tdew = 93193, 10
1121-
with pytest.warns(pvlibDeprecationWarning, match='ghi_clear'):
1122-
irradiance.dirindex(
1123-
ghi=ghi, ghi_clearsky=ghi_clearsky, dni_clear=dni_clearsky,
1124-
zenith=zenith, times=times, pressure=pressure, temp_dew=tdew)
1125-
1126-
11271113
def test_dirindex_min_cos_zenith_max_zenith():
11281114
# map out behavior under difficult conditions with various
11291115
# limiting kwargs settings
@@ -1155,19 +1141,6 @@ def test_dirindex_min_cos_zenith_max_zenith():
11551141
assert_series_equal(out, expected)
11561142

11571143

1158-
@fail_on_pvlib_version("0.14")
1159-
def test_dirindex_dni_clearsky_deprecation():
1160-
times = pd.DatetimeIndex(['2014-06-24T12-0700', '2014-06-24T18-0700'])
1161-
ghi = pd.Series([0, 1], index=times)
1162-
ghi_clearsky = pd.Series([0, 1], index=times)
1163-
dni_clear = pd.Series([0, 5], index=times)
1164-
solar_zenith = pd.Series([90, 89.99], index=times)
1165-
with pytest.warns(pvlibDeprecationWarning, match='dni_clear'):
1166-
irradiance.dirindex(ghi, ghi_clearsky, dni_clearsky=dni_clear,
1167-
zenith=solar_zenith, times=times,
1168-
min_cos_zenith=0)
1169-
1170-
11711144
def test_dni():
11721145
ghi = pd.Series([90, 100, 100, 100, 100])
11731146
dhi = pd.Series([100, 90, 50, 50, 50])
@@ -1186,17 +1159,6 @@ def test_dni():
11861159
146.190220008, 573.685662283]))
11871160

11881161

1189-
@fail_on_pvlib_version("0.14")
1190-
def test_dni_dni_clearsky_deprecation():
1191-
ghi = pd.Series([90, 100, 100, 100, 100])
1192-
dhi = pd.Series([100, 90, 50, 50, 50])
1193-
zenith = pd.Series([80, 100, 85, 70, 85])
1194-
dni_clear = pd.Series([50, 50, 200, 50, 300])
1195-
with pytest.warns(pvlibDeprecationWarning, match='dni_clear'):
1196-
irradiance.dni(ghi, dhi, zenith,
1197-
clearsky_dni=dni_clear, clearsky_tolerance=2)
1198-
1199-
12001162
@pytest.mark.parametrize(
12011163
'surface_tilt,surface_azimuth,solar_zenith,' +
12021164
'solar_azimuth,aoi_expected,aoi_proj_expected',
@@ -1289,13 +1251,6 @@ def test_clearsky_index():
12891251
assert_series_equal(out, expected)
12901252

12911253

1292-
@fail_on_pvlib_version("0.14")
1293-
def test_clearsky_index_clearsky_ghi_deprecation():
1294-
with pytest.warns(pvlibDeprecationWarning, match='ghi_clear'):
1295-
ghi, clearsky_ghi = 200, 300
1296-
irradiance.clearsky_index(ghi, clearsky_ghi=clearsky_ghi)
1297-
1298-
12991254
def test_clearness_index():
13001255
ghi = np.array([-1, 0, 1, 1000])
13011256
solar_zenith = np.array([180, 90, 89.999, 0])

0 commit comments

Comments
 (0)