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

default creation of empty waterbody dataframes #610

Merged

Conversation

shorvath-noaa
Copy link
Contributor

Creates empty dataframes for waterbody_df and waterbody_types_df if no valid waterbody layer are found in the geopackage

Additions

  • try/except logic while reading waterbody layers in geopackage
  • if there are no waterbody parameters, create empty waterbody dataframes.

Removals

Changes

Testing

Screenshots

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Target Environment support

  • Windows
  • Linux
  • Browser

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Is useable without CSS
  • Is useable without JS
  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

@shorvath-noaa shorvath-noaa reopened this Apr 24, 2023
@shorvath-noaa shorvath-noaa marked this pull request as ready for review April 24, 2023 20:26
.sort_index()
)
except ValueError:
self._waterbody_df = pd.DataFrame()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is reasonable for now, but might be a good idea to log some details later, especially if someone may be expecting to have reservoir data, but it doesn't read correct or is missing...this silent failure might be difficult to track down.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I need to go back and update a lot of the logging/debugging as much of it got jumbled up when we transferred to HYFeatures. I'll add this to that list.

@shorvath-noaa shorvath-noaa merged commit 85743e3 into NOAA-OWP:master Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants