Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-release activities #240

Merged
merged 61 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
bd2dfd4
minor document correction.
kartikeyakirar Dec 27, 2023
5e64890
update readme
kartikeyakirar Dec 28, 2023
26f188e
fixing formating readme
kartikeyakirar Dec 28, 2023
133ad15
adding cran-release template
kartikeyakirar Dec 28, 2023
62c9cea
adding crana badges
kartikeyakirar Dec 28, 2023
64b2e0f
setting pkg arg
kartikeyakirar Dec 28, 2023
cd0a3d4
fixing check() issue
kartikeyakirar Dec 28, 2023
33ffb6f
addtional unit-tests.
kartikeyakirar Dec 28, 2023
bdb5666
fixing linter
kartikeyakirar Dec 28, 2023
231b794
fixing spellcheck issue
kartikeyakirar Dec 28, 2023
c72d6f5
Update R/formatters_var_labels.R
kartikeyakirar Jan 2, 2024
0f27ae0
Update README.md
kartikeyakirar Jan 2, 2024
65ff63c
Update R/teal_data-get_code.R
kartikeyakirar Jan 2, 2024
835a981
Update R/formatters_var_labels.R
kartikeyakirar Jan 2, 2024
4559343
Update R/formatters_var_labels.R
kartikeyakirar Jan 2, 2024
3c8ca79
Update R/formatters_var_labels.R
kartikeyakirar Jan 2, 2024
ed215ee
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 2, 2024
492f2de
Update R/join_keys-names.R
kartikeyakirar Jan 2, 2024
a3ec8b5
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 2, 2024
82d8b30
amend suggestions
kartikeyakirar Jan 2, 2024
75bdbef
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 2, 2024
cd7f9e6
'trigger'
kartikeyakirar Jan 3, 2024
7260776
fixing lintr
kartikeyakirar Jan 3, 2024
b46d823
Merge branch 'main' into pre-release-cleanup@main
chlebowa Jan 3, 2024
6678a34
collate and improve docs (#241)
chlebowa Jan 3, 2024
dcf2c43
amend suggestion.
kartikeyakirar Jan 4, 2024
87075ac
fixing formating
kartikeyakirar Jan 4, 2024
11a227a
updated documentation
kartikeyakirar Jan 5, 2024
5a46b81
fixing spelling issue.
kartikeyakirar Jan 5, 2024
5017ea3
tweak documentation for col_labels
Jan 5, 2024
cdf0105
adjust unit tests for join_keys
Jan 5, 2024
844228e
amend suggestions
kartikeyakirar Jan 5, 2024
5f112b1
Merge branch 'main' into pre-release-cleanup@main
kartikeyakirar Jan 5, 2024
c61051f
Update tests/testthat/test-formatters_var_labels.R
kartikeyakirar Jan 5, 2024
b18e9ef
adding regex
kartikeyakirar Jan 5, 2024
2e29c4e
Merge branch 'pre-release-cleanup@main' of https://github.com/insight…
kartikeyakirar Jan 5, 2024
4d238d3
improve label functions (#244)
chlebowa Jan 8, 2024
e12a96b
Update R/formatters_var_labels.R
averissimo Jan 8, 2024
9e65c9f
fix test.
kartikeyakirar Jan 9, 2024
27fb41b
amend suggestions.
kartikeyakirar Jan 10, 2024
777d0b6
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 10, 2024
701ab98
'trigger'
kartikeyakirar Jan 10, 2024
44df7a1
adding latest rd syntax
kartikeyakirar Jan 11, 2024
93e6b9d
resolving conflict
kartikeyakirar Jan 11, 2024
3a3f2c5
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 11, 2024
61e5393
'trigger'
kartikeyakirar Jan 11, 2024
3af24bf
pkgdown sentence case.
kartikeyakirar Jan 11, 2024
7df1fe1
adding authors according to contribution
gogonzo Jan 12, 2024
cdffe8e
upgrade teal.code dependency
gogonzo Jan 12, 2024
3d47e3f
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 12, 2024
4a0cd9a
adding backticks on keywords
kartikeyakirar Jan 12, 2024
ea6ddea
Corrects JoinKeys vignette and adds merge section (#247)
averissimo Jan 12, 2024
5887995
@chlebowa
kartikeyakirar Jan 12, 2024
6484488
Merge branch 'pre-release-cleanup@main' of https://github.com/insight…
kartikeyakirar Jan 12, 2024
3e071ad
keyword change (consolidation)
kartikeyakirar Jan 12, 2024
18d510d
adding @return tag
kartikeyakirar Jan 12, 2024
de4c31c
Update R/join_keys-utils.R
chlebowa Jan 12, 2024
5af51c1
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 12, 2024
2d07dc4
improve example_cdisc_data
Jan 12, 2024
a106758
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jan 12, 2024
229d51b
add backticks
Jan 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions .github/ISSUE_TEMPLATE/cran-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
name: 🎉 CRAN Release
description: Template for release to CRAN
title: "[Release]: <version>"
labels: ["release"]
assignees:
- KlaudiaBB
- cicdguy
- shajoezhu
pawelru marked this conversation as resolved.
Show resolved Hide resolved
body:
- type: markdown
attributes:
value: |
⚠️ Please do not link or mention any internal references in this issue. This includes internal URLs, intellectual property and references.
- type: textarea
id: blocked-by
attributes:
label: Blocked by
description: Any PRs or issues that this release is blocked by.
placeholder: Add a list of blocking PRs or issues here.
value: |
### PRs

- [ ] PR 1

### Issues

- [ ] Issue 1
validations:
required: true
- type: textarea
id: pre-release
attributes:
label: Pre-release
description: Pre-requisites that must be fulfilled before initiating the release process.
placeholder: Add your list of pre-requisites here.
value: |
- [ ] Make sure you adhere to CRAN submission policy: https://cran.r-project.org/web/packages/submission_checklist.html; https://cran.r-project.org/web/packages/policies.html.
- [ ] Make sure that high priority bugs (label "priority" + "bug") have been resolved before going into the release.
- [ ] Review old/hanging PRs before going into the release (Optional).
- [ ] Revisit R-package's lifecycle badges (Optional).
- [ ] Make sure that all upstream dependencies of this package that need to be submitted to CRAN were accepted before going into release activities.
- [ ] Make sure integration tests are green 2-3 days before the release. Look carefully through logs (check for warnings and notes).
- [ ] Decide what gets merged in before starting release activities.
- type: textarea
id: release
attributes:
label: Release
description: The steps to be taken in order to create a release.
placeholder: Steps to create a release.
value: |
### Prepare the release

- [ ] Create a new release candidate branch
`git checkout -b release-candidate-vX.Y.Z`
- [ ] Update NEWS.md file: make sure it reflects a holistic summary of what has changed in the package.
- [ ] Remove the additional fields (`Remotes`) from the DESCRIPTION file where applicable.
- [ ] Make sure that the minimum dependency versions are updated in the DESCRIPTION file for the package and its reverse dependencies (Optional).
- [ ] Increase versioned dependency on {package name} to >=X.Y.Z (Optional).
- [ ] Commit your changes and create the PR on GitHub (add "[skip vbump]" in the PR title). Add all updates, commit, and push changes:
`# Make the necessary modifications to your files
# Stage the changes
git add <files your modified>
# Commit the changes
git commit -m "[skip vbump] <Your commit message>"
git push origin release-candidate-vX.Y.Z`

### Test the release

- [ ] Execute the manual tests on Shiny apps that are deployed on various hosting providers (Posit connect and shinyapps.io) - track the results in GitHub issue (Applicable only for frameworks that use Shiny).
- [ ] Monitor integration tests, if integration fails, create priority issues on the board.
- [ ] Execute UAT tests (Optional).

### CRAN submission

- [ ] Tag the update(s) as a release candidate vX.Y.Z-rc<iteration-number> (e.g. v0.5.3-rc1) on the release candidate branch (release-candidate-vX.Y.Z).
`# Create rc tag for submission for internal validation
git tag vX.Y.Z-rc<iteration number>
git push origin vX.Y.Z-rc<iteration number>`
- [ ] Build the package locally using the command:`R CMD build .` which will generate a .tar.gz file necessary for the CRAN submission.
- [ ] Submit the package to https://win-builder.r-project.org/upload.aspx for testing, for more details please see "Building and checking R source packages for Windows": https://win-builder.r-project.org/.
- [ ] Once tested, send the package that was built in the previous steps to CRAN via this form: https://cran.r-project.org/submit.html.
- [ ] Address CRAN feedback, tag the package vX.Y.Z-rc(n+1) and repeat the submission to CRAN whenever necessary.
- [ ] Get the package accepted and published on CRAN.

### Tag the release

- [ ] If the additional fields were removed, add them back in a separate PR, and then merge the PR back to main (add "[skip vbump]" in the PR title). If nothing was removed just merge the PR you created in the "Prepare the release" section to 'main'. Note the commit hash of the merged commit. **Note:** additional commits might be added to the `main` branch by a bot or an automation - we do **NOT** want to tag this commit.

### Make sure of the following before continuing

- [ ] CI checks are passing in GH before releasing the package.
- [ ] Shiny apps are deployable and there are no errors/warnings (Applicable only for frameworks that use Shiny).

- [ ] Create a git tag with the final version set to vX.Y.Z on the main branch. In order to do this:
1. Checkout the commit hash.
`git checkout <commit hash>`
2. Tag the hash with the release version (vX.Y.Z).
`git tag vX.Y.Z`
3. Push the tag to make the final release.
`git push origin vX.Y.Z`
- [ ] Update downstream package dependencies to (>=X.Y.Z) in {package name}.
Note: Once the release tag is created, the package is automatically published to internal repositories.
- type: textarea
id: post-release
attributes:
label: Post-release
description: The list of activities to be completed after the release.
placeholder: The steps that must be taken after the release.
value: |
- [ ] Ensure that CRAN checks are passing for the package.
- [ ] Make sure that the package is published to internal repositories.
- [ ] Make sure internal documentation is up to date.
- [ ] Review and update installation instructions for the package wherever needed (Optional).
- [ ] Update all integration tests to reference the new release.
- [ ] Announce the release on ________.
- type: textarea
id: decision-tree
attributes:
label: Decision tree
description: Any decision tree(s) that would aid release management
placeholder: Any decision tree(s) that would aid release management.
value: |
Click [here](https://github.com/insightsengineering/.github/blob/main/.github/ISSUE_TEMPLATE/RELEASE_DECISION_TREE.md) to see the release decision tree.
4 changes: 2 additions & 2 deletions R/cdisc_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#' )
#'
#' data <- within(data, {
#' ADSL <- teal.data::example_cdisc_data("ADSL")
#' ADTTE <- teal.data::example_cdisc_data("ADTTE")
#' ADSL <- example_cdisc_data("ADSL")
#' ADTTE <- example_cdisc_data("ADTTE")
#' })
#'
cdisc_data <- function(...,
Expand Down
5 changes: 3 additions & 2 deletions R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ get_join_keys <- function(data) {
}

#' @rdname col_labels
#' @inheritParams col_labels
#' @param data a data.frame object
#' @param data a `data.frame` object
#' @param fill (`logical(1)`) boolean in case the `label` attribute does not exist if
#' `TRUE` the variable names is returned, otherwise `NA`.Default is `FALSE`.
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' @export
get_labels <- function(data, fill = TRUE) {
lifecycle::deprecate_stop(
Expand Down
26 changes: 13 additions & 13 deletions R/formatters_var_labels.R
chlebowa marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#' Get Label Attributes of Variables in a \code{data.frame}
#' Get Label Attributes of Variables in a `data.frame`
#'
#' Variable labels can be stored as a \code{label} attribute for each variable.
#' Variable labels can be stored as a `label` attribute for each variable.
#' This functions returns a named character vector with the variable labels
#' (empty sting if not specified)
#'
#' @param x a \code{data.frame} object
#' @param fill boolean in case the \code{label} attribute does not exist if
#' \code{TRUE} the variable names is returned, otherwise \code{NA}
#' @param x a `data.frame` object
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' @param fill (`logical(1)`) boolean in case the `label` attribute does not exist if
#' `TRUE` the variable names is returned, otherwise `NA`.Default is `FALSE`.
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#'
#' @source This function was taken 1-1 from
#' \href{https://cran.r-project.org/package=formatters}{formatters} package, to reduce the complexity of
Expand Down Expand Up @@ -56,21 +56,21 @@ col_labels <- function(x, fill = FALSE) {
labels
}

#' Set Label Attributes of All Variables in a \code{data.frame}
#' Set Label Attributes of All Variables in a `data.frame`
#'
#' Variable labels can be stored as a \code{label} attribute for each variable.
#' This functions sets all non-missing (non-NA) variable labels in a \code{data.frame}
#' Variable labels can be stored as a `label` attribute for each variable.
#' This functions sets all non-missing (non-NA) variable labels in a `data.frame`
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#'
#' @inheritParams col_labels
#' @param value new variable labels, \code{NA} removes the variable label
#' @param value new variable labels, `NA` removes the variable label
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#'
#' @source This function was taken 1-1 from
#' \href{https://cran.r-project.org/package=formatters}{formatters} package, to reduce the complexity of
#' the dependency tree.
#'
#' @seealso [col_labels()] [col_relabel()]
#'
#' @return modifies the variable labels of \code{x}
#' @return modifies the variable labels of `x`
chlebowa marked this conversation as resolved.
Show resolved Hide resolved
#'
#' @export
#'
Expand Down Expand Up @@ -101,15 +101,15 @@ col_labels <- function(x, fill = FALSE) {
x
}

#' Copy and Change Variable Labels of a \code{data.frame}
#' Copy and Change Variable Labels of a `data.frame`
#'
#' Relabel a subset of the variables
#'
#' @inheritParams col_labels<-
#' @param ... name-value pairs, where name corresponds to a variable name in
#' \code{x} and the value to the new variable label
#' `x` and the value to the new variable label
#'
#' @return a copy of \code{x} with changed labels according to \code{...}
#' @return a copy of `x` with changed labels according to `...`
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#'
#' @source This function was taken 1-1 from
#' \href{https://cran.r-project.org/package=formatters}{formatters} package, to reduce the complexity of
Expand Down
2 changes: 1 addition & 1 deletion R/join_keys-extract.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
#' @rdname join_keys
#'
#' @order 1000
#' @usage ## Prefered method is x[i, j] <- value
#' @usage ## Preferred method is x[i, j] <- value
#' x[[i]][[j]] <- value
#'
#' @section Functions:
Expand Down
4 changes: 4 additions & 0 deletions R/join_keys-names.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#' The Names of an `join_keys` Object
#' @inheritParams base::`names<-`
#' @return For `names`, it returns `NULL` or a character vector containing the names of datasets.\cr
#' For `names<-.join_keys`, it returns the updated 'join_keys' object with the keys modified.
#' (Note that the value of names(x) <- value is that of the assignment,
#' value, not the return value from the left-hand side.)
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' @export
`names<-.join_keys` <- function(x, value) {
new_x <- unclass(x)
Expand Down
10 changes: 5 additions & 5 deletions R/join_keys-parents.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ parents.join_keys <- function(x) {
#' # Get parents of join_keys inside teal_data object ---
#'
#' td <- teal_data(
#' ADSL = teal.data::rADSL,
#' ADTTE = teal.data::rADTTE,
#' ADRS = teal.data::rADRS,
#' ADSL = rADSL,
#' ADTTE = rADTTE,
#' ADRS = rADRS,
#' join_keys = default_cdisc_join_keys[c("ADSL", "ADTTE", "ADRS")]
#' )
#' parents(td)
Expand All @@ -58,7 +58,7 @@ parents.teal_data <- function(x) {
#' @export
#' @examples
#'
#' # Assigment of parents ---
#' # Assignment of parents ---
#'
#' jk <- join_keys(
#' join_key("ds1", "ds2", "id"),
Expand Down Expand Up @@ -111,7 +111,7 @@ parents.teal_data <- function(x) {
#' @export
#' @examples
#'
#' # Assigment of parents of join_keys inside teal_data object ---
#' # Assignment of parents of join_keys inside teal_data object ---
#'
#' parents(td) <- list("ADTTE" = "ADSL") # replace existing
#' parents(td)["ADRS"] <- "ADSL" # add new parent
Expand Down
2 changes: 2 additions & 0 deletions R/teal_data-datanames.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#' td <- teal_data(iris = iris)
#' td <- within(td, mtcars <- mtcars)
#' datanames(td)
#'
#' datanames(td) <- c("iris", "mtcars")
#' datanames(td)
#'
#' @name datanames
#' @aliases datanames,teal_data-method
Expand Down
1 change: 1 addition & 0 deletions R/teal_data-get_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#' `expression` (`deparse = FALSE`).
#' @return
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' Either string or an expression representing code used to create the requested data sets.
#'
#' @examples
#'
#' tdata1 <- teal_data()
Expand Down
5 changes: 0 additions & 5 deletions R/topological_sort.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
#'
#' @param graph (named `list`) list with node vector elements
#' @keywords internal
#'
#' @examples
#' teal.data:::topological_sort(list(A = c(), B = c("A"), C = c("B"), D = c("A")))
#' teal.data:::topological_sort(list(D = c("A"), A = c(), B = c("A"), C = c("B")))
#' teal.data:::topological_sort(list(D = c("A"), B = c("A"), C = c("B"), A = c()))
topological_sort <- function(graph) {
# compute in-degrees
in_degrees <- list()
Expand Down
4 changes: 4 additions & 0 deletions R/utils-get_code_dependency.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ extract_calls <- function(pd) {
fix_comments(calls)
}

#' @keywords internal
#' @noRd
get_children <- function(pd, parent) {
idx_children <- abs(pd$parent) == parent
children <- pd[idx_children, c("token", "text", "id", "parent")]
Expand All @@ -82,6 +84,8 @@ get_children <- function(pd, parent) {
}
}

#' @keywords internal
#' @noRd
fix_comments <- function(calls) {
# If the first token is a COMMENT, then it belongs to the previous call.
if (length(calls) >= 2) {
Expand Down
14 changes: 0 additions & 14 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@
#'
#' @param name `character, single or vector` name to check
#' @keywords internal
#'
#' @examples
#' teal.data:::check_simple_name("aas2df")
#' teal.data:::check_simple_name("ADSL")
#' teal.data:::check_simple_name("ADSLmodified")
#' teal.data:::check_simple_name("ADSL_2")
#' teal.data:::check_simple_name("a1")
#' # the following fail
#' \dontrun{
#' teal.data:::check_simple_name("1a")
#' teal.data:::check_simple_name("ADSL.modified")
#' teal.data:::check_simple_name("ADSL_modified")
#' teal.data:::check_simple_name("a1...")
#' }
check_simple_name <- function(name) {
checkmate::assert_character(name, min.len = 1, any.missing = FALSE)
if (!grepl("^[[:alpha:]][a-zA-Z0-9_]*$", name, perl = TRUE)) {
Expand Down
26 changes: 0 additions & 26 deletions R/verify.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,6 @@
#' verify(tdata2)@verified
#' tdata2@verified
#'
#' \dontrun{
#' tdata3 <- teal_data()
#' tdata3 <- within(tdata3, {
#' stop("error")
#' })
#' verify(tdata3)
#'
#'
#' a <- 1
#' b <- a + 2
#' c <- list(x = 2)
#' d <- 5
#' tdata4 <- teal_data(
#' a = a, b = b, c = c, d = d,
#' code =
#' "
#' a <- 1
#' b <- a
#' c <- list(x = 2)
#' e <- 1
#' "
#' )
#' tdata4
#' verify(tdata4)
#' }
#'
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' @name verify
#' @rdname verify
#' @aliases verify,teal_data-method
Expand Down
Loading