Skip to content

Commit 31f0ca7

Browse files
committed
Update docstrings
1 parent 727357e commit 31f0ca7

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

climada/engine/impact_forecast.py

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,16 @@ def from_impact(
9191

9292
@property
9393
def at_event(self):
94-
LOGGER.warning("at_event for forecasts is not yet implemented.")
94+
"""Get the total impact for each member/lead_time combination."""
95+
LOGGER.warning(
96+
"at_event gives the total impact for one specific combination of member and "
97+
"lead_time."
98+
)
9599
return self._at_event
96100

97101
@at_event.setter
98102
def at_event(self, value):
99-
"""Set the total exposure value close to a hazard"""
100-
LOGGER.warning("at_event for forecasts is not yet implemented.")
103+
"""Set the total impact for each member/lead_time combination."""
101104
self._at_event = value
102105

103106
def local_exceedance_impact(
@@ -110,9 +113,14 @@ def local_exceedance_impact(
110113
bin_decimals=None,
111114
):
112115
"""Compution of local exceedance impact for given return periods is not
113-
implemented for ImpactForecast. See climada.engine.impact.Impact for details.
114-
Returns
115-
-------
116+
implemented for ImpactForecast.
117+
118+
See Also
119+
--------
120+
See :py:meth:`~climada.engine.impact.Impact.local_exceedance_impact`
121+
122+
Raises
123+
------
116124
NotImplementedError
117125
"""
118126

@@ -131,8 +139,13 @@ def local_return_period(
131139
bin_decimals=None,
132140
):
133141
"""Compution of local return period for given impact thresholds is not
134-
implemented for ImpactForecast. See climada.engine.impact.Impact for details.
135-
Returns
142+
implemented for ImpactForecast.
143+
144+
See Also
145+
--------
146+
See :py:meth:`~climada.engine.impact.Impact.local_return_period`
147+
148+
Raises
136149
-------
137150
NotImplementedError
138151
"""
@@ -144,9 +157,14 @@ def local_return_period(
144157

145158
def calc_freq_curve(self, return_per=None):
146159
"""Computation of the impact exceedance frequency curve is not
147-
implemented for ImpactForecast. See climada.engine.impact.Impact for details.
148-
Returns
149-
-------
160+
implemented for ImpactForecast.
161+
162+
See Also
163+
--------
164+
See :py:meth:`~climada.engine.impact.Impact.calc_freq_curve`
165+
166+
Raises
167+
------
150168
NotImplementedError
151169
"""
152170

climada/engine/test/test_impact_forecast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_impact_forecast_concat(impact_forecast, member):
106106

107107

108108
def test_impact_forecast_blocked_methods(impact_forecast):
109-
"""Check if ImpactForecast.exceedance_freq_curve raises NotImplementedError"""
109+
"""Check if blocked methods raise NotImplementedError"""
110110
with pytest.raises(NotImplementedError):
111111
impact_forecast.local_exceedance_impact(np.array([10, 50, 100]))
112112

0 commit comments

Comments
 (0)