Skip to content

Commit f3c05c6

Browse files
averissimodependabot-preview[bot]kartikeyakirarm7prgithub-actions[bot]
authored
Pre-release activities (prepare for CRAN release) (#176)
# Pull Request <!--- Replace `#nnn` with your issue link for reference. --> Fixes #172 ### Summary * Review and update: * [x] README.md (check example code) * [x] NEWS.md * one liner change * Review functions: * [x] @example tag, make sure it runs, fix if otherwise * [x] Make sure functions has @return tag to document the return value * [x] no \dontrun tag, replace with if(interactive()) if needed * `merge_datasets` example is insufficient * [x] Package `Title` is not duplicated in Package `Description` in DESCRIPTION file (e.g. this happens in teal.slice currently) * [x] You have checked the Package Release Template https://github.com/insightsengineering/teal.reporter/pull/205/files * [x] Make sure there are no `:::` in examples * if you need to retain the example that uses `:::`, use `getFromNamespace()` function. * [x] remove package:: call and depend package:: call from example. @kartikeyakirar * [x] Make sure all `teal.*` mentions are lower-cased and quoted * [x] Make sure each link to our documentation hosted with pkgdown on github pages do not have `/main/` in the address * it should have has `/latest-tag/` instead * so we always expose the documentation of the latest release and not what's currently on main branch but not yet released * [x] Remove old rd syntax * [x] Switch from title case into sentence case for title and description of functions. * [x] All package names in `Title` and `Description` fields of DESCRIPTION file are quoted with `'` _(not backtick)_ * [x] Sanity check of all vignettes, make sure there is no typo, no wrong format, etc. @kartikeyakirar #### New * [x] Remove prefixes from data calls `rADRS`, `rADTTE`, etc... (just like `{teal.data}`) * [x] Remove `return` wrapper if it is the last expression (per NEST guidelines) * #177 * [x] Remove exception in `.lintr`: `indentation_linter = NULL` * [x] ~Test for unused functions (in package and overall in NEST)~ @averissimo * PR request against this feature branch * 🛑 This should not be done on this release as it may have unintended consequences. * [See this comment](#176 (comment)) with possible candidates * [x] Standard order of roxygen2 tags * `@title ➡️ @doctype ➡️ @description ➡️ @details ➡️ @Rdname ➡️ ` * `➡️ @inheritParams ➡️ @params ➡️ @return ➡️ @Seealso ➡️ @references ➡️` * `➡️ @examples ➡️ @export ➡️ @Keywords ➡️ @noRd` * [x] Remove `@noMd` (in favor of `Roxygen: list(markdown = TRUE)` in `DESCRIPTION`) #### To consider? * [x] Convert "# nolint" to specific rule exception * #178 * [x] ~Added `resolve()` to the list of exported functions as the sub-functions are exported (`resolve.delayed_variable_choices`, ...).~ * Let's discuss if this needs to be reverted. * Edit: this is a trick to have S3methods internally as `resolve` should not be exported see aff0f35 #### Move to its own issue * [x] Make sure non-exported functions do not have examples * #181 #### After checklist is completed _(🚨 blocked until checklist is completed)_ * [x] Run urlchecker::url_check() to identify broken links and fix * [x] Run R CMD check --as-cran make sure everything pass * [x] Make Sure `inst/WORDLIST` is minimalized #### Content review _(🚨 blocked for now)_ All tasks above are mostly focused on structure, standards and cleanup. Here is to look at content What to look for: * Review content of titles, descriptions, params, etc. * They should be clear to the reader * Review vignettes * Review content * All chunks of code are runnable Content-related tasks should have a PR against this feature branch. --------- Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com> Signed-off-by: kartikeya kirar <kirar.kartikeya1@gmail.com> Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: unknown <kirar.kartikeya1@gmail.com> Co-authored-by: m7pr <marcin.kosinski.mk1@roche.com> Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent f7ee2bc commit f3c05c6

File tree

141 files changed

+3456
-2500
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+3456
-2500
lines changed

.lintr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
linters: linters_with_defaults(
22
line_length_linter = line_length_linter(120),
33
cyclocomp_linter = NULL,
4-
object_usage_linter = NULL
4+
object_usage_linter = NULL,
5+
object_name_linter = object_name_linter(styles = c("snake_case", "symbols"), regexes = c(ANL = "^ANL_?[0-9]*$", ADaM = "^r?AD[A-Z]{2,3}_?[0-9]*$"))
56
)

R/Queue.R

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
# Queue ====
22

3-
#' @title R6 Class - A First-In-First-Out Abstract Data Type
3+
#' R6 Class - A First-In-First-Out Abstract Data Type
4+
#' @docType class
5+
#'
6+
#' @description
7+
#' `r lifecycle::badge("experimental")`
48
#'
5-
#' @description `r lifecycle::badge("experimental")`\cr
69
#' Abstract data type that stores and returns any number of elements.
710
#'
11+
#' @details
812
#' A `Queue` object stores all elements in a single vector,
913
#' thus all data types can be stored, but silent coercion may occur.
1014
#'
1115
#' Elements are returned in the same order that they were added.
1216
#'
17+
#' @name Queue
1318
#' @keywords internal
1419
#'
15-
Queue <- R6::R6Class( # nolint
20+
Queue <- R6::R6Class( # nolint: object_name_linter.
1621
classname = "Queue",
1722
# public methods ----
1823
public = list(
1924
#' @description
2025
#' Adds element(s) to `Queue`.
2126
#'
22-
#' @param new_elements vector of elements to add
27+
#' @param new_elements vector of elements to add.
2328
#'
24-
#' @return self invisibly
29+
#' @return `self`, invisibly.
2530
#'
2631
push = function(new_elements) {
2732
for (i in seq_along(new_elements)) {
@@ -34,16 +39,16 @@ Queue <- R6::R6Class( # nolint
3439
#' @description
3540
#' Returns all contents of the `Queue` object.
3641
#'
37-
#' @return single vector containing all `Queue` contents
42+
#' @return Single vector containing all `Queue` contents.
3843
#'
3944
get = function() {
4045
private$array
4146
},
4247
#' @description
4348
#' Returns the first (oldest) element of the `Queue` and removes it.
4449
#'
45-
#' @return
46-
#' vector of length 1 containing the first element of `Queue` or NULL if `Queue` is empty
50+
#' @return vector of length 1 containing the first element of `Queue`
51+
#' or `NULL` if `Queue` is empty.
4752
#'
4853
pop = function() {
4954
returned_element <- self$get()[1L]
@@ -54,9 +59,9 @@ Queue <- R6::R6Class( # nolint
5459
#' Removes the oldest occurrence of specified element(s) from `Queue`.
5560
#' Relies on implicit type conversions of R identify elements to remove.
5661
#'
57-
#' @param elements vector of elements to remove from `Queue`
62+
#' @param elements vector of elements to remove from `Queue`.
5863
#'
59-
#' @return self invisibly
64+
#' @return `self`, invisibly.
6065
#'
6166
remove = function(elements) {
6267
for (el in elements) {
@@ -68,7 +73,7 @@ Queue <- R6::R6Class( # nolint
6873
#' @description
6974
#' Removes all elements from `Queue`.
7075
#'
71-
#' @return self invisibly
76+
#' @return `self`, invisibly.
7277
#'
7378
empty = function() {
7479
private$array <- c()
@@ -77,17 +82,17 @@ Queue <- R6::R6Class( # nolint
7782
#' @description
7883
#' Returns the number of elements in `Queue`.
7984
#'
80-
#' @return integer of length 1
85+
#' @return `integer(1)`.
8186
#'
8287
size = function() {
8388
length(self$get())
8489
},
8590
#' @description
8691
#' Prints this `Queue`.
8792
#'
88-
#' @param ... additional arguments to this method, ignored
93+
#' @param ... Additional arguments to this method, ignored.
8994
#'
90-
#' @return invisibly self
95+
#' @return `self`, invisibly.
9196
print = function(...) {
9297
cat(
9398
sprintf(

R/all_choices.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
#' An S3 structure representing the selection of all
2-
#' possible choices in a `filter_spec`, `select_spec` or `choices_selected` object.
1+
#' Bare constructor for `all_choices` object
32
#'
4-
#' @description `r lifecycle::badge("experimental")`
3+
#' @description
4+
#' `r lifecycle::badge("experimental")`
55
#'
6-
#' @return `all_choices` object
6+
#' An S3 structure representing the selection of all possible choices in a
7+
#' `filter_spec`, `select_spec` or `choices_selected` object.
8+
#'
9+
#' @return `all_choices` object.
710
#'
811
#' @examples
912
#' # Both structures are semantically identical
@@ -22,6 +25,7 @@
2225
#' choices_selected(choices = letters, selected = letters)
2326
#' choices_selected(choices = letters, selected = all_choices())
2427
#' @export
28+
#'
2529
all_choices <- function() {
2630
structure(list(), class = "all_choices")
2731
}

0 commit comments

Comments
 (0)