Skip to content

Commit 62ece3e

Browse files
committed
Remove deduction of nominal power
1 parent a9044fa commit 62ece3e

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

tests/test_wind_turbine.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,6 @@ def test_get_turbine_types(self, capsys):
4040
with pytest.raises(ValueError, match=msg):
4141
get_turbine_types('wrong')
4242

43-
def test_deduce_nominal_power(self):
44-
"""Test method to deduce nominal_power from power curve"""
45-
test_turbine_data = {'hub_height': 100,
46-
'rotor_diameter': 80,
47-
'turbine_type': 'N131/3000'}
48-
n131 = WindTurbine(**test_turbine_data)
49-
assert n131.nominal_power == 3000000.0
50-
n131.deduce_nominal_power_from_power_curve()
51-
assert n131.nominal_power == 3000000.0
52-
53-
def test_error_deduce_nominal_power_withour_p_curve(self):
54-
"""Test method to deduce nominal_power from power curve"""
55-
test_turbine_data = {'hub_height': 100,
56-
'rotor_diameter': 80,
57-
'turbine_type': 'N131/3050'}
58-
n131 = WindTurbine(**test_turbine_data)
59-
assert n131.nominal_power is None
60-
with pytest.raises(ValueError, match="You can not deduce the"):
61-
n131.deduce_nominal_power_from_power_curve()
62-
6343
def test_wrong_url_load_turbine_data(self):
6444
"""Load turbine data from oedb."""
6545

windpowerlib/wind_turbine.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,6 @@ def __repr__(self):
198198

199199
return turbine_repr
200200

201-
def deduce_nominal_power_from_power_curve(self):
202-
"""Try to deduce nominal power from power curve"""
203-
if self.power_curve is not None:
204-
self.nominal_power = max(self.power_curve['value'])
205-
else:
206-
raise ValueError("You can not deduce the nominal value from the"
207-
"power curve if the power curve is None")
208-
209201

210202
def get_turbine_data_from_file(turbine_type, path):
211203
r"""

0 commit comments

Comments
 (0)