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

Update hydrotools.metrics to newer Python versions #261

Merged
merged 9 commits into from
Nov 19, 2024

Conversation

jarq6c
Copy link
Collaborator

@jarq6c jarq6c commented Nov 19, 2024

This PR updates the hydrotools.metrics package to test on Python versions 3.9, 3.10, and 3.11. It also transitions the package from using a setup.cfg to just using pyproject.toml.

Additions

Removals

  • setup.cfg

Changes

  • pyproject.toml
  • Had to switch some docstrings to raw strings due to embeded LaTeX.

Testing

  1. No changes.

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 Nov 19, 2024
@jarq6c jarq6c requested a review from aaraney November 19, 2024 17:21
@jarq6c jarq6c self-assigned this Nov 19, 2024
@jarq6c
Copy link
Collaborator Author

jarq6c commented Nov 19, 2024

All tests past. Going to do a test deployment to see if classifiers/hooks get picked up correctly without setup.cfg.

@jarq6c
Copy link
Collaborator Author

jarq6c commented Nov 19, 2024

All tests past. Going to do a test deployment to see if classifiers/hooks get picked up correctly without setup.cfg.

Deployment looked good. Just needed to revert 7519e7d

We'll adopt the new license once the updated GH policy is released.

@jarq6c
Copy link
Collaborator Author

jarq6c commented Nov 19, 2024

c9b0932 related to: https://nvd.nist.gov/vuln/detail/CVE-2024-6345

Thanks @aaraney !

Copy link
Member

@aaraney aaraney left a comment

Choose a reason for hiding this comment

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

Looks great to me! Thanks, @jarq6c!

python/metrics/pyproject.toml Outdated Show resolved Hide resolved
@@ -44,7 +44,7 @@ def mean_error(
power: float = 1.0,
root: bool = False
) -> float:
"""Compute the mean error or deviation. Default is Mean Absolute Error. The mean error
r"""Compute the mean error or deviation. Default is Mean Absolute Error. The mean error
Copy link
Member

Choose a reason for hiding this comment

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

This is the first time i've seen a docstring defined as a raw string literal. I assume this avoids character escaping headaches in the latex expressions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, the expressions were raising DeprecationWarnings and this was the easiest solution.

@aaraney aaraney merged commit 32d87fb into NOAA-OWP:main Nov 19, 2024
3 checks passed
@jarq6c
Copy link
Collaborator Author

jarq6c commented Nov 19, 2024

@jarq6c jarq6c deleted the metrics-update branch November 19, 2024 21:48
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