Switch WQP default profile from legacy to WQX3.0#230
Open
thodson-usgs wants to merge 1 commit intoDOI-USGS:mainfrom
Open
Switch WQP default profile from legacy to WQX3.0#230thodson-usgs wants to merge 1 commit intoDOI-USGS:mainfrom
thodson-usgs wants to merge 1 commit intoDOI-USGS:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #121
Summary
legacy=Truetolegacy=Falseget_results,what_sites, andwhat_activitiesnow route to WQX3.0 endpoints by defaultwhat_organizations,what_projects,what_detection_limits,what_habitat_metrics,what_project_weights,what_activity_metrics) emit aUserWarningwhen called with the defaultlegacy=False, making it clear the user is getting legacy datalegacy=Truestill works but triggers aDeprecationWarningdirecting users to remove it_warn_wqx3_use()function (WQX3.0 is no longer experimental)Test plan
test_what_sitesandtest_what_activitiesto mock WQX3.0 URLstest_get_results_legacyto verifylegacy=TruetriggersDeprecationWarningpytest tests/ --ignore=tests/ngwmn_test.py --ignore=tests/waterdata_test.py)🤖 Generated with Claude Code