Skip to content

Auto-generated constants.py#305

Merged
jarq6c merged 12 commits intoNOAA-OWP:mainfrom
jarq6c:waterdata-constants
Apr 16, 2026
Merged

Auto-generated constants.py#305
jarq6c merged 12 commits intoNOAA-OWP:mainfrom
jarq6c:waterdata-constants

Conversation

@jarq6c
Copy link
Copy Markdown
Collaborator

@jarq6c jarq6c commented Apr 15, 2026

This PR introduces auto-generated modules using Jinja2 templates. Dependencies are limited to the package's develop target.

Additions

  • scripts/build_constants.py CLI tool to build the constants.py module.
  • templates/constants.py.j2 Jinja2 template for constants.py

Changes

  • Old manually created constants.py has been replaced by a generated module.

Testing

  1. tests/test_constants.py
  2. scripts/test_build_constants.py

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
  • Reviewers requested with the Reviewers tool ➡️

@jarq6c jarq6c requested a review from christophertubbs April 15, 2026 17:57
@jarq6c jarq6c self-assigned this Apr 15, 2026
@jarq6c jarq6c added the enhancement New feature or request label Apr 15, 2026
Copy link
Copy Markdown
Contributor

@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.

I've got a few nitpicks but no real blockers. Good work on keeping the scope down.

Comment thread python/waterdata_client/scripts/build_constants.py
Comment thread python/waterdata_client/scripts/build_constants.py Outdated
Comment thread python/waterdata_client/scripts/build_constants.py Outdated
Comment thread python/waterdata_client/scripts/build_constants.py Outdated
Copy link
Copy Markdown
Contributor

@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.

👍🏻

@jarq6c jarq6c merged commit 0a7256c into NOAA-OWP:main Apr 16, 2026
3 checks passed
@jarq6c jarq6c deleted the waterdata-constants branch April 21, 2026 14:43
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