flood-adapt 1.0.3__py3-none-any.whl → 1.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
flood_adapt/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # has to be here at the start to avoid circular imports
2
- __version__ = "1.0.3"
2
+ __version__ = "1.0.4"
3
3
 
4
4
  from flood_adapt import adapter, database_builder, dbs_classes, objects
5
5
  from flood_adapt.config.config import Settings
@@ -1778,7 +1778,7 @@ class SfincsAdapter(IHazardAdapter):
1778
1778
  units=us.UnitTypesLength(units),
1779
1779
  )
1780
1780
 
1781
- if df_gauge is None:
1781
+ if df_gauge is None or df_gauge.empty:
1782
1782
  logger.warning(
1783
1783
  "No water level data available for the tide gauge. Could not add it to the plot."
1784
1784
  )
@@ -227,7 +227,6 @@ class DbsStatic(IDbsStatic):
227
227
  """
228
228
  return self.get_fiat_model().get_property_types()
229
229
 
230
- @cache_method_wrapper
231
230
  def get_hazard_models(self) -> list[IHazardAdapter]:
232
231
  """Get the hazard models from the database.
233
232
 
@@ -238,7 +237,6 @@ class DbsStatic(IDbsStatic):
238
237
  """
239
238
  return [self.get_overland_sfincs_model()]
240
239
 
241
- @cache_method_wrapper
242
240
  def get_impact_models(self) -> list[IImpactAdapter]:
243
241
  """Get the impact models from the database.
244
242
 
@@ -249,7 +247,6 @@ class DbsStatic(IDbsStatic):
249
247
  """
250
248
  return [self.get_fiat_model()]
251
249
 
252
- @cache_method_wrapper
253
250
  def get_overland_sfincs_model(self) -> SfincsAdapter:
254
251
  """Get the template offshore SFINCS model."""
255
252
  overland_path = (
@@ -260,7 +257,6 @@ class DbsStatic(IDbsStatic):
260
257
  with SfincsAdapter(model_root=overland_path) as overland_model:
261
258
  return overland_model
262
259
 
263
- @cache_method_wrapper
264
260
  def get_offshore_sfincs_model(self) -> SfincsAdapter:
265
261
  """Get the template overland Sfincs model."""
266
262
  if self._database.site.sfincs.config.offshore_model is None:
@@ -274,7 +270,6 @@ class DbsStatic(IDbsStatic):
274
270
  with SfincsAdapter(model_root=offshore_path) as offshore_model:
275
271
  return offshore_model
276
272
 
277
- @cache_method_wrapper
278
273
  def get_fiat_model(self) -> FiatAdapter:
279
274
  """Get the path to the FIAT model."""
280
275
  if self._database.site.fiat is None:
@@ -883,7 +883,7 @@ class FloodAdapt:
883
883
  scenario = self.database.scenarios.get(name)
884
884
 
885
885
  # Check if the scenario has run
886
- if not ScenarioRunner(self.database, scenario=scenario).hazard_run_check():
886
+ if not ScenarioRunner(self.database, scenario=scenario).has_run_check():
887
887
  logger.info(
888
888
  f"Cannot retrieve observation point timeseries as the scenario {name} has not been run yet."
889
889
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: flood-adapt
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: A software package support system which can be used to assess the benefits and costs of flood resilience measures
5
5
  Author-email: Gundula Winter <Gundula.Winter@deltares.nl>, Panos Athanasiou <Panos.Athanasiou@deltares.nl>, Frederique de Groen <Frederique.deGroen@deltares.nl>, Tim de Wilde <Tim.deWilde@deltares.nl>, Julian Hofer <Julian.Hofer@deltares.nl>, Daley Adrichem <Daley.Adrichem@deltares.nl>, Luuk Blom <Luuk.Blom@deltares.nl>
6
6
  License: ====================================================
@@ -1,8 +1,8 @@
1
- flood_adapt/__init__.py,sha256=CX3I-6FuXwWe0I-TMHVuRx3XIisTQUftpBfbU3FHTfg,818
2
- flood_adapt/flood_adapt.py,sha256=0oUk83neusSBa2ibBvqHMoTSz97ABICGZgQ47VXoaOk,38701
1
+ flood_adapt/__init__.py,sha256=ckRctoVnY8-iqM2cbEkPXTPdOKjZJNDKeBolOYFa81s,818
2
+ flood_adapt/flood_adapt.py,sha256=g-OpS0spvi-puwQFhvsfu_vvduozTPXk9DU2ay9ypgs,38698
3
3
  flood_adapt/adapter/__init__.py,sha256=vnF8NCkEVX-N-gtGS-J_A1H1YYAjihWjJZFyYGwcp8Q,180
4
4
  flood_adapt/adapter/fiat_adapter.py,sha256=kqZsAEo4YToLtaKTwATAGgmp5-FWQffZLbAItuLx104,60010
5
- flood_adapt/adapter/sfincs_adapter.py,sha256=8MOT5qfnRSli8DbVQepMSahzWAGt-gapljIJGTOK-5s,78481
5
+ flood_adapt/adapter/sfincs_adapter.py,sha256=mvW1cW8NNr2fnhZW0Ffzg9gDuheSrhTvYI0Y0AkLCNA,78499
6
6
  flood_adapt/adapter/sfincs_offshore.py,sha256=MjSPTrFPuOI2VqHeaBobS_OCozgnJST05nR49lq7cPs,7639
7
7
  flood_adapt/adapter/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  flood_adapt/adapter/interface/hazard_adapter.py,sha256=S2NIUAMSRgxC_E-tZRJ2qIP06U1zEVdn-MnvMTrn86s,2828
@@ -82,7 +82,7 @@ flood_adapt/dbs_classes/dbs_event.py,sha256=7fxlJFih5qrKuqpBlcQ1mYOHCfWyLJytEuu5
82
82
  flood_adapt/dbs_classes/dbs_measure.py,sha256=nEmq1kinc4l5d4LIxguzuXvCVYrWvFxX8maak8wIggw,4087
83
83
  flood_adapt/dbs_classes/dbs_projection.py,sha256=lyiU_ctP2ixK28RKnBN6mVJbOuaDsWCj1y6-MHlyi_k,1078
84
84
  flood_adapt/dbs_classes/dbs_scenario.py,sha256=hUvfGHw2LKmTFz2QeRijmTaalFrYap0gPK5QkNzuZfQ,4833
85
- flood_adapt/dbs_classes/dbs_static.py,sha256=FauGilL10PwFzPP1HPkmDNqDdRJHCyaEVcYSAAEhCLM,10685
85
+ flood_adapt/dbs_classes/dbs_static.py,sha256=0q72yCe03L4ibPVikQjuOjSdwgP66DQMbio3zj8UJlw,10550
86
86
  flood_adapt/dbs_classes/dbs_strategy.py,sha256=Pin0SXukdIdNwDBuM0XtqNsWUpM-gMoYy-ZfYNIs9Hw,4928
87
87
  flood_adapt/dbs_classes/dbs_template.py,sha256=CTjDijAWjbs3u9wwFKigAfVlDZnduTtYDTFD_b78m4w,10384
88
88
  flood_adapt/dbs_classes/interface/database.py,sha256=kPHsmreB-vHaFD_FRXbP06tVs7pGxt4Rucim6aEqiKg,2550
@@ -134,8 +134,8 @@ flood_adapt/objects/strategies/strategies.py,sha256=Jw-WJDCamL9p_7VEir3AdmYPMVAi
134
134
  flood_adapt/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
135
135
  flood_adapt/workflows/benefit_runner.py,sha256=VtYt0sHFymNyErpzOtuN55cKJGVm5hT2a_Qzprg6T88,21786
136
136
  flood_adapt/workflows/scenario_runner.py,sha256=9_Y6GmMYhYoTRkBUIlju0eBy6DosGf4Zl2tgu1QEubI,4119
137
- flood_adapt-1.0.3.dist-info/LICENSE,sha256=Ui5E03pQ0EVKxvKA54lTPA1xrtgA2HMGLQai95eOzoE,36321
138
- flood_adapt-1.0.3.dist-info/METADATA,sha256=A97-CERwV-X93xJ8_R2nNPQWXb4yrL2FNETltYGsvH4,53259
139
- flood_adapt-1.0.3.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
140
- flood_adapt-1.0.3.dist-info/top_level.txt,sha256=JvzMi6cTcQPEThCfpgMEeVny3ghI1urSH0CCgVIqSzw,12
141
- flood_adapt-1.0.3.dist-info/RECORD,,
137
+ flood_adapt-1.0.4.dist-info/LICENSE,sha256=Ui5E03pQ0EVKxvKA54lTPA1xrtgA2HMGLQai95eOzoE,36321
138
+ flood_adapt-1.0.4.dist-info/METADATA,sha256=Eb02xNPlDolOPVGRx6g8RvqI8CTiH2YS2KCbUK3_qvg,53259
139
+ flood_adapt-1.0.4.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
140
+ flood_adapt-1.0.4.dist-info/top_level.txt,sha256=JvzMi6cTcQPEThCfpgMEeVny3ghI1urSH0CCgVIqSzw,12
141
+ flood_adapt-1.0.4.dist-info/RECORD,,