Skip to content

Commit

Permalink
admiraldev v.0.5.0 (#327)
Browse files Browse the repository at this point in the history
* docs: #283 update description and news

* closes #286 commit messaging, new r-cmd vignette (#291)

* docs: #286 commit messaging, new r-cmd vignette

* chore: #286 spelling

* docs: #286 squash and merge blurb

* Update vignettes/git_usage.Rmd

Co-authored-by: Zelos Zhu <[email protected]>

* chore: #286 news update

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #271, #213, #260, #240 Documentation Update of get_datasets(); keep_source_vars argument; @family tag; compute_ functions (#287)

* docs: #271 #213 clarify get_datasets and add keep_source_vars to prog strat

* docs: #260 cleanup @family mentions

* docs: #240 add blurb about compute functions

* docs: #271 #213 #240 #260 add news blurb

* adopt suggestion for family/keywords

Co-authored-by: Ben Straub <[email protected]>

* docs #271 adopt get_dataset feedback

* docs: #213 #240 adopt recommendations from PR

* chore: #240 add BMI to WORDLIST for spellcheck

* chore: #271 #213 #260 adopt feedback

---------

Co-authored-by: Zelos Zhu <[email protected]>
Co-authored-by: Ben Straub <[email protected]>

* Closes #264, #288 cleanup assertions and continue deprecation process (#289)

* feat: #288 cleanup deprecation process

* feat: #264 deprecate assert_function

* test: #264 cleanup some tests in assert_function, confused how others would go

* test: #264 rewrite tests in a more logical way

* chore: #264 run styler/lintr

* chore: #288 revert back to devel test file

* chore: #288 properly fix assert_order_vars again

* feat: #264 begin deprecation of redundant assertions

* feat: #288 deprecate assert_named_exprs

* deprecate assert_has_variables properly #264

* chore: #264 run styler

* docs: #264 add blurb in news for the deprecated assertions

* chore: #264 fix description version and remove deprecated examples

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Propagate renv.lock from pharmaverse/admiralci (#294)

renv update from pharmaverse/admiralci

Co-authored-by: dgrassellyb <[email protected]>

* Closes #22 #181 #201 #292 #298 Variety of small-scale general documentation updates (#303)

* feat: #22 add documentation to friendly_type_of

* feat: #181 add the appropriate URL

* feat: #201 #292 add documentation about PR guidance and codeowners

* chore: update wordlist for codeowners

* chore: add NEWS

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #302 Adding Snapshot testing guidance to unit testing vignette (#308)

* Update unit_test_guidance.Rmd

* Update NEWS.md

* Update NEWS.md

* Closes #301:  (#307)

* #301: edoardo added as author, and author/contributor distinction implemented as in core admiral package

* #301 chore: document

* Propagate renv.lock from pharmaverse/admiralci (#310)

* renv / codespaces update from pharmaverse/admiralci

---------

Co-authored-by: galachad <[email protected]>
Co-authored-by: Adam Foryś <[email protected]>

* Closes #295 template documentation@devel (#300)

* #295 set up package extension guidance page

* #295 fix vignetteindexentry

* #295 chore: spellcheck

* #295 chore: fix encoding issues in vignettes that prevented package from being built

* #295: updates following review

* #295 Chore: spellcheck

* Update vignettes/package_extensions.Rmd

Co-authored-by: Ross Farrugia <[email protected]>

* #295 update to refer to admiraldev devel site

* #295 Chore: spellcheck

---------

Co-authored-by: Ross Farrugia <[email protected]>

* Closes #296 document_missing_value_s@devel (#311)

* #296 - `missing_value` and `missing_values` added to the table of common arguments.

* #296 - add in discussion of when to use singular vs plural arguments to programming strategy.

* #296 - run checks required for PR and update NEWS.md.

* #296 - Update according to requested changes.

* #296 - revert the 'wrapped' changes in the programming strategy vignette

* #296 - re-insert the new text into the programming strategy vignette, altered according to changes requested.

* #296 - update NEWS.md with changes requested and run the required checks for PR.

* Closes #282: Test Data Guidance vignette (#293)

* #282: add test_data_guidance.Rmd, copy from admiraldata README devel

* #282: update .yml

* #282: add link for packages, remove SDTM, add naming conventions for program name

* #282 spelling

* #282: link to two data packages

* #282: updated wordlist

* #282: update pharmaverseadam description

---------

Co-authored-by: Edoardo Mancini <[email protected]>

* Propagate renv.lock from pharmaverse/admiralci (#314)

renv / codespaces update from pharmaverse/admiralci

Co-authored-by: galachad <[email protected]>

* Propagate renv.lock from pharmaverse/admiralci (#315)

* renv / codespaces update from pharmaverse/admiralci

* renv / codespaces update from pharmaverse/admiralci

---------

Co-authored-by: galachad <[email protected]>

* Closes #306 argument descriptions added to table (#320)

argument descriptions added to table

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #316 remove messaging that includes "-" as year not handled (#317)

* feat: #316 remove messaging that includes "-" as year not handled

* feat: #316 replace warning message

* chore: #316 fix warning message and typos

* chore: #316 add news blurb

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #318 #321 Documentation updates around admiral.test, staged dependencies, and function arguments (#323)

* Fix hardcoded URL (#326)

Resolves #325

* Closes #312 breakup wall of text (#319)

* brick in the wall

* remove special characters from image name

* remove special characters from image name

* replaced iframe with png

* fixed image reference

---------

Co-authored-by: Zelos Zhu <[email protected]>

* Closes #328 add missing news entries (#329)

* feat: #295 add missing news entries

* feat: #295 add missing news entries

* fixed it

* feat: add news entry for #306

* chore: #312 missing reference

* chore: fix link that pointed to merged branch and use devel

* Update NEWS.md

---------

Co-authored-by: Zelos Zhu <[email protected]>
Co-authored-by: Ben Straub <[email protected]>

---------

Co-authored-by: Zelos Zhu <[email protected]>
Co-authored-by: Ben Straub <[email protected]>
Co-authored-by: pharmaverse-bot <[email protected]>
Co-authored-by: dgrassellyb <[email protected]>
Co-authored-by: Daniel Sjoberg <[email protected]>
Co-authored-by: Edoardo Mancini <[email protected]>
Co-authored-by: galachad <[email protected]>
Co-authored-by: Adam Foryś <[email protected]>
Co-authored-by: Ross Farrugia <[email protected]>
Co-authored-by: Sophie Shapcott <[email protected]>
Co-authored-by: Kangjie Zhang <[email protected]>
Co-authored-by: StefanThoma <[email protected]>
Co-authored-by: cicdguy <[email protected]>
  • Loading branch information
14 people authored Sep 10, 2023
1 parent 355c461 commit 696a0f2
Show file tree
Hide file tree
Showing 103 changed files with 1,858 additions and 1,063 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@
^admiraldev.*\.tgz$
^staged_dependencies.yaml$
^README.Rmd$
^\.devcontainer$
51 changes: 42 additions & 9 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
# Set renv profile base on R version.
if ((Sys.getenv("GITHUB_ACTIONS") == "") && (Sys.getenv("DOCKER_CONTAINER_CONTEXT") == "")) {
renv_profile <- paste(R.version$major, substr(R.version$minor, 1, 1), sep = ".")
if (file.exists("./renv/profile")) {
message("Using renv profile from `renv/profile` file.")
} else if (renv_profile %in% c("4.1", "4.2", "4.3")) {
message("Set renv profile to `", renv_profile, "`")
Sys.setenv("RENV_PROFILE" = renv_profile)
.get_dependencies <- function(project_dir) {

admdev_loc <- find.package("admiraldev", lib.loc = .libPaths(), quiet = TRUE)
adm_dev_suggests <- if(length(admdev_loc) != 0) {
renv:::renv_dependencies_discover_description(admdev_loc, fields = c("Depends", "Imports", "LinkingTo", "Suggests"))
} else {
data.frame(Packages = character(0))
}
suggests_packages <- renv:::renv_dependencies_discover_description(project_dir, fields = "Suggests")

packages <- names(
renv:::renv_package_dependencies(
unique(c(
project_dir,
adm_dev_suggests[["Package"]],
suggests_packages[["Package"]],
c("staged.dependencies", "renv", "styler")
))
)
)
packages[!(packages %in% c("admiral", "admiraldev", "admiralci", "admiral.test", "pharmaversesdtm", getwd()))]
}

options(renv.snapshot.filter = .get_dependencies)

.renv_profile <- paste(R.version$major, substr(R.version$minor, 1, 1), sep = ".")
if (!file.exists("./renv/profile")) {
if (.renv_profile %in% c("4.1", "4.2", "4.3")) {
message("Set renv profile to `", .renv_profile, "`")
Sys.setenv("RENV_PROFILE" = .renv_profile)
} else {
message("This repository do not contains the renv profile for your R version.")
}
source("renv/activate.R")
} else {
options(repos = c(CRAN = "https://cran.rstudio.com"))
message(
"Using renv profile from `renv/profile` file.\n",
"The `", readLines("./renv/profile"), "` profile will be used."
)
}

if (Sys.getenv("GITHUB_ACTIONS") != "") {
options(repos = c(CRAN = "https://packagemanager.posit.co/cran/latest"))
Sys.setenv("RENV_AUTOLOADER_ENABLED" = FALSE)
}
Sys.setenv("RENV_CONFIG_SANDBOX_ENABLED" = FALSE)
Sys.setenv("RENV_CONFIG_AUTO_SNAPSHOT" = FALSE)
source("renv/activate.R")
76 changes: 76 additions & 0 deletions .devcontainer/4.1/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
// https://containers.dev/implementors/json_reference/
"name": "Admiral R-4.1 (RStudio) container",
"image": "ghcr.io/pharmaverse/admiralci-4.1:latest",
// Install Dev Container Features. More info: https://containers.dev/features
"containerEnv": {
"ROOT": "true",
"PASSWORD": "rstudio",
"DISABLE_AUTH": "true",
"RENV_AUTOLOADER_ENABLED": "false"
},
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
"version": "none",
"vscodeRSupport": "full",
"installRadian": true,
"installVscDebugger": true
},
"ghcr.io/rocker-org/devcontainer-features/renv-cache:latest": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": false,
"installOhMyZsh": true,
"username": "rstudio",
"upgradePackages": false
},
"ghcr.io/mikaello/devcontainer-features/modern-shell-utils:1": {}
},
"init": true,
"overrideCommand": false,

"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh",

"postAttachCommand": "$BROWSER \"https://${CODESPACE_NAME}-8787.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/\"",

"customizations": {
"vscode": {
"settings": {
"r.rterm.linux": "/usr/local/bin/radian",
"r.bracketedPaste": true,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active"
},
"extensions": [
"vsls-contrib.codetour",
"GitHub.copilot",
"GitHub.copilot-chat",
// R extensions
"ikuyadeu.r",
"REditorSupport.r-lsp",
// Extra extension
"streetsidesoftware.code-spell-checker",
"eamodio.gitlens",
"cweijan.vscode-office",
"donjayamanne.githistory",
"GitHub.vscode-github-actions",
"GitHub.vscode-pull-request-github",
"GitHub.remotehub",
"alefragnani.Bookmarks",
"vscode-icons-team.vscode-icons"
]
}
},

// RStudio ports
"forwardPorts": [8787],
"portsAttributes": {
"8787": {
"label": "Rstudio",
"requireLocalPort": true,
"onAutoForward": "openBrowser"
}
},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root
"remoteUser": "rstudio"
}
76 changes: 76 additions & 0 deletions .devcontainer/4.2/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
// https://containers.dev/implementors/json_reference/
"name": "Admiral R-4.2 (RStudio) container",
"image": "ghcr.io/pharmaverse/admiralci-4.2:latest",
// Install Dev Container Features. More info: https://containers.dev/features
"containerEnv": {
"ROOT": "true",
"PASSWORD": "rstudio",
"DISABLE_AUTH": "true",
"RENV_AUTOLOADER_ENABLED": "false"
},
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
"version": "none",
"vscodeRSupport": "full",
"installRadian": true,
"installVscDebugger": true
},
"ghcr.io/rocker-org/devcontainer-features/renv-cache:latest": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": false,
"installOhMyZsh": true,
"username": "rstudio",
"upgradePackages": false
},
"ghcr.io/mikaello/devcontainer-features/modern-shell-utils:1": {}
},
"init": true,
"overrideCommand": false,

"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh",

"postAttachCommand": "$BROWSER \"https://${CODESPACE_NAME}-8787.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/\"",

"customizations": {
"vscode": {
"settings": {
"r.rterm.linux": "/usr/local/bin/radian",
"r.bracketedPaste": true,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active"
},
"extensions": [
"vsls-contrib.codetour",
"GitHub.copilot",
"GitHub.copilot-chat",
// R extensions
"ikuyadeu.r",
"REditorSupport.r-lsp",
// Extra extension
"streetsidesoftware.code-spell-checker",
"eamodio.gitlens",
"cweijan.vscode-office",
"donjayamanne.githistory",
"GitHub.vscode-github-actions",
"GitHub.vscode-pull-request-github",
"GitHub.remotehub",
"alefragnani.Bookmarks",
"vscode-icons-team.vscode-icons"
]
}
},

// RStudio ports
"forwardPorts": [8787],
"portsAttributes": {
"8787": {
"label": "Rstudio",
"requireLocalPort": true,
"onAutoForward": "openBrowser"
}
},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root
"remoteUser": "rstudio"
}
76 changes: 76 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
// https://containers.dev/implementors/json_reference/
"name": "Admiral R-4.3 (RStudio) container",
"image": "ghcr.io/pharmaverse/admiralci-4.3:latest",
// Install Dev Container Features. More info: https://containers.dev/features
"containerEnv": {
"ROOT": "true",
"PASSWORD": "rstudio",
"DISABLE_AUTH": "true",
"RENV_AUTOLOADER_ENABLED": "false"
},
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
"version": "none",
"vscodeRSupport": "full",
"installRadian": true,
"installVscDebugger": true
},
"ghcr.io/rocker-org/devcontainer-features/renv-cache:latest": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": false,
"installOhMyZsh": true,
"username": "rstudio",
"upgradePackages": false
},
"ghcr.io/mikaello/devcontainer-features/modern-shell-utils:1": {}
},
"init": true,
"overrideCommand": false,

"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh",

"postAttachCommand": "$BROWSER \"https://${CODESPACE_NAME}-8787.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/\"",

"customizations": {
"vscode": {
"settings": {
"r.rterm.linux": "/usr/local/bin/radian",
"r.bracketedPaste": true,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active"
},
"extensions": [
"vsls-contrib.codetour",
"GitHub.copilot",
"GitHub.copilot-chat",
// R extensions
"ikuyadeu.r",
"REditorSupport.r-lsp",
// Extra extension
"streetsidesoftware.code-spell-checker",
"eamodio.gitlens",
"cweijan.vscode-office",
"donjayamanne.githistory",
"GitHub.vscode-github-actions",
"GitHub.vscode-pull-request-github",
"GitHub.remotehub",
"alefragnani.Bookmarks",
"vscode-icons-team.vscode-icons"
]
}
},

// RStudio ports
"forwardPorts": [8787],
"portsAttributes": {
"8787": {
"label": "Rstudio",
"requireLocalPort": true,
"onAutoForward": "openBrowser"
}
},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root
"remoteUser": "rstudio"
}
5 changes: 5 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

R -q -e 'renv::restore(lockfile = file.path("renv", "profiles", paste(R.version$major, substr(R.version$minor, 1, 1), sep = "."), "renv.lock")); staged.dependencies::install_deps(staged.dependencies::dependency_table(project = ".", verbose = 1), verbose = 1);'

jq --arg folder "$(pwd)/" '. + { "initial_working_directory": $folder }' .devcontainer/rstudio-prefs.json > ~/.config/rstudio/rstudio-prefs.json
8 changes: 8 additions & 0 deletions .devcontainer/rstudio-prefs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"save_workspace": "never",
"always_save_history": false,
"reuse_sessions_for_project_links": true,
"posix_terminal_shell": "bash",
"initial_working_directory": "/workspaces",
"show_hidden_files": true
}
17 changes: 9 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
Package: admiraldev
Type: Package
Title: Utility Functions and Development Tools for the Admiral Package Family
Version: 0.4.0
Version: 0.5.0
Authors@R: c(
person("Ben", "Straub", email = "[email protected]", role = c("aut", "cre")),
person("Stefan", "Bundfuss", role = "aut"),
person("Thomas", "Neitmann", role = "aut"),
person("Samia", "Kabi", role = "aut"),
person("Pooja", "Kumari", role = "aut"),
person("Syed", "Mubasheer", role = "aut"),
person("Jeffrey", "Dickinson", role = "aut"),
person("Ross", "Farrugia", role = "aut"),
person("Pooja", "Kumari", role = "aut"),
person("Edoardo", "Mancini", role = "aut"),
person("Sadchla", "Mascary", role = "aut"),
person("Zelos", "Zhu", role = "aut"),
person("Jeffrey", "Dickinson", role = "aut"),
person("Ania", "Golab", role = "aut"),
person("Ania", "Golab", role = "ctb"),
person("Samia", "Kabi", role = "ctb"),
person("Syed", "Mubasheer", role = "ctb"),
person("Thomas", "Neitmann", role = "ctb"),
person("Ondrej", "Slama", role = "ctb"),
person("F. Hoffmann-La Roche AG", role = c("cph", "fnd")),
person("GlaxoSmithKline LLC", role = c("cph", "fnd"))
Expand Down Expand Up @@ -42,7 +43,7 @@ Imports:
tidyr (>= 1.0.2),
tidyselect (>= 1.0.0)
Suggests:
admiral.test,
pharmaversesdtm,
devtools,
diffdf,
lintr,
Expand Down
4 changes: 1 addition & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export(expect_dfs_equal)
export(expr_c)
export(extract_vars)
export(filter_if)
export(friendly_type_of)
export(get_constant_vars)
export(get_dataset)
export(get_duplicates)
Expand All @@ -55,11 +56,8 @@ export(is_order_vars)
export(is_valid_dtc)
export(left_join)
export(process_set_values_to)
export(quo_c)
export(quo_not_missing)
export(remove_tmp_vars)
export(replace_symbol_in_expr)
export(replace_symbol_in_quo)
export(replace_values_by_names)
export(squote)
export(suppress_warning)
Expand Down
Loading

0 comments on commit 696a0f2

Please sign in to comment.