-
Notifications
You must be signed in to change notification settings - Fork 94
Remove max_results #835
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
Remove max_results #835
Conversation
ehinman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. I want to do some actual testing of the functions on Friday, but I've taken a quick look at the diffs. A few small comments.
| # expect_equal(chi_iv$dateTime[nrow(chi_iv)], as.POSIXct("2014-05-01T12:00", | ||
| # format = "%Y-%m-%dT%H:%M", | ||
| # tz = "America/Chicago" | ||
| # )) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just to cut down on testing time, especially since we have a replacement continuous function now?
| grepl("/", datetime)){ | ||
| return(datetime) | ||
| } else { | ||
| datetime1 <- tryCatch({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you catching here? The following works without warning for me:
lubridate::as_datetime("2010-01-01T00:00:15Z")
Are you catching something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is funky:
> lubridate::as_datetime("2010-01-01T00:00Z")
[1] "2020-10-01 01:00:00 UTC"
> lubridate::as_datetime("2014-05-01T00:00Z")
[1] NA
Warning message:
All formats failed to parse. No formats found. | # Move other id columns: | ||
| return_list <- move_id_col(return_list, | ||
| output_id) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that you moved this out of the individual functions, plus the column moving piece.
Co-authored-by: Elise Hinman <121896266+ehinman@users.noreply.github.com>
|
General comment: I would change the |
|
Interesting that the service does not stop you from trying to download a date range that goes back in time: |
|
This is a pretty edge case, but when I ran the following without my API key, I got this error: When I try it with Possible to make the behavior the same across scenarios? |
ehinman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good to me, and my tests worked fine. I'm approving this PR, though I have some optional comments to consider, either already left above, or see below:
I'm having a hard time finding where attributes are documented for the water data API functions. I have a feeling most people using the functions won't even know about the available attributes (I had to Google how to see all the attributes, myself 😆 ). It might be nice to document this somewhere in the Water Data API documentation/vignettes (I do see some documentation using the older functions).
I'll make an issue for this. |
No description provided.