Skip to content

Commit

Permalink
chore: merging in main updates
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'origin/main' into patch

# Conflicts:
#	DESCRIPTION
#	NEWS.md
#	vignettes/bds_tte.Rmd
#	vignettes/pk_adnca.Rmd
  • Loading branch information
bms63 committed Mar 6, 2024
2 parents 569381f + 73237fe commit 3891fef
Show file tree
Hide file tree
Showing 143 changed files with 3,008 additions and 3,162 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Please note that we try to align to best practices used in other R packages' dev

If you decide to contribute with code and you're ready to make your first code contribution, this detailed development process step-by-step guide will help tie all the other detailed vignettes together to give you the simplest experience of helping to grow and enhance our codebase.

1. Create a new feature branch from the development branch `main`
1. Create a new feature branch from the `main` branch
following the naming convention and pull the latest changes - as
detailed on the [GitHub
usage](https://pharmaverse.github.io/admiraldev/articles/git_usage.html#working-with-feature-branches-1) guide.
Expand Down
28 changes: 0 additions & 28 deletions .github/PULL_REQUEST_TEMPLATE/release.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Thank you for your Pull Request! We have developed this task checklist from the [Development Process Guide](https://pharmaverse.github.io/admiral/CONTRIBUTING.html) to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Thank you for your Pull Request! We have developed this task checklist from the [Development Process Guide](https://pharmaverse.github.io/admiral/CONTRIBUTING.html#detailed-development-process) to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the `devel` branch until you have checked off each task.
Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the `main` branch until you have checked off each task.

- [ ] Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
- [ ] Code is formatted according to the [tidyverse style guide](https://style.tidyverse.org/). Run `styler::style_file()` to style R and Rmd files
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ concurrency:
cancel-in-progress: true

env:
R_VERSION: "4.1"
R_VERSION: "release"

jobs:
get_r_version:
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v')
needs: get_r_version
with:
r-version: "4.3"
r-version: "release"
skip-multiversion-docs: true
secrets:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -134,4 +134,4 @@ jobs:
if: github.event_name == 'push'
uses: insightsengineering/r.pkg.template/.github/workflows/version-bump.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.PHARMAVERSE_BOT }}
REPO_GITHUB_TOKEN: ${{ secrets.PHARMAVERSE_BOT }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ admiral*.tgz
.DS_Store
._.DS_Store

.Rprofile
1 change: 1 addition & 0 deletions .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ linters: linters_with_defaults(
line_length_linter(100),
object_usage_linter=NULL,
cyclocomp_linter(complexity_limit = 22),
indentation_linter=NULL,
undesirable_function_linter = undesirable_function_linter()
)
exclusions: list(
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: admiral
Title: ADaM in R Asset Library
Version: 1.0.2
Version: 1.0.2.9012
Authors@R: c(
person("Ben", "Straub", , "[email protected]", role = c("aut", "cre")),
person("Stefan", "Bundfuss", role = "aut"),
Expand Down Expand Up @@ -70,4 +70,4 @@ Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ importFrom(dplyr,starts_with)
importFrom(dplyr,summarise)
importFrom(dplyr,summarise_all)
importFrom(dplyr,tibble)
importFrom(dplyr,transmute)
importFrom(dplyr,tribble)
importFrom(dplyr,ungroup)
importFrom(dplyr,union)
Expand Down
55 changes: 55 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
# admiral (development version)

## New Features

## Updates of Existing Functions

- Created three unit tests for `get_summary_records()`. (#2304)

## Breaking Changes

- The following function arguments are entering the next phase of the deprecation process: (#2299)

- `compute_egfr(wt)`
- `consolidate_metadata(check_keys)`
- `derive_expected_records(dataset_expected_obs)`
- `derive_locf_records(dataset_expected_obs)`
- `derive_extreme_event(ignore_event_order)`
- `derive_vars_merged(match_flag, new_var, analysis_var, summary_fun)`
- `derive_param_computed(analysis_value, analysis_var)`
- `derive_param_exposure(filter, analysis_var, summary_fun)`
- `derive_summary_records(filter)`
- `derive_extreme_records(filter)`
- `derive_var_joined_exist_flag(first_cond, filter)`
- `event_joined(first_cond)`
- `filter_joined(first_cond, filter)`

- The following function arguments have reached the end of the deprecation process and been removed: (#2299)

- `dthcaus_source(traceability_vars)`
- `date_source(traceability_vars)`
- `derive_var_ontrtfl(span_period)`
- `derive_var_shift(na_val)`
- `derive_vars_aage(unit)`

## Documentation

- The documentation of `derive_vars_merged()` function is updated to describe that the `check_type` argument is ignored (an error is issued) if `order` is not specified. (#2326)

## Various

- In the previous version, `renv` was the default framework used to manage package dependencies. Now, we use `devtools` as our main package manager (some changes also occurred for [admiralci workflows](https://github.com/pharmaverse/admiralci)).
There is a possibility to get package dependency versions used for the workflows to ensure local reproducibility. For this, you need to go under the latest action summary in your current PR. You can see a deps artifact. For each version of R used for `R CMD CHECKS` jobs, there is an associated renv.lock file (under the deps artifact):

![Download dependencies from CI workflows](man/figures/dependencies_devtools.png) (#2306)

- The function `dplyr::transmute()` is superseded in favor of `dplyr::mutate(.keep = "none")`. Consequently, all the admiral functions that utilized the former have been updated accordingly. (#2274)

- The templates for ADPP and ADPC are updated for missing variables (#2308) and to make `ATPT` and `ATPTN` consistent. (#2328)

- ADLB template updated to make `PARAM` consistent for `PARAMCD` values `"BASO"` and `"LYMPH"`. (#2327)

- Splitting out `R` and `test` files for date/time functions for cyclomatic complexity refactor (#2340)(#2339)

# admiral 1.0.2

- Fix bug in `derive_param_tte()` where argument `dataset` populated and `PARAMCD` in `set_values_to` argument is an expression. Previously, there was a check early in function to see if `PARAMCD` defined in `set_values_to` argument, already existed in the dataset passed into `dataset` argument. If `PARAMCD` was not an expression i.e. `PARAMCD = "XYZ"` then check worked. However, if `PARAMCD` to be created was an expression, and wasn't resolved yet, this caused an ERROR. The check has been moved to near the end of the function, where `PARAMCD` is resolved in the dataset holding the new parameters. (#2336)
Expand Down Expand Up @@ -220,6 +273,8 @@ the imputation functions, e.g. `derive_vars_dtm()`. (#2222)
- Handling of `NA` values was added to the documentation of the `order` argument
for all functions. (#2230, #2257)



## Various

- Website now has button/links to Slack channel and GitHub Issues. (#2127)
Expand Down
2 changes: 1 addition & 1 deletion R/admiral-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @import admiraldev
#' @importFrom dplyr across arrange bind_rows case_when desc ends_with
#' everything filter full_join group_by if_else mutate n pull rename
#' rename_with row_number select slice semi_join starts_with transmute ungroup
#' rename_with row_number select slice semi_join starts_with ungroup
#' n_distinct union distinct summarise coalesce bind_cols na_if tibble tribble
#' summarise_all group_by_at first
#' @importFrom magrittr %>%
Expand Down
2 changes: 1 addition & 1 deletion R/call_derivation.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,5 +242,5 @@ params <- function(...) {
)
abort(err_msg)
}
structure(args, class = c("params", "source", "list"))
structure(args, class = c("params", "source", "list")) # nolint: undesirable_function_linter
}
10 changes: 1 addition & 9 deletions R/compute_kidney.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
#'
#' Expected Values: `"CRCL"`, `"CKD-EPI"`, `"MDRD"`
#'
#' @param wt *Deprecated*, please use `weight` instead.
#'
#' @details
#'
#' Calculates an estimate of Glomerular Filtration Rate (eGFR)
Expand Down Expand Up @@ -134,13 +132,7 @@
#' race = RACE, method = "MDRD"
#' ),
#' )
compute_egfr <- function(creat, creatu = "SI", age, weight, sex, race = NULL, method, wt) {
### BEGIN DEPRECATION
if (!missing(wt)) {
deprecate_stop("0.12.0", "compute_egfr(old_param = 'wt')", "compute_egfr(new_param = 'weight')")
}
### END DEPRECATION

compute_egfr <- function(creat, creatu = "SI", age, weight, sex, race = NULL, method) {
assert_numeric_vector(creat)
assert_character_vector(creatu, values = c(
"SI", "CV", "mg/dL", "umol/L", NA_character_,
Expand Down
4 changes: 2 additions & 2 deletions R/consolidate_metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ consolidate_metadata <- function(datasets,
case_sensitive = FALSE
)
if (!is_missing(check_keys)) {
deprecate_warn(
"1.0.0",
deprecate_stop(
"1.1.0",
"consolidate_metadata(check_keys = )",
"consolidate_metadata(check_type = )"
)
Expand Down
Loading

0 comments on commit 3891fef

Please sign in to comment.