Skip to content

Commit

Permalink
chore: Processed review remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Carsopre committed Oct 18, 2023
1 parent c02fbfc commit fef60e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,6 @@ def get_standard_reinforcement_calculator(
else:
raise NotImplementedError(f"Type {reinforcement_type} not supported.")

def _get_corrected_koswat_scenario(self) -> KoswatScenario:
"""
Get a koswat scenario (`KoswatScenario`) whose values are not `math.nan`.
In practice this means that when a `KoswatScenario` value has not been set
the corresponding one from `KoswatProfileBase` will be used instead.
Returns:
KoswatScenario: Valid scenario to be used in reinforcements.
"""
_new_koswat_scenario = KoswatScenario(**self.scenario.__dict__)
if math.isnan(_new_koswat_scenario.kruin_breedte):
_new_koswat_scenario.kruin_breedte = (
self.base_profile.input_data.kruin_breedte
)
if math.isnan(_new_koswat_scenario.buiten_talud):
_new_koswat_scenario.buiten_talud = (
self.base_profile.input_data.buiten_talud
)

return _new_koswat_scenario

def _get_reinforcement_profile_input(self) -> ReinforcementInputProfileProtocol:
_calculator = self.get_standard_reinforcement_calculator(
self.reinforcement_profile_type
Expand Down
3 changes: 3 additions & 0 deletions koswat/cost_report/summary/koswat_summary_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def _get_corrected_koswat_scenario(
In practice this means that when a `KoswatScenario` value has not been set
the corresponding one from `KoswatProfileBase` will be used instead.
By having this code here we *guarantee* that a summary can be built with only
the mandatory values of a `KoswatScenario`.
Returns:
KoswatScenario: Valid scenario to be used in reinforcements.
"""
Expand Down

0 comments on commit fef60e3

Please sign in to comment.