Skip to content

Commit 355c461

Browse files
authored
Merge pull request #275 from pharmaverse/devel
0.4 release (related to admiral 0.11.0)
2 parents c0a814e + 1347b68 commit 355c461

Some content is hidden

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

78 files changed

+6821
-1301
lines changed

.Rprofile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
if (Sys.getenv("GITHUB_ACTIONS") == "" || (Sys.getenv("GITHUB_ACTIONS") == "true" && getRversion()$major == 3 && getRversion()$minor == 6)) {
1+
# Set renv profile base on R version.
2+
if ((Sys.getenv("GITHUB_ACTIONS") == "") && (Sys.getenv("DOCKER_CONTAINER_CONTEXT") == "")) {
3+
renv_profile <- paste(R.version$major, substr(R.version$minor, 1, 1), sep = ".")
4+
if (file.exists("./renv/profile")) {
5+
message("Using renv profile from `renv/profile` file.")
6+
} else if (renv_profile %in% c("4.1", "4.2", "4.3")) {
7+
message("Set renv profile to `", renv_profile, "`")
8+
Sys.setenv("RENV_PROFILE" = renv_profile)
9+
} else {
10+
message("This repository do not contains the renv profile for your R version.")
11+
}
212
source("renv/activate.R")
313
} else {
414
options(repos = c(CRAN = "https://cran.rstudio.com"))

.github/workflows/common.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,25 @@ jobs:
4545
uses: pharmaverse/admiralci/.github/workflows/style.yml@main
4646
if: github.event_name == 'pull_request'
4747
with:
48-
r-version: "4.0"
48+
r-version: "4.1"
4949
spellcheck:
5050
name: Spelling
5151
uses: pharmaverse/admiralci/.github/workflows/spellcheck.yml@main
5252
if: github.event_name == 'pull_request'
5353
with:
54-
r-version: "4.0"
54+
r-version: "4.1"
5555
readme:
5656
name: Render README
5757
uses: pharmaverse/admiralci/.github/workflows/readme-render.yml@main
5858
if: github.event_name == 'push'
5959
with:
60-
r-version: "4.0"
60+
r-version: "4.1"
6161
validation:
6262
name: Validation
6363
uses: pharmaverse/admiralci/.github/workflows/r-pkg-validation.yml@main
6464
if: github.event_name == 'release'
6565
with:
66-
r-version: "4.0"
66+
r-version: "4.1"
6767
check:
6868
name: Check
6969
uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main
@@ -73,7 +73,7 @@ jobs:
7373
uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main
7474
if: github.event_name == 'push'
7575
with:
76-
r-version: "4.0"
76+
r-version: "4.1"
7777
# Whether to skip multiversion docs
7878
# Note that if you have multiple versions of docs,
7979
# your URL links are likely to break due to path changes
@@ -85,7 +85,7 @@ jobs:
8585
uses: pharmaverse/admiralci/.github/workflows/lintr.yml@main
8686
if: github.event_name == 'pull_request'
8787
with:
88-
r-version: "4.0"
88+
r-version: "4.1"
8989
links:
9090
name: Links
9191
uses: pharmaverse/admiralci/.github/workflows/links.yml@main
@@ -97,7 +97,7 @@ jobs:
9797
if: >
9898
github.event_name == 'push' || github.event_name == 'pull_request'
9999
with:
100-
r-version: "4.0"
100+
r-version: "4.1"
101101
# Whether to skip code coverage badge creation
102102
# Setting to 'false' will require you to create
103103
# an orphan branch called 'badges' in your repository
@@ -107,4 +107,4 @@ jobs:
107107
uses: pharmaverse/admiralci/.github/workflows/man-pages.yml@main
108108
if: github.event_name == 'pull_request'
109109
with:
110-
r-version: "4.0"
110+
r-version: "4.1"

.lintr

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
linters: with_defaults(line_length_linter(100), object_usage_linter=NULL, cyclocomp_linter(complexity_limit = 20))
2-
exclusions: list("R/data.R")
1+
linters: linters_with_defaults(
2+
line_length_linter(100),
3+
object_usage_linter=NULL,
4+
cyclocomp_linter(complexity_limit = 20),
5+
undesirable_function_linter = undesirable_function_linter()
6+
)
7+
exclusions: list(
8+
"R/data.R" = Inf,
9+
"inst" = list(undesirable_function_linter = Inf),
10+
"vignettes" = list(undesirable_function_linter = Inf)
11+
)

.lycheeignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ tj-actions/branch-names@v5.2
1111
file:///home/runner/work/admiraldev/admiraldev/.github/workflows/pkgdown
1212
file:///home/runner/work/admiraldev/admiraldev/.github/workflows/style.yml%60
1313
file:///home/runner/work/admiraldev/admiraldev/.github/workflows/sd-repo
14+
https://packagemanager.posit.co/cran/2021-05-03/
15+
https://packagemanager.posit.co/cran/2022-01-03/
16+
https://packagemanager.posit.co/cran/2023-04-20/

DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: admiraldev
22
Type: Package
33
Title: Utility Functions and Development Tools for the Admiral Package Family
4-
Version: 0.3.0
4+
Version: 0.4.0
55
Authors@R: c(
66
person("Ben", "Straub", email = "ben.x.straub@gsk.com", role = c("aut", "cre")),
77
person("Stefan", "Bundfuss", role = "aut"),
@@ -22,15 +22,16 @@ Description: Utility functions to check data, variables and conditions for funct
2222
'admiral' and 'admiral' extension packages. Additional utility helper functions to assist developers
2323
with maintaining documentation, testing and general upkeep of 'admiral' and 'admiral' extension packages.
2424
License: Apache License (>= 2)
25+
BugReports: https://github.com/pharmaverse/admiraldev/issues
2526
URL: https://pharmaverse.github.io/admiraldev/main/, https://github.com/pharmaverse/admiraldev/
2627
Encoding: UTF-8
2728
Language: en-US
2829
LazyData: false
2930
Roxygen: list(markdown = TRUE)
30-
RoxygenNote: 7.2.1
31+
RoxygenNote: 7.2.3
3132
Depends: R (>= 3.5)
3233
Imports:
33-
dplyr (>= 0.8.4),
34+
dplyr (>= 1.0.5),
3435
hms (>= 0.5.3),
3536
lifecycle (>= 0.1.0),
3637
lubridate (>= 1.7.4),

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export(assert_data_frame)
1212
export(assert_date_var)
1313
export(assert_date_vector)
1414
export(assert_expr)
15+
export(assert_expr_list)
1516
export(assert_filter_cond)
1617
export(assert_function)
1718
export(assert_function_param)
@@ -20,6 +21,7 @@ export(assert_integer_scalar)
2021
export(assert_list_element)
2122
export(assert_list_of)
2223
export(assert_logical_scalar)
24+
export(assert_named)
2325
export(assert_named_exprs)
2426
export(assert_numeric_vector)
2527
export(assert_one_to_one)

NEWS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
# admiraldev 0.4.0
2+
3+
## New Features
4+
5+
- New function `assert_named()` to check if all elements of an argument are
6+
named (#241)
7+
- New function `assert_expr_list()` to check if an argument is a list of
8+
expressions (#241)
9+
10+
- Added a **Report a bug** link on `admiraldev` website (#257)
11+
12+
## Updates of Existing Functions
13+
14+
## Breaking Changes
15+
16+
- `assert_order_vars()` was deprecated in favor of `assert_expr_list()`. (#241)
17+
- The following functions have been deprecated from previous admiral versions using the next phase of the deprecation process: (#272)
18+
19+
- `quo_c()`
20+
- `quo_not_missing()`
21+
- `replace_symbol_in_quo()`
22+
- The `quosures` argument was replaced by the `expressions` argument in `replace_values_by_names()`.
23+
24+
## Documentation
25+
26+
- The deprecation strategy was updated regarding unit tests for deprecated
27+
functions/arguments in phase 1. (#247)
28+
29+
- The programming strategy was updated regarding permitted values and calling functions from package dependencies (#72, #253)
30+
131
# admiraldev 0.3.0
232

333
## New Features

R/addin_format_testthat.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Returns the call for updating a given test_that test file
32
# by adding a function name, a test number, and a section.
43
# Call the function either by using RStudio Addin "format_test_that_file" or
@@ -13,7 +12,7 @@ prepare_test_that_file <- function(path) {
1312
}
1413

1514
# check that testthat is used and testing file is opened
16-
uses_test_file <- grepl("tests/testthat/test-", path, fixed = T)
15+
uses_test_file <- grepl("tests/testthat/test-", path, fixed = TRUE)
1716
if (!uses_test_file) {
1817
stop("This Addin works only on unit test files that follow a testthat structure.")
1918
}

0 commit comments

Comments
 (0)