-
Notifications
You must be signed in to change notification settings - Fork 0
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
az_heat() improvements #64
Conversation
Merge commit 'e6ca1aeb4b984ee1928019b8d3ad196f31c945b1' #Conflicts: # tests/testthat/heat_default/hueto/default/default/default.json # tests/testthat/heat_end/hueto/az01/default/default.json # tests/testthat/heat_station/hueto/az09/default/default.json # tests/testthat/heat_station_vector/hueto/az01/default/default.json # tests/testthat/heat_station_vector/hueto/az02/default/default.json # tests/testthat/test-az_heat.R
@jeremylweiss if you could confirm that |
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 nice progress. The confirmation of query and return dates through the messages is assuring, especially when requesting accumulations that start in the latter part of one calendar year and end in the early part of the next calendar year. As in dormancy/bud break models that look at either/both chill or/and heat accumulation.
I'm assuming that when date requests precede the earliest API availability date (currently "2023-01-01"), the new error message will appear once we merge that branch? Right now, az_heat(start_date = "1980-01-01")
doesn't return No data is available before 2021-01-01. Please choose a later date.
Merge commit 'f48239ce0d1df8a1735005f1d6bb7faadc400038' #Conflicts: # NEWS.md
I just merged library(devtools)
load_all()
az_heat(start_date = "1980-01-01")
# Error in parse_params(station_id, start = start_date, end = end_date) :
# No data is available before 2021-01-01. Please choose a later date.
|
Yep, looks good from here, too! A nice confirmation that I was understanding the different branches and merges, phew! 🤣 |
This PR was originally a fix for #63, but I think that might have been mostly fixed by #62. Now contains additional tests for
az_heat()
and some improvements in messages and how missing data for stations is handled.This PR also adds a useful debug option I should have implemented a long time ago. If you run
options(azmet.print_api_call = TRUE)
then you'll see the HTTP request printed for everyaz_*()
function. This will be helpful for debugging. I'm not sure exactly where to document this (or even if it should be documented in a way that end users can see).