Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1pt] PR: Remove other folder from test_cases #779

Merged
merged 7 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified config/symbology/esri/agreement_raster.lyr
Binary file not shown.
2 changes: 1 addition & 1 deletion config/symbology/qgis/agreement_raster.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<paletteEntry label="FN" value="1" alpha="255" color="#fdae61"/>
<paletteEntry label="FP" value="2" alpha="255" color="#d7191c"/>
<paletteEntry label="TP" value="3" alpha="255" color="#2c7bb6"/>
<paletteEntry label="Waterbody mask" value="4" alpha="255" color="#b2b2b2"/>
<paletteEntry label="Masked" value="4" alpha="255" color="#b2b2b2"/>
</colorPalette>
<colorramp type="randomcolors" name="[source]"/>
</rasterrenderer>
Expand Down
18 changes: 18 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
All notable changes to this project will be documented in this file.
We follow the [Semantic Versioning 2.0.0](http://semver.org/) format.

## v4.0.17.2 - 2022-12-29 - [PR #779](https://github.com/NOAA-OWP/inundation-mapping/pull/779)

Remove dependency on `other` folder in `test_cases`. Also updates ESRI and QGIS agreement raster symbology label to include the addition of levee-protected areas as a mask.

### Removals

- `tools/`
- `aggregate_metrics.py` and `cache_metrics.py`: Removes reference to test_cases/other folder

### Changes

- `config/symbology/`
- `esri/agreement_raster.lyr` and `qgis/agreement_raster.qml`: Updates label from Waterbody mask to Masked since mask also now includes levee-protected areas
- `tools/`
- `eval_alt_catfim.py` and `run_test_case.py`: Updates waterbody mask to dataset located in /inputs folder

<br/><br/>

## v4.0.17.1 - 2022-12-29 - [PR #778](https://github.com/NOAA-OWP/inundation-mapping/pull/778)

This merge fixes a bug where all of the Stage-Based intervals were the same.
Expand Down
2 changes: 1 addition & 1 deletion tools/aggregate_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def aggregate_metrics(config="DEV", branch="", hucs="", special_string="", outfo

for test_case in test_cases_dir_list:

if test_case not in ['other', 'validation_data_ble', 'validation_data_legacy', 'validation_data_ahps']:
if test_case not in ['validation_data_ble', 'validation_data_legacy', 'validation_data_ahps']:
branch_results_dir = os.path.join(TEST_CASES_DIR, test_case, 'performance_archive', config_version, branch)

huc = test_case.split('_')[0]
Expand Down
2 changes: 1 addition & 1 deletion tools/cache_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def process_alpha_test(args):
bench_cat_test_case_list = os.listdir(bench_cat_test_case_dir)

for test_id in bench_cat_test_case_list:
if 'validation' and 'other' not in test_id:
if 'validation' not in test_id:

current_huc = test_id.split('_')[0]
if test_id.split('_')[1] in bench_cat:
Expand Down
2 changes: 1 addition & 1 deletion tools/eval_alt_catfim.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def process_alt_comparison(args):
stats_modes_list=['total_area']
test_id=''
mask_dict={'levees': {'path': '/data/inputs/nld_vectors/Levee_protected_areas.gpkg', 'buffer': None, 'operation': 'exclude'},
'waterbodies': {'path': '/data/test_cases/other/zones/nwm_v2_reservoirs.shp', 'buffer': None, 'operation': 'exclude'},
'waterbodies': {'path': '/data/inputs/nwm_hydrofabric/nwm_lakes.gpkg', 'buffer': None, 'operation': 'exclude'},
site: {'path': '/data/test_cases/{benchmark_type}_test_cases/validation_data_{benchmark_type}/{huc}/{site}/{site}_domain.shp'.format(benchmark_type=benchmark_type, site=site, category=category, huc=huc), 'buffer': None, 'operation': 'include'}}

json_list.append(stats_json)
Expand Down
3 changes: 1 addition & 2 deletions tools/run_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,13 @@ def __init__(self, test_id, version, archive=True):
self.benchmark_dir = os.path.join(self.validation_data, self.huc)

# Create list of shapefile paths to use as exclusion areas.
zones_dir = os.path.join(TEST_CASES_DIR, 'other', 'zones')
self.mask_dict = {'levees':
{'path': '/data/inputs/nld_vectors/Levee_protected_areas.gpkg',
'buffer': None,
'operation': 'exclude'
},
'waterbodies':
{'path': os.path.join(zones_dir, 'nwm_v2_reservoirs.shp'),
{'path': '/data/inputs/nwm_hydrofabric/nwm_lakes.gpkg',
'buffer': None,
'operation': 'exclude',
},
Expand Down