From 82d70a9536d7f3c6886ccc3a8c748ab6d9b16e25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9CRobHanna-NOAA=E2=80=9D?=
<“Robert.Hanna@NOAA.gov”>
Date: Tue, 14 Feb 2023 00:08:59 +0000
Subject: [PATCH 1/5] update for calib db pathing to work in AWS
---
fim_post_processing.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fim_post_processing.sh b/fim_post_processing.sh
index c105eacca..013280cde 100755
--- a/fim_post_processing.sh
+++ b/fim_post_processing.sh
@@ -143,6 +143,13 @@ if [ "$src_adjust_spatial" = "True" ] && [ "$skipcal" = "0" ]; then
when we start up that part of the sytem and it does not like the word
export.
'
+
+ # Pick up the docker parent host machine name and override the one coming from the config file (aws only)
+ if [ "$isAWS" = "1" ]; then
+ CALIBRATION_DB_HOST=$(curl http://169.254.169.254/latest/meta-data/local-ipv4 -s)
+ fi
+
+
export CALIBRATION_DB_HOST=$CALIBRATION_DB_HOST
export CALIBRATION_DB_NAME=$CALIBRATION_DB_NAME
export CALIBRATION_DB_USER_NAME=$CALIBRATION_DB_USER_NAME
From 348dd008914cd30f118529e4823333d7fea37201 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9CRobHanna-NOAA=E2=80=9D?=
<“Robert.Hanna@NOAA.gov”>
Date: Tue, 14 Feb 2023 00:20:05 +0000
Subject: [PATCH 2/5] test git push
---
fim_post_processing.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/fim_post_processing.sh b/fim_post_processing.sh
index 013280cde..0869b453f 100755
--- a/fim_post_processing.sh
+++ b/fim_post_processing.sh
@@ -149,7 +149,6 @@ if [ "$src_adjust_spatial" = "True" ] && [ "$skipcal" = "0" ]; then
CALIBRATION_DB_HOST=$(curl http://169.254.169.254/latest/meta-data/local-ipv4 -s)
fi
-
export CALIBRATION_DB_HOST=$CALIBRATION_DB_HOST
export CALIBRATION_DB_NAME=$CALIBRATION_DB_NAME
export CALIBRATION_DB_USER_NAME=$CALIBRATION_DB_USER_NAME
From 42f308dad9da0618e19905d80943f1ddd30d4c17 Mon Sep 17 00:00:00 2001
From: Rob Hanna - NOAA <90854818+RobHanna-NOAA@users.noreply.github.com>
Date: Mon, 13 Feb 2023 19:13:02 -0600
Subject: [PATCH 3/5] Update README.md
---
tools/calibration-db/README.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/calibration-db/README.md b/tools/calibration-db/README.md
index ef85eeb21..6235d877c 100755
--- a/tools/calibration-db/README.md
+++ b/tools/calibration-db/README.md
@@ -38,7 +38,9 @@ Steps:
Using a bash terminal window, run
`docker-compose down`
`rm -rf pgdata`
-
+
+If that command errors out, use `docker-compose down --rmi local -v --remove-orphans`.
+
-------------------------------
## Debugging Postgres DB
From 68caa8e57ecb0c2907ba620525a2967031c68b37 Mon Sep 17 00:00:00 2001
From: Rob Hanna - NOAA <90854818+RobHanna-NOAA@users.noreply.github.com>
Date: Mon, 13 Feb 2023 19:16:53 -0600
Subject: [PATCH 4/5] Update CHANGELOG.md
---
docs/CHANGELOG.md | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 1845a039b..65c717777 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -1,5 +1,19 @@
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.1.(pending) - 2023-02-13 - [PR#812](https://github.com/NOAA-OWP/inundation-mapping/pull/812)
+
+An update was required to adjust host name when in the AWS environment
+
+### Changes
+
+- `fim_post_processing.sh`: Added an "if isAWS" flag system based on the input command args from fim_pipeline.sh or
+
+- `tools/calibration-db`
+ - `README.md`: Minor text correction.
+
+
## v4.1.0.0 - 2023-01-30 - [PR#806](https://github.com/NOAA-OWP/inundation-mapping/pull/806)
From 4215b08ca5be8868d0f6fe66293007b3dfdd02fa Mon Sep 17 00:00:00 2001
From: Carson Pruitt <90792257+CarsonPruitt-NOAA@users.noreply.github.com>
Date: Fri, 17 Feb 2023 11:10:09 -0600
Subject: [PATCH 5/5] Update CHANGELOG.md
---
docs/CHANGELOG.md | 74 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 72 insertions(+), 2 deletions(-)
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 65c717777..6135948ee 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -1,8 +1,7 @@
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.1.(pending) - 2023-02-13 - [PR#812](https://github.com/NOAA-OWP/inundation-mapping/pull/812)
+## v4.1.3.0 - 2023-02-13 - [PR#812](https://github.com/NOAA-OWP/inundation-mapping/pull/812)
An update was required to adjust host name when in the AWS environment
@@ -15,6 +14,77 @@ An update was required to adjust host name when in the AWS environment
+## v4.1.2.0 - 2023-02-15 - [PR#808](https://github.com/NOAA-OWP/inundation-mapping/pull/808)
+
+Add `pytest` package and refactor existing unit tests. Update parameters to unit tests (`/unit_tests/*_params.json`) to valid paths. Add leading slash to paths in `/config/params_template.env`.
+
+### Additions
+
+- `/unit_tests`
+ - `__init__.py` - needed for `pytest` command line executable to pick up tests.
+ - `pyproject.toml` - used to specify which warnings are excluded/filtered.
+ - `/gms`
+ - `__init__.py` - needed for `pytest` command line executable to pick up tests.
+ - `/tools`
+ - `__init__.py` - needed for `pytest` command line executable to pick up tests.
+ - `inundate_gms_params.json` - file moved up into this directory
+ - `inundate_gms_test.py` - file moved up into this directory
+ - `inundation_params.json` - file moved up into this directory
+ - `inundation_test.py` - file moved up into this directory
+
+### Removals
+
+- `/unit_tests/tools/gms_tools/` directory removed, and files moved up into `/unit_tests/tools`
+
+### Changes
+
+- `Pipfile` - updated to include pytest as a dependency
+- `Pipfile.lock` - updated to include pytest as a dependency
+
+- `/config`
+ - `params_template.env` - leading slash added to paths
+
+- `/unit_tests/` - All of the `*_test.py` files were refactored to follow the `pytest` paradigm.
+ - `*_params.json` - valid paths on `fim-dev1` provided
+ - `README.md` - updated to include documentation on pytest.
+ - `unit_tests_utils.py`
+ - `__template_unittests.py` -> `__template.py` - exclude the `_test` suffix to remove from test suite. Updated example on new format for pytest.
+ - `check_unit_errors_test.py`
+ - `clip_vectors_to_wbd_test.py`
+ - `filter_catchments_and_add_attributes_test.py`
+ - `rating_curve_comparison_test.py`
+ - `shared_functions_test.py`
+ - `split_flow_test.py`
+ - `usgs_gage_crosswalk_test.py`
+ - `aggregate_branch_lists_test.py`
+ - `generate_branch_list_test.py`
+ - `generate_branch_list_csv_test.py`
+ - `aggregate_branch_lists_test.py`
+ - `generate_branch_list_csv_test.py`
+ - `generate_branch_list_test.py`
+ - `/gms`
+ - `derive_level_paths_test.py`
+ - `outputs_cleanup_test.py`
+ - `/tools`
+ - `inundate_unittests.py` -> `inundation_test.py`
+ - `inundate_gms_test.py`
+
+
+
+
+## v4.1.1.0 - 2023-02-16 - [PR#809](https://github.com/NOAA-OWP/inundation-mapping/pull/809)
+
+The CatFIM code was updated to allow 1-foot interval processing across all stage-based AHPS sites ranging from action stage to 5 feet above major stage, along with restart capability for interrupted processing runs.
+
+### Changes
+
+- `tools/generate_categorical_fim.py` (all changes made here)
+ - Added try-except blocks for code that didn't allow most sites to actually get processed because it was trying to check values of some USGS-related variables that most of the sites didn't have
+ - Overwrite abilities of the different outputs for the viz team were not consistent (i.e., one of the files had the ability to be overwritten but another didn't), so that has been made consistent to disallow any overwrites of the existing final outputs for a specified output folder.
+ - The code also has the ability to restart from an interrupted run and resume processing uncompleted HUCs by first checking for a simple "complete" file for each HUC. If a HUC has that file, then it is skipped (because it already completed processing during a run for a particular output folder / run name).
+ - When a HUC is successfully processed, an empty "complete" text file is created / touched.
+
+
## v4.1.0.0 - 2023-01-30 - [PR#806](https://github.com/NOAA-OWP/inundation-mapping/pull/806)