Skip to content

Switch WQP default profile from legacy to WQX3.0#230

Open
thodson-usgs wants to merge 1 commit intoDOI-USGS:mainfrom
thodson-usgs:switch-wqp-default-profile
Open

Switch WQP default profile from legacy to WQX3.0#230
thodson-usgs wants to merge 1 commit intoDOI-USGS:mainfrom
thodson-usgs:switch-wqp-default-profile

Conversation

@thodson-usgs
Copy link
Copy Markdown
Collaborator

Closes #121

Summary

  • Changed all WQP function signatures from legacy=True to legacy=False
  • get_results, what_sites, and what_activities now route to WQX3.0 endpoints by default
  • Functions without a WQX3.0 equivalent (what_organizations, what_projects, what_detection_limits, what_habitat_metrics, what_project_weights, what_activity_metrics) emit a UserWarning when called with the default legacy=False, making it clear the user is getting legacy data
  • legacy=True still works but triggers a DeprecationWarning directing users to remove it
  • Removed the now-unnecessary _warn_wqx3_use() function (WQX3.0 is no longer experimental)

Test plan

  • Updated test_what_sites and test_what_activities to mock WQX3.0 URLs
  • Added test_get_results_legacy to verify legacy=True triggers DeprecationWarning
  • All 93 unit tests pass (pytest tests/ --ignore=tests/ngwmn_test.py --ignore=tests/waterdata_test.py)

🤖 Generated with Claude Code

Change all WQP functions from legacy=True to legacy=False so that
get_results, what_sites, and what_activities route to WQX3.0 endpoints
by default. Functions without a WQX3.0 equivalent now emit a UserWarning
instead of silently returning legacy data. legacy=True still works but
triggers a DeprecationWarning. Closes DOI-USGS#121.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thodson-usgs thodson-usgs marked this pull request as ready for review April 13, 2026 23:23
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.

switch default WQP services profile

1 participant