Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into dev-ci
  • Loading branch information
robgpita committed Nov 9, 2023
2 parents 92cc5a6 + f6b5bd5 commit 13bb4ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The `flake8-pyproject` dependency is now used, as it works out of the box with t
In switching to this package, a couple of `E721` errors appeared. Modifications were made to the appropriate files to resolve the `flake8` `E721` errors.
Also, updates to the `unit_tests` were necessary since Branch IDs have changed with the latest code.

A small fix was also included where `src_adjust_ras2fim_rating.py` which sometimes fails with an encoding error when the ras2fim csv sometimes is created or adjsuted in windows.

### Changes
- `.pre-commit-config.yaml`: use `flake8-pyproject` package instead of `pyproject-flake8`.
- `Pipfile` and `Pipfile.lock`: updated to use `flake8-pyproject` package instead of `pyproject-flake8`.
Expand All @@ -16,6 +18,7 @@ Also, updates to the `unit_tests` were necessary since Branch IDs have changed w
- `write_parquet_from_calib_pts.py`: Add space between (-) operator line 234.
- `src`
- `check_huc_inputs.py`: Change `== string` to `is str`, remove `import string`
- `src_adjust_ras2fim_rating.py`: Fixed encoding error.
- `tools`
- `eval_plots.py`: Add space after comma in lines 207 & 208
- `generate_categorical_fim_mapping.py`: Use `is` instead of `==`, line 315
Expand Down
4 changes: 3 additions & 1 deletion src/src_adjust_ras2fim_rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def create_ras2fim_rating_database(ras_rc_filepath, ras_elev_df, nwm_recurr_file
print('Reading RAS2FIM rating curves from csv...')
log_text = 'Processing database for RAS2FIM flow/WSE at NWM flow recur intervals...\n'
col_filter = ["fid_xs", "flow", "wse"]
ras_rc_df = pd.read_csv(ras_rc_filepath, dtype={'fid_xs': object}, usecols=col_filter) # , nrows=30000)
ras_rc_df = pd.read_csv(
ras_rc_filepath, dtype={'fid_xs': object}, usecols=col_filter, encoding="unicode_escape"
) # , 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))
Expand Down

0 comments on commit 13bb4ed

Please sign in to comment.