Skip to content

Conversation

@jarq6c
Copy link
Collaborator

@jarq6c jarq6c commented Mar 5, 2025

Adds hydrotools.metrics.events module with three basic methods.

Additions

  • flashiness
  • peak
  • runoff_ratio

Removals

Changes

Testing

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • PR is well outlined and documented. See #12 for an example
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (see CONTRIBUTING.md)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output) using numpy docstring formatting
  • Placeholder code is flagged / future todos are captured in comments
  • Reviewers requested with the Reviewers tool ➡️

@jarq6c jarq6c added the enhancement New feature or request label Mar 5, 2025
@jarq6c jarq6c requested a review from christophertubbs March 5, 2025 16:34
@jarq6c jarq6c self-assigned this Mar 5, 2025
Copy link

@christophertubbs christophertubbs left a comment

Choose a reason for hiding this comment

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

Fantastic code and documentation. Extend some of that to your unit tests for perfection.

One habit that may be worth trying out is assigning a computed value prior to returning it. Makes it easier to debug in certain circumstances, especially when there are many moving parts to the calculation. That's not worth changing, just mulling about.

@jarq6c
Copy link
Collaborator Author

jarq6c commented Mar 5, 2025

Thanks for the review @christophertubbs ! I've implemented all the improvements you recommended.

@jarq6c jarq6c merged commit 04c0662 into NOAA-OWP:main Mar 5, 2025
4 checks passed
@jarq6c jarq6c deleted the event-metrics branch March 5, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants