From 8bc760f6ed0c877d3e76babcb85f15cd35880948 Mon Sep 17 00:00:00 2001 From: David Brown <50154982+dbrownf@users.noreply.github.com> Date: Fri, 13 Oct 2023 13:36:26 -0400 Subject: [PATCH] Update with CRAN version 0.0.2 --- DESCRIPTION | 4 ++-- NAMESPACE | 2 +- NEWS.md | 18 +++++++++++++++--- R/extract.R | 6 +++--- R/globals.R | 1 + cran-comments.md | 32 +++++++++++++++++++------------- inst/CITATION | 27 +++++++++++++-------------- man/ag5_extract.Rd | 2 +- 8 files changed, 55 insertions(+), 37 deletions(-) create mode 100644 R/globals.R diff --git a/DESCRIPTION b/DESCRIPTION index 0f58403..c6dd9c2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -16,7 +16,7 @@ Authors@R: c(person(given = "David", Description: Tools for downloading and extracting data from the Copernicus "Agrometeorological indicators from 1979 to present derived from reanalysis" (AgERA5). -Config/reticulate: +Config/reticulate/autoconfigure: list( packages = list( list(package = "cdsapi", pip = TRUE) @@ -26,7 +26,7 @@ Depends: R (>= 3.5.0) License: MIT + file LICENSE Encoding: UTF-8 LazyData: true -Imports: terra, reticulate, fs, doSNOW, foreach +Imports: terra, reticulate, fs, doParallel, foreach Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 Suggests: diff --git a/NAMESPACE b/NAMESPACE index 3bf0722..7732703 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,7 +4,7 @@ S3method(ag5_extract,data.frame) S3method(ag5_extract,numeric) export(ag5_download) export(ag5_extract) -importFrom(doSNOW,registerDoSNOW) +importFrom(doParallel,registerDoParallel) importFrom(foreach,"%dopar%") importFrom(foreach,foreach) importFrom(parallel,makeCluster) diff --git a/NEWS.md b/NEWS.md index 006d574..9aa3077 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,18 @@ -# ag5Tools 0.0.1 +# ag5Tools 0.0.2 + +## Major changes + +- Add version parameter to function *ag5_download*, now required by AgERA5 database. + +## Enhancements -## First release version +- Use parallelization to function *ag5_extract* to speed up files search -* Added a `NEWS.md` file to track changes to the package. +## Bug fixes + +Correct parameter in help of function *ag5_extract* from 24_hour_minimum to Min-24h + + +# ag5Tools 0.0.1 +- First version on CRAN diff --git a/R/extract.R b/R/extract.R index dd9f159..41375ee 100644 --- a/R/extract.R +++ b/R/extract.R @@ -46,7 +46,7 @@ #'\itemize{ #'\item Max-24h #'\item Mean-24h -#'\item 24_hour_minimum +#'\item Min-24h #'\item Max-Day-Time #'\item Mean-Day-Time #'\item Mean-Night-Time @@ -98,7 +98,7 @@ #'@importFrom terra extract #'@importFrom utils txtProgressBar setTxtProgressBar -#'@importFrom doSNOW registerDoSNOW +#'@importFrom doParallel registerDoParallel #'@importFrom parallel makeCluster stopCluster #'@importFrom foreach foreach %dopar% #'@export @@ -232,7 +232,7 @@ ag5_extract.data.frame <- function(coords, cl <- parallel::makeCluster(ncores) - doSNOW::registerDoSNOW(cl) + doParallel::registerDoParallel(cl) progress <- function(X) {setTxtProgressBar(progress_bar, X)} diff --git a/R/globals.R b/R/globals.R new file mode 100644 index 0000000..eb8a0a1 --- /dev/null +++ b/R/globals.R @@ -0,0 +1 @@ +utils::globalVariables("i") diff --git a/cran-comments.md b/cran-comments.md index 10d0110..97e98db 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,26 +1,32 @@ -This is a re-submission +This is an update for package ag5tools ## R CMD check results -### local environment - devtools::check() +### local environment - R CMD check --as-cran + +using R version 4.2.2 (2022-10-31) +* using platform: aarch64-apple-darwin20 (64-bit) +* using session charset: UTF-8 + +Status: 1 NOTE + +* checking CRAN incoming feasibility ... NOTE +Maintainer: ‘David Brown ’ + +New maintainer: + David Brown +Old maintainer(s): + David Brown + +### Win-builder +* https://win-builder.r-project.org/QAS2yDGgBqFS/ -"Windows" - "10 x64" - "build 19044" -0 errors v | 0 warnings v | 0 notes v -### rhub::check_for_cran() -https://builder.r-hub.io/status/ag5Tools_0.0.1.tar.gz-a75e734ac5cb43a096aaa31b186d5f23 -https://builder.r-hub.io/status/ag5Tools_0.0.1.tar.gz-9269a59d24624e7aa7e5caed04a011df -https://builder.r-hub.io/status/ag5Tools_0.0.1.tar.gz-05e183bb4b56439e8469011da32348f1 -Note -https://builder.r-hub.io/status/ag5Tools_0.0.1.tar.gz-a75e734ac5cb43a096aaa31b186d5f23#L510 -## Previous submission problem - Fixed -I have added \value to .Rd files regarding exported methods and explained -the functions results in the documentation. Thanks. diff --git a/inst/CITATION b/inst/CITATION index b4de7d8..3ce561d 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -1,14 +1,13 @@ -citHeader("To cite package ‘ag5Tools’ in publications, please use:") - -citEntry(entry = "Article", - title = "{ag5Tools: An R package for downloading and extracting agrometeorological data from the AgERA5 database}", - author = c(person("David", "Brown"), person("Kauê","de Sousa"),person("Jacob","van Etten")), - year = "2023", - doi = "10.1016/j.softx.2022.101267", - journal = "SoftwareX", - publisher = "Elsevier BV", - volume = 21, - number = 2023, - pages = 101267, - url = "https://doi.org/10.1016/j.softx.2022.101267", - textVersion = "Brown, D., de Sousa, K., & van Etten, J. (2023). ag5Tools: An R package for downloading and extracting agrometeorological data from the AgERA5 database. SoftwareX (Vol. 21, p. 101267). https://doi.org/10.1016/j.softx.2022.101267") +bibentry( + bibtype = "Article", + title = "{ag5Tools: An R package for downloading and extracting agrometeorological data from the AgERA5 database}", + author = c(person("David", "Brown"), person("Kauê","de Sousa"),person("Jacob","van Etten")), + year = "2023", + doi = "10.1016/j.softx.2022.101267", + journal = "SoftwareX", + publisher = "Elsevier BV", + volume = 21, + number = 2023, + pages = 101267, + url = "https://doi.org/10.1016/j.softx.2022.101267", + textVersion = "Brown, D., de Sousa, K., & van Etten, J. (2023). ag5Tools: An R package for downloading and extracting agrometeorological data from the AgERA5 database. SoftwareX (Vol. 21, p. 101267). https://doi.org/10.1016/j.softx.2022.101267") diff --git a/man/ag5_extract.Rd b/man/ag5_extract.Rd index bc055a4..d48827d 100644 --- a/man/ag5_extract.Rd +++ b/man/ag5_extract.Rd @@ -103,7 +103,7 @@ and location, where the first dates value is the start date and the second the e \itemize{ \item Max-24h \item Mean-24h -\item 24_hour_minimum +\item Min-24h \item Max-Day-Time \item Mean-Day-Time \item Mean-Night-Time