flood-adapt 0.3.3__tar.gz → 0.3.5__tar.gz
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-0.3.3 → flood_adapt-0.3.5}/PKG-INFO +2 -1
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/__init__.py +1 -1
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/adapter/sfincs_adapter.py +1 -3
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/config/config.py +37 -14
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/dbs_benefit.py +0 -21
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/dbs_scenario.py +0 -22
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/dbs_template.py +0 -24
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/interface/element.py +0 -16
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/flood_adapt.py +24 -86
- flood_adapt-0.3.5/flood_adapt/objects/forcing/__init__.py +92 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/workflows/scenario_runner.py +1 -1
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt.egg-info/PKG-INFO +2 -1
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt.egg-info/requires.txt +1 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/pyproject.toml +12 -4
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/tests/test_flood_adapt.py +1 -1
- flood_adapt-0.3.3/flood_adapt/workflows/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/LICENSE +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/README.md +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/adapter/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/adapter/fiat_adapter.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/adapter/interface/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/adapter/interface/hazard_adapter.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/adapter/interface/impact_adapter.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/adapter/interface/model_adapter.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/adapter/interface/offshore.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/adapter/sfincs_offshore.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/config/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/config/fiat.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/config/gui.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/config/sfincs.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/config/site.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/database_builder.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/default_units/imperial.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/default_units/metric.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/green_infra_table/green_infra_lookup_table.csv +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/black_down_48x48.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/black_left_48x48.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/black_right_48x48.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/black_up_48x48.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-16_white_down.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-16_white_left.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-16_white_right.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-16_white_up.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_black_down.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_black_left.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_black_right.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_black_up.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_white_left.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_white_right.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/white_down_48x48.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/white_left_48x48.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/white_right_48x48.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/icons/white_up_48x48.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/OSM/config_charts.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/OSM/config_people.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/OSM/config_risk_charts.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/OSM/config_roads.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/OSM/styles.css +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/US_NSI/config_charts.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/US_NSI/config_people.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/US_NSI/config_risk_charts.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/US_NSI/config_roads.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/US_NSI/styles.css +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/ambulance.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/car.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/cart.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/firetruck.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/hospital.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/house.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/info.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/money.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/person.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/school.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/truck.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infographics/images/walking_person.png +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/OSM/metrics_additional_risk_configs.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/OSM/with_SVI/infographic_metrics_config.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/OSM/with_SVI/infographic_metrics_config_risk.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/OSM/without_SVI/infographic_metrics_config.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/OSM/without_SVI/infographic_metrics_config_risk.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/US_NSI/metrics_additional_risk_configs.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/US_NSI/with_SVI/infographic_metrics_config.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/US_NSI/with_SVI/infographic_metrics_config_risk.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/US_NSI/without_SVI/infographic_metrics_config.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/US_NSI/without_SVI/infographic_metrics_config_risk.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/mandatory_metrics_config.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/infometrics/mandatory_metrics_config_risk.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder/templates/output_layers/bin_colors.toml +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/database_builder.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/database.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/dbs_event.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/dbs_measure.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/dbs_projection.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/dbs_static.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/dbs_strategy.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/interface/database.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/dbs_classes/interface/static.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/misc/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/misc/database_user.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/misc/log.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/misc/path_builder.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/misc/utils.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/benefits/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/benefits/benefits.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/events/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/events/event_factory.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/events/event_set.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/events/events.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/events/historical.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/events/hurricane.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/events/synthetic.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/csv.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/discharge.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/forcing.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/forcing_factory.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/meteo_handler.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/netcdf.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/plotting.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/rainfall.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/tide_gauge.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/time_frame.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/timeseries.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/unit_system.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/waterlevels.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/forcing/wind.py +0 -0
- {flood_adapt-0.3.3/flood_adapt/objects/forcing → flood_adapt-0.3.5/flood_adapt/objects/measures}/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/measures/measure_factory.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/measures/measures.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/object_model.py +0 -0
- {flood_adapt-0.3.3/flood_adapt/objects/measures → flood_adapt-0.3.5/flood_adapt/objects/projections}/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/projections/projections.py +0 -0
- {flood_adapt-0.3.3/flood_adapt/objects/projections → flood_adapt-0.3.5/flood_adapt/objects/scenarios}/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/scenarios/scenarios.py +0 -0
- {flood_adapt-0.3.3/flood_adapt/objects/scenarios → flood_adapt-0.3.5/flood_adapt/objects/strategies}/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/objects/strategies/strategies.py +0 -0
- {flood_adapt-0.3.3/flood_adapt/objects/strategies → flood_adapt-0.3.5/flood_adapt/workflows}/__init__.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/workflows/benefit_runner.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/workflows/floodmap.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt/workflows/impacts_integrator.py +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt.egg-info/SOURCES.txt +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt.egg-info/dependency_links.txt +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt.egg-info/not-zip-safe +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/flood_adapt.egg-info/top_level.txt +0 -0
- {flood_adapt-0.3.3 → flood_adapt-0.3.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: flood-adapt
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
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: GNU GENERAL PUBLIC LICENSE
|
|
@@ -727,6 +727,7 @@ Requires-Dist: sphinx<9.0,>=8.0; extra == "docs"
|
|
|
727
727
|
Requires-Dist: sphinx-rtd-theme<4.0,>=3.0; extra == "docs"
|
|
728
728
|
Requires-Dist: regex<2025.0,>=2024.11; extra == "docs"
|
|
729
729
|
Requires-Dist: minio<8,>=7.2.15; extra == "docs"
|
|
730
|
+
Requires-Dist: python-dotenv<2.0,>=1.0; extra == "docs"
|
|
730
731
|
Provides-Extra: all
|
|
731
732
|
Requires-Dist: flood-adapt[build,dev,docs]; extra == "all"
|
|
732
733
|
|
|
@@ -176,9 +176,7 @@ class SfincsAdapter(IHazardAdapter):
|
|
|
176
176
|
# No need to check postprocessing for risk scenarios
|
|
177
177
|
return all(self.sfincs_completed(sim_path) for sim_path in sim_paths)
|
|
178
178
|
else:
|
|
179
|
-
return self.sfincs_completed(
|
|
180
|
-
self._get_simulation_path(scenario)
|
|
181
|
-
) and self.run_completed(scenario)
|
|
179
|
+
return self.sfincs_completed(self._get_simulation_path(scenario))
|
|
182
180
|
|
|
183
181
|
def execute(self, path: Path, strict: bool = True) -> bool:
|
|
184
182
|
"""
|
|
@@ -66,7 +66,7 @@ class Settings(BaseSettings):
|
|
|
66
66
|
|
|
67
67
|
Usage
|
|
68
68
|
-----
|
|
69
|
-
from flood_adapt
|
|
69
|
+
from flood_adapt import Settings
|
|
70
70
|
|
|
71
71
|
One of the following:
|
|
72
72
|
|
|
@@ -77,7 +77,7 @@ class Settings(BaseSettings):
|
|
|
77
77
|
`settings = Settings.read(toml_path: Path)`
|
|
78
78
|
|
|
79
79
|
3) Load settings from keyword arguments, overwriting any environment variables:
|
|
80
|
-
`settings = Settings(DATABASE_ROOT="path/to/database", DATABASE_NAME="database_name"
|
|
80
|
+
`settings = Settings(DATABASE_ROOT="path/to/database", DATABASE_NAME="database_name")`
|
|
81
81
|
|
|
82
82
|
Attributes
|
|
83
83
|
----------
|
|
@@ -85,19 +85,21 @@ class Settings(BaseSettings):
|
|
|
85
85
|
The name of the database.
|
|
86
86
|
database_root : Path
|
|
87
87
|
The root directory of the database.
|
|
88
|
-
system_folder : Path
|
|
89
|
-
The root directory of the system folder containing the kernels.
|
|
90
88
|
delete_crashed_runs : bool
|
|
91
89
|
Whether to delete crashed/corrupted runs immediately after they are detected.
|
|
90
|
+
sfincs_path : Path
|
|
91
|
+
The path to the SFINCS binary.
|
|
92
|
+
fiat_path : Path
|
|
93
|
+
The path to the FIAT binary.
|
|
94
|
+
validate_allowed_forcings : bool
|
|
95
|
+
Whether to validate the forcing types and sources against the allowed forcings in the event model.
|
|
96
|
+
validate_bin_paths : bool
|
|
97
|
+
Whether to validate the existence of the paths to the SFINCS and FIAT binaries.
|
|
92
98
|
|
|
93
99
|
Properties
|
|
94
100
|
----------
|
|
95
101
|
database_path : Path
|
|
96
102
|
The full path to the database.
|
|
97
|
-
sfincs_path : Path
|
|
98
|
-
The path to the SFINCS binary.
|
|
99
|
-
fiat_path : Path
|
|
100
|
-
The path to the FIAT binary.
|
|
101
103
|
|
|
102
104
|
Raises
|
|
103
105
|
------
|
|
@@ -121,16 +123,22 @@ class Settings(BaseSettings):
|
|
|
121
123
|
|
|
122
124
|
delete_crashed_runs: bool = Field(
|
|
123
125
|
alias="DELETE_CRASHED_RUNS", # environment variable: DELETE_CRASHED_RUNS
|
|
124
|
-
default=
|
|
126
|
+
default=False,
|
|
125
127
|
description="Whether to delete the output of crashed/corrupted runs. Be careful when setting this to False, as it may lead to a broken database that cannot be read in anymore.",
|
|
126
128
|
exclude=True,
|
|
127
129
|
)
|
|
128
130
|
validate_allowed_forcings: bool = Field(
|
|
129
131
|
alias="VALIDATE_ALLOWED_FORCINGS", # environment variable: VALIDATE_ALLOWED_FORCINGS
|
|
130
|
-
default=
|
|
132
|
+
default=False,
|
|
131
133
|
description="Whether to validate the forcing types and sources against the allowed forcings in the event model.",
|
|
132
134
|
exclude=True,
|
|
133
135
|
)
|
|
136
|
+
validate_bin_paths: bool = Field(
|
|
137
|
+
alias="VALIDATE_BINARIES", # environment variable: VALIDATE_BINARIES
|
|
138
|
+
default=False,
|
|
139
|
+
description="Whether to validate the existence of the paths to the SFINCS and FIAT binaries.",
|
|
140
|
+
exclude=True,
|
|
141
|
+
)
|
|
134
142
|
|
|
135
143
|
sfincs_path: Path = Field(
|
|
136
144
|
default=_default_exe_path("sfincs"),
|
|
@@ -154,8 +162,9 @@ class Settings(BaseSettings):
|
|
|
154
162
|
@model_validator(mode="after")
|
|
155
163
|
def validate_settings(self):
|
|
156
164
|
self._validate_database_path()
|
|
157
|
-
self.
|
|
158
|
-
|
|
165
|
+
if self.validate_bin_paths:
|
|
166
|
+
self._validate_fiat_path()
|
|
167
|
+
self._validate_sfincs_path()
|
|
159
168
|
self._update_environment_variables()
|
|
160
169
|
return self
|
|
161
170
|
|
|
@@ -164,8 +173,22 @@ class Settings(BaseSettings):
|
|
|
164
173
|
environ["DATABASE_NAME"] = self.database_name
|
|
165
174
|
environ["SFINCS_BIN_PATH"] = str(self.sfincs_path)
|
|
166
175
|
environ["FIAT_BIN_PATH"] = str(self.fiat_path)
|
|
167
|
-
environ["
|
|
168
|
-
environ["
|
|
176
|
+
environ["SFINCS_PATH"] = str(self.sfincs_path)
|
|
177
|
+
environ["FIAT_PATH"] = str(self.fiat_path)
|
|
178
|
+
|
|
179
|
+
if self.delete_crashed_runs:
|
|
180
|
+
environ["DELETE_CRASHED_RUNS"] = str(self.delete_crashed_runs)
|
|
181
|
+
else:
|
|
182
|
+
environ.pop("DELETE_CRASHED_RUNS", None)
|
|
183
|
+
if self.validate_allowed_forcings:
|
|
184
|
+
environ["VALIDATE_ALLOWED_FORCINGS"] = str(self.validate_allowed_forcings)
|
|
185
|
+
else:
|
|
186
|
+
environ.pop("VALIDATE_ALLOWED_FORCINGS", None)
|
|
187
|
+
if self.validate_bin_paths:
|
|
188
|
+
environ["VALIDATE_BINARIES"] = str(self.validate_bin_paths)
|
|
189
|
+
else:
|
|
190
|
+
environ.pop("VALIDATE_BINARIES", None)
|
|
191
|
+
|
|
169
192
|
return self
|
|
170
193
|
|
|
171
194
|
def _validate_database_path(self):
|
|
@@ -59,27 +59,6 @@ class DbsBenefit(DbsTemplate[Benefit]):
|
|
|
59
59
|
if output_path.exists():
|
|
60
60
|
shutil.rmtree(output_path, ignore_errors=True)
|
|
61
61
|
|
|
62
|
-
def edit(self, benefit: Benefit):
|
|
63
|
-
"""Edits an already existing benefit in the database.
|
|
64
|
-
|
|
65
|
-
Parameters
|
|
66
|
-
----------
|
|
67
|
-
benefit : Benefit
|
|
68
|
-
benefit to be edited in the database
|
|
69
|
-
|
|
70
|
-
Raises
|
|
71
|
-
------
|
|
72
|
-
ValueError
|
|
73
|
-
Raise error if name is already in use.
|
|
74
|
-
"""
|
|
75
|
-
# Check if it is possible to edit the benefit.
|
|
76
|
-
super().edit(benefit)
|
|
77
|
-
|
|
78
|
-
# Delete output if edited
|
|
79
|
-
output_path = self.output_path / benefit.name
|
|
80
|
-
if output_path.exists():
|
|
81
|
-
shutil.rmtree(output_path, ignore_errors=True)
|
|
82
|
-
|
|
83
62
|
def get_runner(self, name: str) -> BenefitRunner:
|
|
84
63
|
return BenefitRunner(self._database, self.get(name))
|
|
85
64
|
|
|
@@ -58,28 +58,6 @@ class DbsScenario(DbsTemplate[Scenario]):
|
|
|
58
58
|
if (self.output_path / name).exists():
|
|
59
59
|
shutil.rmtree(self.output_path / name, ignore_errors=False)
|
|
60
60
|
|
|
61
|
-
def edit(self, scenario: Scenario):
|
|
62
|
-
"""Edits an already existing scenario in the database.
|
|
63
|
-
|
|
64
|
-
Parameters
|
|
65
|
-
----------
|
|
66
|
-
scenario : Scenario
|
|
67
|
-
scenario to be edited in the database
|
|
68
|
-
|
|
69
|
-
Raises
|
|
70
|
-
------
|
|
71
|
-
ValueError
|
|
72
|
-
Raise error if name is already in use.
|
|
73
|
-
"""
|
|
74
|
-
# Check if it is possible to edit the scenario. This then also covers checking whether the
|
|
75
|
-
# scenario is already used in a higher level object. If this is the case, it cannot be edited.
|
|
76
|
-
super().edit(scenario)
|
|
77
|
-
|
|
78
|
-
# Delete output if edited
|
|
79
|
-
output_path = self.output_path / scenario.name
|
|
80
|
-
if output_path.exists():
|
|
81
|
-
shutil.rmtree(output_path, ignore_errors=True)
|
|
82
|
-
|
|
83
61
|
def check_higher_level_usage(self, name: str) -> list[str]:
|
|
84
62
|
"""Check if a scenario is used in a benefit.
|
|
85
63
|
|
|
@@ -133,30 +133,6 @@ class DbsTemplate(AbstractDatabaseElement[T_OBJECTMODEL]):
|
|
|
133
133
|
self.input_path / object_model.name / f"{object_model.name}.toml",
|
|
134
134
|
)
|
|
135
135
|
|
|
136
|
-
def edit(self, object_model: T_OBJECTMODEL):
|
|
137
|
-
"""Edit an already existing object in the database.
|
|
138
|
-
|
|
139
|
-
Parameters
|
|
140
|
-
----------
|
|
141
|
-
object_model : Object
|
|
142
|
-
object to be edited in the database
|
|
143
|
-
|
|
144
|
-
Raises
|
|
145
|
-
------
|
|
146
|
-
ValueError
|
|
147
|
-
Raise error if name is already in use.
|
|
148
|
-
"""
|
|
149
|
-
# Check if the object exists
|
|
150
|
-
if object_model.name not in self.summarize_objects()["name"]:
|
|
151
|
-
raise ValueError(
|
|
152
|
-
f"{self.display_name}: '{object_model.name}' does not exist. You cannot edit an {self.display_name.lower()} that does not exist."
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
# Check if it is possible to delete the object by saving with overwrite. This then
|
|
156
|
-
# also covers checking whether the object is a standard object, is already used in
|
|
157
|
-
# a higher level object. If any of these are the case, it cannot be deleted.
|
|
158
|
-
self.save(object_model, overwrite=True)
|
|
159
|
-
|
|
160
136
|
def delete(self, name: str, toml_only: bool = False):
|
|
161
137
|
"""Delete an already existing object in the database.
|
|
162
138
|
|
|
@@ -85,22 +85,6 @@ class AbstractDatabaseElement(ABC, Generic[T_OBJECT_MODEL]):
|
|
|
85
85
|
"""
|
|
86
86
|
pass
|
|
87
87
|
|
|
88
|
-
@abstractmethod
|
|
89
|
-
def edit(self, object_model: T_OBJECT_MODEL):
|
|
90
|
-
"""Edits an already existing object in the database.
|
|
91
|
-
|
|
92
|
-
Parameters
|
|
93
|
-
----------
|
|
94
|
-
object : IObject
|
|
95
|
-
object to be edited in the database
|
|
96
|
-
|
|
97
|
-
Raises
|
|
98
|
-
------
|
|
99
|
-
ValueError
|
|
100
|
-
Raise error if name is already in use.
|
|
101
|
-
"""
|
|
102
|
-
pass
|
|
103
|
-
|
|
104
88
|
@abstractmethod
|
|
105
89
|
def delete(self, name: str, toml_only: bool = False):
|
|
106
90
|
"""Delete an already existing object in the database.
|
|
@@ -129,6 +129,8 @@ class FloodAdapt:
|
|
|
129
129
|
----------
|
|
130
130
|
measure : Measure
|
|
131
131
|
The measure object to save.
|
|
132
|
+
overwrite : bool, optional
|
|
133
|
+
Whether to overwrite an existing measure with the same name (default is False).
|
|
132
134
|
|
|
133
135
|
Raises
|
|
134
136
|
------
|
|
@@ -137,21 +139,6 @@ class FloodAdapt:
|
|
|
137
139
|
"""
|
|
138
140
|
self.database.measures.save(measure, overwrite=overwrite)
|
|
139
141
|
|
|
140
|
-
def edit_measure(self, measure: Measure) -> None:
|
|
141
|
-
"""Edit a measure object in the database.
|
|
142
|
-
|
|
143
|
-
Parameters
|
|
144
|
-
----------
|
|
145
|
-
measure : Measure
|
|
146
|
-
The measure object to edit.
|
|
147
|
-
|
|
148
|
-
Raises
|
|
149
|
-
------
|
|
150
|
-
ValueError
|
|
151
|
-
If the measure object does not exist.
|
|
152
|
-
"""
|
|
153
|
-
self.database.measures.edit(measure)
|
|
154
|
-
|
|
155
142
|
def delete_measure(self, name: str) -> None:
|
|
156
143
|
"""Delete an measure from the database.
|
|
157
144
|
|
|
@@ -253,7 +240,7 @@ class FloodAdapt:
|
|
|
253
240
|
"""
|
|
254
241
|
return Strategy(**attrs)
|
|
255
242
|
|
|
256
|
-
def save_strategy(self, strategy: Strategy) -> None:
|
|
243
|
+
def save_strategy(self, strategy: Strategy, overwrite: bool = False) -> None:
|
|
257
244
|
"""
|
|
258
245
|
Save a strategy object to the database.
|
|
259
246
|
|
|
@@ -261,6 +248,8 @@ class FloodAdapt:
|
|
|
261
248
|
----------
|
|
262
249
|
strategy : Strategy
|
|
263
250
|
The strategy object to save.
|
|
251
|
+
overwrite : bool, optional
|
|
252
|
+
Whether to overwrite an existing strategy with the same name (default is False).
|
|
264
253
|
|
|
265
254
|
Raises
|
|
266
255
|
------
|
|
@@ -268,7 +257,7 @@ class FloodAdapt:
|
|
|
268
257
|
If the strategy object is not valid.
|
|
269
258
|
If the strategy object already exists.
|
|
270
259
|
"""
|
|
271
|
-
self.database.strategies.save(strategy)
|
|
260
|
+
self.database.strategies.save(strategy, overwrite=overwrite)
|
|
272
261
|
|
|
273
262
|
def delete_strategy(self, name: str) -> None:
|
|
274
263
|
"""
|
|
@@ -368,36 +357,22 @@ class FloodAdapt:
|
|
|
368
357
|
"""
|
|
369
358
|
return EventSet(**attrs, sub_events=sub_events)
|
|
370
359
|
|
|
371
|
-
def save_event(self, event: Event) -> None:
|
|
360
|
+
def save_event(self, event: Event, overwrite: bool = False) -> None:
|
|
372
361
|
"""Save an event object to the database.
|
|
373
362
|
|
|
374
363
|
Parameters
|
|
375
364
|
----------
|
|
376
365
|
event : Event
|
|
377
366
|
The event object to save.
|
|
367
|
+
overwrite : bool, optional
|
|
368
|
+
Whether to overwrite an existing event with the same name (default is False).
|
|
378
369
|
|
|
379
370
|
Raises
|
|
380
371
|
------
|
|
381
372
|
ValueError
|
|
382
373
|
If the event object is not valid.
|
|
383
374
|
"""
|
|
384
|
-
self.database.events.save(event)
|
|
385
|
-
|
|
386
|
-
def edit_event(self, event: Event) -> None:
|
|
387
|
-
"""Edit an event object in the database.
|
|
388
|
-
|
|
389
|
-
Parameters
|
|
390
|
-
----------
|
|
391
|
-
event : Event
|
|
392
|
-
The event object to edit.
|
|
393
|
-
|
|
394
|
-
Raises
|
|
395
|
-
------
|
|
396
|
-
ValueError
|
|
397
|
-
If the event object does not exist.
|
|
398
|
-
If the event is used in a scenario.
|
|
399
|
-
"""
|
|
400
|
-
self.database.events.edit(event)
|
|
375
|
+
self.database.events.save(event, overwrite=overwrite)
|
|
401
376
|
|
|
402
377
|
def delete_event(self, name: str) -> None:
|
|
403
378
|
"""Delete an event from the database.
|
|
@@ -519,35 +494,22 @@ class FloodAdapt:
|
|
|
519
494
|
"""
|
|
520
495
|
return Projection(**attrs)
|
|
521
496
|
|
|
522
|
-
def save_projection(self, projection: Projection) -> None:
|
|
497
|
+
def save_projection(self, projection: Projection, overwrite: bool = False) -> None:
|
|
523
498
|
"""Save a projection object to the database.
|
|
524
499
|
|
|
525
500
|
Parameters
|
|
526
501
|
----------
|
|
527
502
|
projection : Projection
|
|
528
503
|
The projection object to save.
|
|
504
|
+
overwrite : bool, optional
|
|
505
|
+
Whether to overwrite an existing projection with the same name (default is False).
|
|
529
506
|
|
|
530
507
|
Raises
|
|
531
508
|
------
|
|
532
509
|
ValueError
|
|
533
510
|
If the projection object is not valid.
|
|
534
511
|
"""
|
|
535
|
-
self.database.projections.save(projection)
|
|
536
|
-
|
|
537
|
-
def edit_projection(self, projection: Projection) -> None:
|
|
538
|
-
"""Edit a projection object in the database.
|
|
539
|
-
|
|
540
|
-
Parameters
|
|
541
|
-
----------
|
|
542
|
-
projection : Projection
|
|
543
|
-
The projection object to edit.
|
|
544
|
-
|
|
545
|
-
Raises
|
|
546
|
-
------
|
|
547
|
-
ValueError
|
|
548
|
-
If the projection object does not exist.
|
|
549
|
-
"""
|
|
550
|
-
self.database.projections.edit(projection)
|
|
512
|
+
self.database.projections.save(projection, overwrite=overwrite)
|
|
551
513
|
|
|
552
514
|
def delete_projection(self, name: str) -> None:
|
|
553
515
|
"""Delete a projection from the database.
|
|
@@ -676,13 +638,17 @@ class FloodAdapt:
|
|
|
676
638
|
"""
|
|
677
639
|
return Scenario(**attrs)
|
|
678
640
|
|
|
679
|
-
def save_scenario(
|
|
641
|
+
def save_scenario(
|
|
642
|
+
self, scenario: Scenario, overwrite: bool = False
|
|
643
|
+
) -> tuple[bool, str]:
|
|
680
644
|
"""Save the scenario to the database.
|
|
681
645
|
|
|
682
646
|
Parameters
|
|
683
647
|
----------
|
|
684
648
|
scenario : Scenario
|
|
685
649
|
The scenario to save.
|
|
650
|
+
overwrite : bool, optional
|
|
651
|
+
Whether to overwrite an existing scenario with the same name (default is False).
|
|
686
652
|
|
|
687
653
|
Returns
|
|
688
654
|
-------
|
|
@@ -692,26 +658,11 @@ class FloodAdapt:
|
|
|
692
658
|
The error message if the scenario was not saved successfully.
|
|
693
659
|
"""
|
|
694
660
|
try:
|
|
695
|
-
self.database.scenarios.save(scenario)
|
|
661
|
+
self.database.scenarios.save(scenario, overwrite=overwrite)
|
|
696
662
|
return True, ""
|
|
697
663
|
except Exception as e:
|
|
698
664
|
return False, str(e)
|
|
699
665
|
|
|
700
|
-
def edit_scenario(self, scenario: Scenario) -> None:
|
|
701
|
-
"""Edit a scenario object in the database.
|
|
702
|
-
|
|
703
|
-
Parameters
|
|
704
|
-
----------
|
|
705
|
-
scenario : Scenario
|
|
706
|
-
The scenario object to edit.
|
|
707
|
-
|
|
708
|
-
Raises
|
|
709
|
-
------
|
|
710
|
-
ValueError
|
|
711
|
-
If the scenario object does not exist.
|
|
712
|
-
"""
|
|
713
|
-
self.database.scenarios.edit(scenario)
|
|
714
|
-
|
|
715
666
|
def delete_scenario(self, name: str) -> None:
|
|
716
667
|
"""Delete a scenario from the database.
|
|
717
668
|
|
|
@@ -1137,35 +1088,22 @@ class FloodAdapt:
|
|
|
1137
1088
|
"""
|
|
1138
1089
|
return Benefit(**attrs)
|
|
1139
1090
|
|
|
1140
|
-
def save_benefit(self, benefit: Benefit) -> None:
|
|
1091
|
+
def save_benefit(self, benefit: Benefit, overwrite: bool = False) -> None:
|
|
1141
1092
|
"""Save a benefit object to the database.
|
|
1142
1093
|
|
|
1143
1094
|
Parameters
|
|
1144
1095
|
----------
|
|
1145
1096
|
benefit : Benefit
|
|
1146
1097
|
The benefit object to save.
|
|
1098
|
+
overwrite : bool, optional
|
|
1099
|
+
Whether to overwrite an existing benefit with the same name (default is False).
|
|
1147
1100
|
|
|
1148
1101
|
Raises
|
|
1149
1102
|
------
|
|
1150
1103
|
ValueError
|
|
1151
1104
|
If the benefit object is not valid.
|
|
1152
1105
|
"""
|
|
1153
|
-
self.database.benefits.save(benefit)
|
|
1154
|
-
|
|
1155
|
-
def edit_benefit(self, benefit: Benefit) -> None:
|
|
1156
|
-
"""Edit a benefit object in the database.
|
|
1157
|
-
|
|
1158
|
-
Parameters
|
|
1159
|
-
----------
|
|
1160
|
-
benefit : Benefit
|
|
1161
|
-
The benefit object to edit.
|
|
1162
|
-
|
|
1163
|
-
Raises
|
|
1164
|
-
------
|
|
1165
|
-
ValueError
|
|
1166
|
-
If the benefit object does not exist.
|
|
1167
|
-
"""
|
|
1168
|
-
self.database.benefits.edit(benefit)
|
|
1106
|
+
self.database.benefits.save(benefit, overwrite=overwrite)
|
|
1169
1107
|
|
|
1170
1108
|
def delete_benefit(self, name: str) -> None:
|
|
1171
1109
|
"""Delete a benefit object from the database.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from flood_adapt.objects.forcing.discharge import (
|
|
2
|
+
DischargeConstant,
|
|
3
|
+
DischargeCSV,
|
|
4
|
+
DischargeSynthetic,
|
|
5
|
+
)
|
|
6
|
+
from flood_adapt.objects.forcing.forcing import ForcingSource, ForcingType, IForcing
|
|
7
|
+
from flood_adapt.objects.forcing.meteo_handler import MeteoHandler
|
|
8
|
+
from flood_adapt.objects.forcing.rainfall import (
|
|
9
|
+
RainfallConstant,
|
|
10
|
+
RainfallCSV,
|
|
11
|
+
RainfallMeteo,
|
|
12
|
+
RainfallNetCDF,
|
|
13
|
+
RainfallSynthetic,
|
|
14
|
+
RainfallTrack,
|
|
15
|
+
)
|
|
16
|
+
from flood_adapt.objects.forcing.tide_gauge import TideGauge, TideGaugeSource
|
|
17
|
+
from flood_adapt.objects.forcing.time_frame import TimeFrame
|
|
18
|
+
from flood_adapt.objects.forcing.timeseries import (
|
|
19
|
+
BlockTimeseries,
|
|
20
|
+
CSVTimeseries,
|
|
21
|
+
GaussianTimeseries,
|
|
22
|
+
ScsTimeseries,
|
|
23
|
+
Scstype,
|
|
24
|
+
ShapeType,
|
|
25
|
+
SyntheticTimeseries,
|
|
26
|
+
TimeseriesFactory,
|
|
27
|
+
TriangleTimeseries,
|
|
28
|
+
)
|
|
29
|
+
from flood_adapt.objects.forcing.waterlevels import (
|
|
30
|
+
SurgeModel,
|
|
31
|
+
TideModel,
|
|
32
|
+
WaterlevelCSV,
|
|
33
|
+
WaterlevelGauged,
|
|
34
|
+
WaterlevelModel,
|
|
35
|
+
WaterlevelSynthetic,
|
|
36
|
+
)
|
|
37
|
+
from flood_adapt.objects.forcing.wind import (
|
|
38
|
+
WindConstant,
|
|
39
|
+
WindCSV,
|
|
40
|
+
WindMeteo,
|
|
41
|
+
WindNetCDF,
|
|
42
|
+
WindSynthetic,
|
|
43
|
+
WindTrack,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
__all__ = [
|
|
47
|
+
# Forcing
|
|
48
|
+
"IForcing",
|
|
49
|
+
"ForcingSource",
|
|
50
|
+
"ForcingType",
|
|
51
|
+
# Timeseries
|
|
52
|
+
"ShapeType",
|
|
53
|
+
"Scstype",
|
|
54
|
+
"CSVTimeseries",
|
|
55
|
+
"TimeseriesFactory",
|
|
56
|
+
"SyntheticTimeseries",
|
|
57
|
+
"BlockTimeseries",
|
|
58
|
+
"ScsTimeseries",
|
|
59
|
+
"GaussianTimeseries",
|
|
60
|
+
"TriangleTimeseries",
|
|
61
|
+
# TimeFrame
|
|
62
|
+
"TimeFrame",
|
|
63
|
+
# Discharge
|
|
64
|
+
"DischargeConstant",
|
|
65
|
+
"DischargeCSV",
|
|
66
|
+
"DischargeSynthetic",
|
|
67
|
+
# Waterlevels
|
|
68
|
+
"WaterlevelCSV",
|
|
69
|
+
"WaterlevelGauged",
|
|
70
|
+
"WaterlevelModel",
|
|
71
|
+
"WaterlevelSynthetic",
|
|
72
|
+
"TideModel",
|
|
73
|
+
"SurgeModel",
|
|
74
|
+
"TideGauge",
|
|
75
|
+
"TideGaugeSource",
|
|
76
|
+
# Rainfall
|
|
77
|
+
"RainfallConstant",
|
|
78
|
+
"RainfallCSV",
|
|
79
|
+
"RainfallSynthetic",
|
|
80
|
+
"RainfallMeteo",
|
|
81
|
+
"RainfallNetCDF",
|
|
82
|
+
"RainfallTrack",
|
|
83
|
+
# Wind
|
|
84
|
+
"WindConstant",
|
|
85
|
+
"WindCSV",
|
|
86
|
+
"WindSynthetic",
|
|
87
|
+
"WindMeteo",
|
|
88
|
+
"WindNetCDF",
|
|
89
|
+
"WindTrack",
|
|
90
|
+
# Other
|
|
91
|
+
"MeteoHandler",
|
|
92
|
+
]
|
|
@@ -46,7 +46,7 @@ class ScenarioRunner:
|
|
|
46
46
|
self._database.static.get_overland_sfincs_model(),
|
|
47
47
|
]
|
|
48
48
|
for hazard in hazard_models:
|
|
49
|
-
if not hazard.
|
|
49
|
+
if not hazard.run_completed(self._scenario):
|
|
50
50
|
hazard.run(self._scenario)
|
|
51
51
|
else:
|
|
52
52
|
self.logger.info(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: flood-adapt
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
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: GNU GENERAL PUBLIC LICENSE
|
|
@@ -727,6 +727,7 @@ Requires-Dist: sphinx<9.0,>=8.0; extra == "docs"
|
|
|
727
727
|
Requires-Dist: sphinx-rtd-theme<4.0,>=3.0; extra == "docs"
|
|
728
728
|
Requires-Dist: regex<2025.0,>=2024.11; extra == "docs"
|
|
729
729
|
Requires-Dist: minio<8,>=7.2.15; extra == "docs"
|
|
730
|
+
Requires-Dist: python-dotenv<2.0,>=1.0; extra == "docs"
|
|
730
731
|
Provides-Extra: all
|
|
731
732
|
Requires-Dist: flood-adapt[build,dev,docs]; extra == "all"
|
|
732
733
|
|
|
@@ -73,7 +73,8 @@ docs = [
|
|
|
73
73
|
"sphinx >=8.0,<9.0",
|
|
74
74
|
"sphinx-rtd-theme >=3.0,<4.0",
|
|
75
75
|
"regex >=2024.11,<2025.0",
|
|
76
|
-
"minio >=7.2.15,<8"
|
|
76
|
+
"minio >=7.2.15,<8",
|
|
77
|
+
"python-dotenv >=1.0,<2.0",
|
|
77
78
|
]
|
|
78
79
|
all = ["flood-adapt[build,dev,docs]"]
|
|
79
80
|
|
|
@@ -137,14 +138,21 @@ install-pre-commit = {cmd = "pre-commit install", outputs=[".git/hooks/pre-commi
|
|
|
137
138
|
pre-commit = {cmd = "pre-commit run --all-files", depends-on=["install-pre-commit"]}
|
|
138
139
|
tests = {cmd = "pytest tests"}
|
|
139
140
|
|
|
140
|
-
|
|
141
141
|
[tool.pixi.feature.build.tasks]
|
|
142
142
|
build-db-builder = {cmd = "python distribution/build_database_builder_executable.py"}
|
|
143
143
|
|
|
144
144
|
[tool.pixi.feature.docs.tasks]
|
|
145
145
|
clean-generated-docs = { cmd = "rm -rf docs/_freeze docs/_version.yml docs/api_ref docs/objects.json docs/_site" }
|
|
146
146
|
clean-docs = {depends-on=["clean-generated-docs"]}
|
|
147
|
-
fetch-data = { cmd = "python docs/fetch_data.py"}
|
|
148
|
-
build-docs = { cmd = "quartodoc build --config docs/_quarto.yml", depends-on=[ "clean-docs"
|
|
147
|
+
fetch-data = { cmd = "python docs/fetch_data.py" }
|
|
148
|
+
build-docs = { cmd = "quartodoc build --config docs/_quarto.yml", depends-on=[ "clean-docs" ] }
|
|
149
149
|
build-interlinks = { cmd = "quartodoc interlinks", depends-on=[ "clean-docs" ], cwd = "docs" }
|
|
150
|
+
render-examples = { cmd = "quarto render ./docs/examples/**/*.ipynb ./docs/examples/**/*.qmd --execute" }
|
|
151
|
+
open-docs = { cmd = "cmd.exe /c start docs/_site/index.html" }
|
|
150
152
|
render-docs = { cmd = "quarto render ./docs --execute", depends-on=["build-docs", "build-interlinks"] }
|
|
153
|
+
|
|
154
|
+
[tool.pixi.target.win-64.activation]
|
|
155
|
+
scripts = [ "setup.bat" ]
|
|
156
|
+
|
|
157
|
+
[tool.pixi.target.linux-64.activation]
|
|
158
|
+
scripts = [ "setup.sh" ]
|
|
@@ -609,7 +609,7 @@ class TestBenefits:
|
|
|
609
609
|
benefit_dict_new["implementation_cost"] = 30000000
|
|
610
610
|
benefit_dict_new["annual_maint_cost"] = 0
|
|
611
611
|
benefit = test_fa.create_benefit(benefit_dict_new)
|
|
612
|
-
test_fa.
|
|
612
|
+
test_fa.save_benefit(benefit, overwrite=True)
|
|
613
613
|
test_fa.run_benefit("benefit_raise_properties_2080")
|
|
614
614
|
|
|
615
615
|
benefit = test_fa.get_benefit("benefit_raise_properties_2080")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|