Skip to content

Commit

Permalink
Merge pull request #15 from AAGI-AUS/invalidkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks authored Nov 29, 2024
2 parents 2d5fee6 + 0c6f552 commit 77eece7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Authors@R: c(
person("Wasin", "Pipattungsakul", , "[email protected]", role = "aut"),
person("Russell", "Edson", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-4607-5396")),
person("Sam", "Rogers", , "[email protected]", role = "aut"),
person("Sam", "Rogers", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-4607-5396")),
person("Max", "Moldovan", , "[email protected]", role = "ctb")
)
Description: Provides access to Australia's TERN (Terrestrial Ecosystem
Expand Down
2 changes: 1 addition & 1 deletion R/get_key.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ get_key <- function() {
if (!nzchar(TERN_API_KEY)) {
.set_tern_key()
} else {
return(gsub("/", "%2f", TERN_API_KEY, fixed = TRUE))
return(TERN_API_KEY)
}
}

Expand Down
4 changes: 4 additions & 0 deletions R/read_smips.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ read_smips <- function(collection = "totalbucket",
api_key = get_key(),
max_tries = 3L,
initial_delay = 1L) {

# Fix any invalid key here, rather than in get_key() in case a user passes a key
api_key <- gsub("/", "%2f", api_key, fixed = TRUE)

attempt <- 1
success <- FALSE

Expand Down
7 changes: 4 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.4.2 (2024-10-31)",
"runtimePlatform": "R version 4.4.2 (2024-10-31 ucrt)",
"author": [
{
"@type": "Person",
Expand All @@ -33,7 +33,8 @@
"@type": "Person",
"givenName": "Sam",
"familyName": "Rogers",
"email": "[email protected]"
"email": "[email protected]",
"@id": "https://orcid.org/0000-0002-4607-5396"
}
],
"contributor": [
Expand Down Expand Up @@ -148,7 +149,7 @@
},
"SystemRequirements": null
},
"fileSize": "176.921KB",
"fileSize": "177.735KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
2 changes: 1 addition & 1 deletion man/nert-package.Rd

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

0 comments on commit 77eece7

Please sign in to comment.