Skip to content

Commit

Permalink
Merge branch 'usa-npn:master' into gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Aariq authored Jan 23, 2024
2 parents 1921856 + 48a80a5 commit 7d7f5fc
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description: Programmatic interface to the
Web Service methods provided by the National 'Phenology' Network
(<https://usanpn.org/>), which includes data on various life history
events that occur at specific times.
Version: 1.2.6
Version: 1.2.6.9000
License: MIT + file LICENSE
Authors@R: c(
person("Jeff", "Switzer", role = c("aut", "cre"), email = "[email protected]"),
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rnpn 1.2.6 (2023-08-07)
# rnpn (development version)

rnpn 1.2.6 (2023-08-28)
=======================

### NEW FEATURES
Expand Down
3 changes: 1 addition & 2 deletions R/npn_data_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -776,11 +776,10 @@ npn_get_data <- function(

#' Generate Download URL
#'
#' Utility function to create the service point URL. Base URL comes from zzz.R, endpoint is specified in the code, and query_vars should be a list of parameters.
#' Utility function to create the service point URL. Base URL comes from zzz.R, endpoint is specified in the code.
#' This function will manually put those query parameters into the proper GET syntax.
#'
#' @param endpoint The service point, e.g. "observations/getObservations.json?"
#' @param query_vars List of query parameters.
#'
#' @return The URL, as a string.
#' @keywords internal
Expand Down
8 changes: 4 additions & 4 deletions R/npn_geoserver.R
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,9 @@ npn_get_custom_agdd_time_series <- function(
method <- tolower(method)

if(method == "simple"){
base_url <- paste0(base_data_domain(), "geoservices/v1/agdd/simple/pointTimeSeries?")
base_url <- paste0(base_data_domain(), "geo-services/v1/agdd/simple/pointTimeSeries?")
}else{
base_url <- paste0(base_data_domain(), "geoservices/v1/agdd/double-sine/pointTimeSeries?")
base_url <- paste0(base_data_domain(), "geo-services/v1/agdd/double-sine/pointTimeSeries?")
}

url <- paste0(base_url, "climateProvider=", climate_data_source)
Expand Down Expand Up @@ -541,9 +541,9 @@ npn_get_custom_agdd_raster <- function(
ras <- NULL

if(method == "simple"){
base_url <- paste0(base_data_domain(),"geoservices/v1/agdd/simple/map?")
base_url <- paste0(base_data_domain(),"geo-services/v1/agdd/simple/map?")
}else{
base_url <- paste0(base_data_domain(),"geoservices/v1/agdd/double-sine/map?")
base_url <- paste0(base_data_domain(),"geo-services/v1/agdd/double-sine/map?")
}


Expand Down
8 changes: 4 additions & 4 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ base <- function(){
}

if(pkg.env$remote_env=="ops"){
return('https://www.usanpn.org/npn_portal/')
return('https://services.usanpn.org/npn_portal/')
}else{
return('https://www-dev.usanpn.org/npn_portal/')
return('https://services-staging.usanpn.org/npn_portal/')
}
}

Expand All @@ -129,9 +129,9 @@ base_data_domain <- function(){
}

if(pkg.env$remote_env=="ops"){
return('https://data.usanpn.org/')
return('https://services.usanpn.org/')
}else{
return('https://data-dev.usanpn.org/')
return('https://services-staging.usanpn.org/')
}
}

Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@
},
"SystemRequirements": null
},
"fileSize": "16963.726KB",
"fileSize": "16963.586KB",
"releaseNotes": "https://github.com/usa-npn/rnpn/blob/master/NEWS.md",
"readme": "https://github.com/usa-npn/rnpn/blob/master/README.md",
"contIntegration": ["https://codecov.io/github/usa-npn/rnpn?branch=master", "https://github.com/usa-npn/rnpn/actions"],
"contIntegration": "https://github.com/usa-npn/rnpn/actions",
"developmentStatus": "https://www.repostatus.org/",
"keywords": ["web-api", "species", "data", "rstats", "r", "national-phenology-network", "phenology", "r-package"],
"relatedLink": "https://CRAN.R-project.org/package=rnpn"
Expand Down
4 changes: 1 addition & 3 deletions man/npn_get_download_url.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/fixtures/npn_get_custom_agdd_time_series_1.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
http_interactions:
- request:
method: get
uri: https://data-dev.usanpn.org/geoservices/v1/agdd/double-sine/pointTimeSeries?climateProvider=NCEP&temperatureUnit=fahrenheit&startDate=2019-01-01&endDate=2019-01-15&latitude=39.7&longitude=-107.5&lowerThreshold=25&upperThreshold=90
uri: https://services.usanpn.org/geo-services/v1/agdd/double-sine/pointTimeSeries?climateProvider=NCEP&temperatureUnit=fahrenheit&startDate=2019-01-01&endDate=2019-01-15&latitude=39.7&longitude=-107.5&lowerThreshold=25&upperThreshold=90
body:
encoding: ''
string: ''
Expand Down

0 comments on commit 7d7f5fc

Please sign in to comment.