Skip to content

Commit 3f15199

Browse files
committed
Add deprecation warning
1 parent f6dca8d commit 3f15199

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

doc/whatsnew/v0-1-2.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Deprecations
2020
############
2121
* installed_power is deprecated, use nominal_power instead.
2222
* wake_losses_model is deprecated, will be defined by the type of wind_farm_efficiency
23+
* parameters data_source and fetch_curve are deprecated, data source and fetching will be defined by the parameters power_coefficient_curve, power_curve and nominal_power in the future. The default values ('oedb') will lead to the same behaviour like the current default values (None, data_source='oedb').
2324

2425
Contributors
2526
############

windpowerlib/wind_turbine.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import sys
1414
import requests
1515
import os
16+
import warnings
1617

1718

1819
class WindTurbine(object):
@@ -110,6 +111,14 @@ def __init__(self, name, hub_height, rotor_diameter=None,
110111
nominal_power=None, fetch_curve=None, coordinates=None,
111112
data_source='oedb', **kwargs):
112113

114+
warnings.warn(
115+
"parameters data_source and fetch_curve are deprecated, data "
116+
"source and fetching will be defined by the parameters "
117+
"power_coefficient_curve, power_curve and nominal_power in the "
118+
"future. The default values ('oedb') will lead to the same "
119+
"behaviour like the current default values "
120+
"(None, data_source='oedb').", FutureWarning)
121+
113122
self.name = name
114123
self.hub_height = hub_height
115124
self.rotor_diameter = rotor_diameter

0 commit comments

Comments
 (0)