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: Change Post proc perms updates #1238

Merged
merged 7 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
14 changes: 14 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ 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.5.x.x - 2024-07-31 - [PR#1238](https://github.com/NOAA-OWP/inundation-mapping/pull/1238)

Prior to this fix, fim_post_processing.sh took just under 4 hours to reset permissions on all files and folder under the entire run. On closer inspection, it was updating permissions for all HUC folders where were already correct. A few other folders needed to have permission updates added. This will speed that up significantly.

Also, use this opportunity to added a new note to hash_compare.py and fix an annoying duration time showing milliseconds.

### Changes
- `fim_post_processing.sh`: permissions reset fix
- `src\src_adjust_ras2fim_rating.py`: minor duration display msg change.
- `tools\hash_compare.py`: Added note

<br/><br/>


## v4.5.3.1 - 2024-07-24 - [PR#1233](https://github.com/NOAA-OWP/inundation-mapping/pull/1233)

In a PR [1217](https://github.com/NOAA-OWP/inundation-mapping/pull/1217), which is about to be merged, it updates a bunch of python packages. One is numpy. This has triggered a very large amount of on-screen output from a new numpy warning while running `synthesize_test_cases.py`.
Expand Down
4 changes: 3 additions & 1 deletion fim_post_processing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ date -u

l_echo $startDiv"Resetting Permissions"
Tstart
find $outputDestDir -type d -exec chmod -R 777 {} +
find $outputDestDir/logs/ -type d -exec chmod -R 777 {} +
find $outputDestDir/branch_errors/ -type d -exec chmod -R 777 {} +
find $outputDestDir/unit_errors/ -type d -exec chmod -R 777 {} +
find $outputDestDir -type f -exec chmod 777 {} + # just root level files
Tcount

Expand Down
3 changes: 2 additions & 1 deletion src/src_adjust_ras2fim_rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def create_ras2fim_rating_database(ras_rc_filepath, ras_elev_df, nwm_recurr_file
) # , nrows=30000)
ras_rc_df.rename(columns={'fid_xs': 'location_id'}, inplace=True)
# ras_rc_df['location_id'] = ras_rc_df['feature_id'].astype(object)
print('Duration (read ras_rc_csv): {}'.format(dt.datetime.now() - start_time))
run_time = dt.datetime.now() - start_time
print(f"Duration (read ras_rc_csv): {str(run_time).split('.')[0]}")

# convert WSE navd88 values to meters
ras_rc_df.rename(
Expand Down
4 changes: 4 additions & 0 deletions tools/hash_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def main(arg1, arg2, image_only, log_file, gpkg):
Please be advised that this feature has not been thoroughly tested to ensure robustness.

When arg1 and arg2 are single files, the files names need not match but the extensions must match.

Note: If any file has a date/time field, it will likely never be successful on a hash compare. This
is seen often in gpkgs.

"""

if log_file is not None:
Expand Down
Loading