Skip to content

Commit 1529626

Browse files
committed
use {devtag} and fix @returns tag
1 parent b75cbad commit 1529626

17 files changed

+325
-35
lines changed

.Rbuildignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@
2121

2222
# flint files
2323
^flint$
24+
^man/dot-check_vars_FALSE\.Rd$
25+
^man/dot-validate_dsn\.Rd$
26+
^man/dot-create_df\.Rd$
27+
^man/dot-tidy_df\.Rd$
28+
^man/dot-read_cache\.Rd$
29+
^man/dot-create_stacks\.Rd$
30+
^man/dot-create_stack\.Rd$
31+
^man/dot-set_cache\.Rd$
32+
^man/dot-get_local\.Rd$

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Config/testthat/edition: 3
5656
Config/testthat/parallel: true
5757
Encoding: UTF-8
5858
Language: en-US
59-
Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd",
60-
"roxyglobals::global_roclet", "roxylint::roxylint"))
59+
Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd", "roxyglobals::global_roclet", "roxylint::roxylint", "devtag::dev_roclet"))
6160
RoxygenNote: 7.3.2
6261
X-schema.org-applicationCategory: Tools
6362
X-schema.org-isPartOf: https://ropensci.org
6463
X-schema.org-keywords: anglia-cru, climate-data, cru-cl2, temperature,
6564
rainfall, elevation, data-access, wind, relative-humidity,
6665
solar-radiation, diurnal-temperature, frost
66+
Config/Needs/build: moodymudskipper/devtag

R/create_CRU_df.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#' @seealso
5858
#' [get_CRU_df].
5959
#'
60-
#' @return A [data.table::data.table] object of \acronym{CRU} \acronym{CL} v.
60+
#' @returns A [data.table::data.table] object of \acronym{CRU} \acronym{CL} v.
6161
#' 2.0 climatology elements.
6262
#'
6363
#' @author Adam H. Sparks, \email{adamhsparks@@gmail.com}

R/create_CRU_stack.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
#' automatically calculated as described in the data
77
#' [readme.txt](https://crudata.uea.ac.uk/cru/data/hrg/tmc/readme.txt) file.
88
#' Data may be cached for later use by this function, saving time downloading
9-
#' files in future using this function. This function can be useful if you have
10-
#' network connection issues that mean automated downloading of the files using
11-
#' \R does not work properly.
9+
#' files in future using this function. This function can be useful if you
10+
#' have network connection issues that mean automated downloading of the files
11+
#' using \R does not work properly or you have cached the files locally for
12+
#' your own future use.
1213
#'
1314
#' @inheritSection get_CRU_df Nomenclature and Units
1415
#' @inheritParams create_CRU_df
@@ -31,8 +32,8 @@
3132
#' @seealso
3233
#' [get_CRU_stack].
3334
#'
34-
#' @return A [base::list] of [terra::rast] objects of \acronym{CRU} \acronym{CL}
35-
#' v. 2.0 climatology elements.
35+
#' @returns A [base::list] of [terra::rast] objects of \acronym{CRU}
36+
#' \acronym{CL} v. 2.0 climatology elements.
3637
#'
3738
#' @export
3839

R/internal_functions.R

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
#' wnd,
4343
#' elv
4444
#' )
45-
#' @noRd
46-
#' @keywords Internal
45+
#' @dev
46+
4747

4848
.check_vars_FALSE <- function(pre,
4949
pre_cv,
@@ -68,8 +68,8 @@
6868
#' Validates user entered dsn value
6969
#'
7070
#' @param dsn User provided value for checking.
71-
#' @keywords Internal
72-
#' @noRd
71+
72+
#' @dev
7373
.validate_dsn <- function(dsn) {
7474
if (missing(dsn)) {
7575
cli::cli_abort(
@@ -106,10 +106,9 @@
106106
#' @param elv Is elv to be returned? Boolean.
107107
#' @param files File list to be used for creating data frame.
108108
#'
109-
#' @return A \CRANpkg{data.table} of all requested values.
110-
#' @keywords Internal
109+
#' @returns A \CRANpkg{data.table} of all requested values.
111110
#' @autoglobal
112-
#' @noRd
111+
#' @dev
113112
.create_df <-
114113
function(tmn, tmx, tmp, dtr, pre, pre_cv, elv, files) {
115114
CRU_df <-
@@ -141,8 +140,8 @@
141140
}
142141

143142
#' Read Files from Disk Directory and Tidy Them
144-
#' @noRd
145-
#' @keywords Internal
143+
#' @dev
144+
146145
.tidy_df <- function(pre_cv, elv, tmn, tmx, .files) {
147146
# create list of tidied data frames ----------------------------------------
148147
CRU_list <-
@@ -187,9 +186,8 @@
187186
#' @param .files a list of CRU CL2.0 files in local storage.
188187
#' @param .pre_cv `Boolean` return pre_cv in the data.
189188
#'
190-
#' @keywords Internal
191189
#' @autoglobal
192-
#' @noRd
190+
#' @dev
193191

194192
.read_cache <- function(.files, .pre_cv) {
195193
month_names <-
@@ -282,9 +280,8 @@
282280
#' `rast`, Boolean.
283281
#' @param files List. Files that are to be used in creating the `rast` object.
284282
#'
285-
#' @keywords Internal
286283
#' @autoglobal
287-
#' @noRd
284+
#' @dev
288285
#'
289286
.create_stacks <- function(tmn, tmx, tmp, dtr, pre, pre_cv, files) {
290287
wrld <-
@@ -360,8 +357,7 @@
360357
#' @param pre_cv `Boolean` include preciptation cv.
361358
#'
362359
#' @autoglobal
363-
#' @keywords Internal
364-
#' @noRd
360+
#' @dev
365361
.create_stack <- function(files,
366362
wrld,
367363
month_names,
@@ -437,8 +433,8 @@
437433
#'
438434
#' @param cache `Boolean` (create) and use local file cache.
439435
#'
440-
#' @keywords Internal
441-
#' @noRd
436+
437+
#' @dev
442438
.set_cache <- function(cache) {
443439
manage_cache <- hoardr::hoard()
444440
manage_cache$cache_path_set(
@@ -483,8 +479,7 @@
483479
#' @param elv Boolean, loads elevation (converted to metres) and returns it in
484480
#' the data frame.
485481
#'
486-
#' @keywords Internal
487-
#' @noRd
482+
#' @dev
488483
.get_local <- function(pre,
489484
pre_cv,
490485
rd0,

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
"applicationCategory": "Tools",
255255
"isPartOf": "https://ropensci.org",
256256
"keywords": ["anglia-cru", "climate-data", "cru-cl2", "temperature", "rainfall", "elevation", "data-access", "wind", "relative-humidity", "solar-radiation", "diurnal-temperature", "frost", "cru", "r", "rstats", "r-package", "peer-reviewed"],
257-
"fileSize": "912.533KB",
257+
"fileSize": "912.393KB",
258258
"citation": [
259259
{
260260
"@type": "ScholarlyArticle",

man/create_CRU_stack.Rd

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dot-check_vars_FALSE.Rd

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dot-create_df.Rd

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dot-create_stack.Rd

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)