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

New defaults #733

Merged
merged 20 commits into from
Oct 23, 2024
Merged

New defaults #733

merged 20 commits into from
Oct 23, 2024

Conversation

ldecicco-USGS
Copy link
Collaborator

defaults to legacy - so shouldn't break anyone's code. But DOES offer users the chance to use the new services.

@ldecicco-USGS
Copy link
Collaborator Author

@lstanish-usgs and @ehinman take a look and let me know if you have any comments.

@@ -319,7 +319,8 @@ constructNWISURL <- function(siteNumbers,
#' retrieval for the earliest possible record.
#' @param endDate character ending date for data retrieval in the form YYYY-MM-DD. Default is "" which indicates
#' retrieval for the latest possible record.
#' @param legacy Logical. If TRUE, uses legacy WQP services. Default is FALSE.
#' @param legacy Logical. If TRUE, use legacy WQP services. Default is TRUE.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#' @param legacy Logical. If TRUE, use legacy WQP services. Default is TRUE.
#' @param legacy Logical. If TRUE, uses legacy WQP services. If FALSE, uses WQX3.0 WQP services. Default is TRUE.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe you don't want to offer that at this point.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That text is basically in the next line. I do think changing from use to uses sounds better though.

Copy link
Contributor

@ehinman ehinman left a comment

Choose a reason for hiding this comment

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

These changes look good to me, just a couple curiosity questions and one slight wordsmith.

R/readWQPqw.R Outdated
@@ -33,7 +33,8 @@
#' numerics based on a standard algorithm. If false, everything is returned as a character.
#' @param ignore_attributes logical to choose to ignore fetching site and parameter
#' attributes. Default is \code{FALSE}.
#' @param legacy Logical. If TRUE, use legacy WQP services. Default is FALSE.
#' @param legacy Logical. If TRUE, use legacy WQP services. Default is TRUE.
#' Setting legacy = FALSE uses WQX3 services, which are in-development, use with caution.
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I like this message here. But I see. This one is much more visible than the constructNWISURL() function.

if(legacy){
wqp_message()
} else {
wqp_message_beta
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this one need wqp_message_beta()?

baseURL <- drURL("Activity", arg.list = values)
} else {
baseURL <- drURL("ActivityWQX3", arg.list = values)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

So in the development version, this function only performed WQX3.0 calls, but this version adds in the choice?

j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TKQR8KP');</script>
<!-- End Google Tag Manager -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the new page still have google tags? Having trouble locating in the changed text

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added that tag stuff to a new file which is injected into the header. Locally when I build the pkgdown site with the new code it's in there. Once we merge this PR, we can double-check that everything's working as expected on both GitHub and GitLab pages.

@ldecicco-USGS ldecicco-USGS merged commit 25ec8af into DOI-USGS:main Oct 23, 2024
7 of 8 checks passed
@ldecicco-USGS ldecicco-USGS deleted the newDefaults branch November 25, 2024 18:58
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.

3 participants