Skip to content

Commit

Permalink
Add event set flooding test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-fred committed Feb 16, 2024
1 parent 9e198de commit 94e9fe9
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
hazard_datasets:
# long return period to show up well when testing exposure maps
aqueduct-river: 'external_files/hazard_sources.txt'
jba-event: 'config/hazard_resource_locations/jba-events.txt'

hazard_types:
aqueduct-river: 'flood'
jba-event: 'flood'

# testing data (from geofabrik)
infrastructure_datasets:
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions tests/integration/test_event_set_direct_damages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from . import runner


def test_event_set_direct_damages():
runner.run_snakemake_test(
"event_set_direct_damages",
(
"results/direct_damages/djibouti-latest_filter-road/hazard-jba-event/fraction/slice-0.gpq",
"results/direct_damages/djibouti-latest_filter-road/hazard-jba-event/cost/slice-0.gpq"
)
)
1 change: 0 additions & 1 deletion workflow/transport-flood/event_set_direct_damages.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
damage_curves_dir: str = snakemake.input["damage_curves"]
damage_fraction_path: str = snakemake.output["damage_fraction"]
damage_cost_path: str = snakemake.output["damage_cost"]
damage_curves_dir: str = snakemake.config["direct_damages"]["curves_dir"]
network_type: str = snakemake.params["network_type"]
hazard_type: str = snakemake.params["hazard_type"]
# note, this config entry might have been mutated on execution of the Snakefile
Expand Down

0 comments on commit 94e9fe9

Please sign in to comment.