Skip to content

Commit

Permalink
admiral v0.12.0 (#2094)
Browse files Browse the repository at this point in the history
* Closes #1950 following deprecation process, update Description version and news.md

* updating documentation to fix the warnings

* added the new tests for minutes and seconds options

* Removing references in deprecated functions.

* updated comments and applied test_that format

* conflicts resolved

* Closes #1941 authors contributors@devel (#1967)

* Initial edit to `_pkgdown.yml` for #1941

* #1941 re-labelling authors and contributors

* #1941 update to enact decision of team regarding who are authors and contributors.

* #1941: Chore (spellcheck and man pages and NEWS.md update)

* #1941 chore: further updates to spellcheck

* #1941: chore: fix space after commas. move some acknowledgees to contributors. link README in authors page.

* #1941 chore: roxygenize

---------

Co-authored-by: Mancini, Edoardo {MDBB~Welwyn} <edoardo.mancini@roche.com>

* Closes #1228 produce bmi records for more visits (#1957)

* feat: #1228 Produce BMI records for more visits: Add constant_height parameter

* feat: #1228 Produce BMI records for more visits: Update to use constant_by_vars as switch and update examples with more detail.

* docs: #1228 Produce BMI records for more visits: Fix typo in NEWS

* feat: #1228 Produce BMI records for more visits: Update ADVS template and vignette.

* doc: #1228 Produce BMI records for more visits: Add backticks to variable.

---------

Co-authored-by: Jeffrey Dickinson <dickinson.jeffrey@gene.com>
Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Closes #1695 Establish codeowners (#1973)

feat: #1695 add gordon and jeff as codeowners

Co-authored-by: Zelos Zhu <zdz2101@github.com>
Co-authored-by: cicdguy <26552821+cicdguy@users.noreply.github.com>

* Closes #1974 Swapping out deprecated assertions (#1975)

* feat: #1974 try swapping all deprecated assertions

* chore: #1974 fix parsing issue that caused vignettes to crash

* chore: #1974 simplify by_vars requirement

Co-authored-by: Kangjie Zhang <47867131+kaz462@users.noreply.github.com>

* chore: #264 move assertion to different line

---------

Co-authored-by: Zelos Zhu <zdz2101@github.com>
Co-authored-by: Kangjie Zhang <47867131+kaz462@users.noreply.github.com>
Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

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

renv update from pharmaverse/admiralci

Co-authored-by: dgrassellyb <dgrassellyb@users.noreply.github.com>

* Catch devel up to Admiral v0.11.1 (#1997) (#1999)

Admiral v0.11.1 (#1997)

* [actions skip] Add/Update README.md for patch

* Closes #1962 #1969 admiral 0.11.1 hotfix for get started link, derive_param_tte, derive_vars_joined (#1987)

* feat #1962 #1969 param_tte and get started fix

* forgot to add updated DESCRIPTION

* chore: #1962 thought crossing was dplyr

* chore: #1962 account for new assertions

* fix: #1962 was missing the reassignment piece?

* fix: #1966 crude answer

* feat: #1966 potential way of warning users of null new_vars

* fix: #1966 add appropriate assertions to get check to go through

* fix: #1966 appropriate function fix for order

* fix: #1966 vignette named order expression

* chore: #1966 try something

* chore: #1966 optionality of expressions is tricky

* feat: #1966 undo derive_joined stuff

* chore: run styler

---------



---------

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>
Co-authored-by: GitHub Actions <action@github.com>
Co-authored-by: Zelos Zhu <zdz2101@github.com>

* Initiate a Stale bot for Issue Triaging (#1992)

* Create stale_bot.yml

* Update and rename stale_bot.yml to stale-bot.yml

* Update stale-bot.yml

* Update stale-bot.yml

* Update stale-bot.yml

* Update stale-bot.yml

* Closes #1927 derive param tte@devel (#2000)

Removed incorrect reference of start_imputation_flag

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Closes #1989 Link Fix in `README.md` (#1994)

* Update README.md

* Update WORDLIST

* Update README.md

* Update WORDLIST

* chore: #1989 spelling

---------

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Closes #1856 Removed the higher order file (#2008)

#1856 Removed the higher order file

* Update templates.yml (#2026)

* Closes #2001 Added processing for missing age_units in `compute_age_years` (#2009)

* #2001 added processing for missing age_units in `compute_age_years`

* #2001 Chore: styler

* #2001 chore: lint

* #2001 chore: fix broken links

* #2001 - removed for loop, changed unit in `derive_vars_aage`, restored `docs/pkgdown.yml`.

* #2001 chore: Fixed docs link

* #2001 chore: styler

* #2001 implemented prop[er deprecation strategy for `age_unit` in `derive_vars_aage` and added extra test for `age_unit`

* #2001 Update NEWS.md as per suggestiom

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Update R/compute_age_years.R with correct backquoting

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* #2001 version change in deprecation

* #2001 insert parenthesis in NEWS.md

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* #2001 chore: roxygen

---------

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>
Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Closes #1979 Add a flag_all function argument to enhance `derive_var_extreme_flag()` (#2024)

* feat: #1979 added the necessary flag_all function argument

* feat: #1979 modify check_type to supppress warnings for flag_all = TRUE

* chore: #1979 run lintr/styler

* chore: #1979 add news blurb

* typo

* chore: #1979 add additional tests and add roxygen details

* chore: #1979 adopt feedback from review

* chore: #1979 run styler

---------

Co-authored-by: Zelos Zhu <zdz2101@github.com>

* Closes #123 Add Edoardo to status check (#2031)

fix: pharmaverse/admiralci#123 add Edoardo to status check

* Closes #2014 derive_var_shift change na_val@devel (#2032)

* #2014 `na_val` deprecated and `missing_value` inserted into `derive_var_shift`.

* #2014 - Update `NEWS.md`.

* #2014 - update tests and write deprecation parameter test

* #2014 - run required tasks for PR

---------

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Closes #2012_derive_vars_dy (#2013)

* derive dy_vars by argument .name in across (#2012)

use named vector to avoid the variabes end with `_temp` in input dataset

* test no error for variable end with `_temp`(#2012)

* styled file

* add update information for #2012

---------

Co-authored-by: Daniel Sjoberg <danield.sjoberg@gmail.com>

* Closes #1966 address derive_vars_joined bugs (#2016)

* feat: #1966 make our check_type consistent

* feat: #1966 hacky solution to null new_vars .join problem

* chore: #1966 inserted line in wrong place

* feat: #1966 add news blurb for what was done

* feat: #1966 add tests

* chore: #1966 lintr

* chore: #1966 swap appropriate order selection and restore check_type arg

* chore: #1966 looks like that fixed it

* feat: #1966 issue warning for dataset_add naming conflicts when `new_vars` is NULL

* chore: #1966 clean up for readability

* chore: #1966 restore original replace_values_by_names

* chore: #1966 add additional test to demonstrate how order vars were fixed/selected

* feat: #1966 adopt feedback for error messaging of naming conflicts

---------

Co-authored-by: Zelos Zhu <zdz2101@github.com>

* Closes #2037 deprecate `dataset_expected_obs` for `dataset_ref` in respective functions (#2039)

feat: #2037 deprecate `dataset_expected_obs` for `dataset_ref`

Co-authored-by: Zelos Zhu <zdz2101@github.com>

* Close #1940 Removing unnecessary runtime development-related dependencies (#1978)

* feat: #1940 try removing dev deps

* chore: #1940 still needs knitr

* #1940 diffdf needed for all the testing stuff

* chore: #1940 add back rmarkdown

Co-authored-by: Adam Foryś <adam.forys@roche.com>

---------

Co-authored-by: Zelos Zhu <zdz2101@github.com>
Co-authored-by: Ben Straub <ben.x.straub@gsk.com>
Co-authored-by: Adam Foryś <adam.forys@roche.com>

* Closes #1984 Allowing missing trt end date in `derive_var_ontrtfl()` (#2029)

* #1984 allowing missing trt end date

* Update derive_var_ontrtfl.R

* Update derive_var_ontrtfl.R

* Increment version number to 0.12.0.9000

* updating version numbers...oops!

* Update test-derive_var_ontrtfl.R

* Closes #1984 Addressing missing treatment start dates in `derive_var_ontrtfl()` (#2048)

addressing missing treatment start dates

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

* renv / codespaces update from pharmaverse/admiralci

* renv / codespaces update from pharmaverse/admiralci

* renv / codespaces update from pharmaverse/admiralci

* renv / codespaces update from pharmaverse/admiralci

* renv / codespaces update from pharmaverse/admiralci

* renv / codespaces update from pharmaverse/admiralci

* renv / codespaces update from pharmaverse/admiralci

* Update .Rbuildignore

* renv / codespaces update from pharmaverse/admiralci

---------

Co-authored-by: galachad <galachad@users.noreply.github.com>
Co-authored-by: Adam Foryś <adam.forys@roche.com>

* Closes #2033 `derive_var_ontrtfl(span_period)` arg updated to accept T/F (#2044)

* span_period arg update

* Update derive_var_ontrtfl.R

* Update NEWS.md

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Update R/derive_var_ontrtfl.R

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Update R/derive_var_ontrtfl.R

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* remove space for lintr

---------

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* add admiral src to test codespaces

* Revert "add admiral src to test codespaces"

This reverts commit 4a60be0.

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

renv / codespaces update from pharmaverse/admiralci

Co-authored-by: galachad <galachad@users.noreply.github.com>

* Closes #2020 chore: rename wt to weight in compute_egfr (#2045)

* code updated

* Chore #2020 go through checklist

* update .lycheeignore

* update .lycheeignore

* adjusted templates

* chore: removed links from .lycheeignore

* chore: #2020 removing file

---------

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Closes #2053 Typo in the example `impute_dtc_dt` (#2056)

Closes #2053 Typo in the example impute_dtc_dt

    * update `impute_dtc_dtm` to `impute_dtc_dt` in derive_date_vars.R

    * update derive_date_vars.Rd

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Closes #2038 Attach See also to compute functions (#2062)

Doc: #2038 Attach See also to compute functions

Co-authored-by: Jeffrey Dickinson <dickinson.jeffrey@gene.com>

* Closes #2042 fix compute_dtf bug (#2047)

* feat: #2042 needs to incorporate date portion and location of the double hyphen to parse out correctly

* feat: #2042 add appropriate logic for date-portions

* chore: #2042 add news

* feat: #2042 address month and day missing

* feat: #2042 allow - for "Y" flag

---------

Co-authored-by: Zelos Zhu <zdz2101@github.com>

* Closes #1968 compute multiple variables in `derive_param_computed()` (#2036)

* #1968 compute_multiple_vars: update arguments of derive_param_computed()

* #1968 compute_multiple_vars: update documentation

* #1968 compute_multiple_vars: update documentation

* #1968 compute_multiple_vars: style files

* #1968 compute_multiple_vars: fix R-CMD checks

* #1968 compute_multiple_vars: update error message of get_hori_data()

* #1968 compute_multiple_vars: improve documentation

* #1968 compute_multiple_vars: use deprecation badge

* #1968 compute_multiple_vars: use deprecation badge

* Update NEWS.md

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* #1968 compute_multiple_vars: use @Keywords internal

* #1968 compute_multiple_vars: fix typo in NEWS.md

---------

Co-authored-by: Daniel Sjoberg <danield.sjoberg@gmail.com>
Co-authored-by: Ben Straub <ben.x.straub@gsk.com>
Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Closes #1466 Unit test for `print.duplicates()` which closes test coverage gap (#2055)

* feat: #2054 remove print.duplciates()

* feat: #1466 add appropriate test for print.duplicates

* chore: #1466 cleanup duplicate code

* feat: #1466 use expect_snapshot() instead

---------

Co-authored-by: Zelos Zhu <zdz2101@github.com>

* Closes #2040 Update admiral.test to pharmaversesdtm (#2057)

* Chore: #2040 Update admiral.test to pharmaversesdtm

* Chore: #2040 Update admiraltest to pharmaversesdtm: Update WORDLIST and run styler

* #2040 Update admiral.test to pharmaversesdtm: udpate staged_dependencies.yaml

* Chore: #2040 Update admiral.test to pharmaversesdtm: rename suppae and admiral_eg.

* Chore #2040 Update admiral.test to pharmaversesdtm: Update test-call_derivation.R

* Chore: #2040 Update admiral.test to pharmaversesdtm: Update create_query_data.R

* Chore: #2040 Update admiral.test to pharmaversesdtm run documentation for create_query_data

---------

Co-authored-by: Jeffrey Dickinson <dickinson.jeffrey@gene.com>
Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>
Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

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

* renv / codespaces update from pharmaverse/admiralci

* renv / codespaces update from pharmaverse/admiralci

---------

Co-authored-by: galachad <galachad@users.noreply.github.com>

* #2027 clarify reference_date in derive_vars_dy() (#2063)

* change description

* updated news.md

* closes #2069 bug: EOSSTT derivation fix (#2073)

#2069 bug: EOSSTT derivation fix

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Closes #2049 Date/Time Imputation Utilities are no Longer listed on pkgdown site (#2076)

* utils_impute fns now internal

* Update NEWS.md

* adding meta.R entry back

* Closes #1875 duration and interval time difference types update (#2075)

* in progress

* updated default to duration instead of interval

* style

* spelling updates

* Update NEWS.md

* added pharmaversesdtm Remotes call

* Update DESCRIPTION

* Update test-compute_duration.R

---------

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Closes #2078 swap out admiral_eg with eg (#2080)

feat: #2078 swap out admiral_eg with eg

Co-authored-by: Zelos Zhu <zdz2101@github.com>

* Closes #1960 enhance derive_extreme_event() (#2015)

* #1960 enhance_derive_extreme_event: start a draft

* #1960 enhance_derive_extreme_event: continue draft

* #1960 enhance_derive_extreme_event: continue draft

* #1960 enhance_derive_extreme_event: add tests and documentation

* #1960 enhance_derive_extreme_event: update NEWS

* #1960 enhance_derive_extreme_event: fix links

* #1960 enhance_derive_extreme_event: style files

* #1960 enhance_derive_extreme_event: add example

* #1960 enhance_derive_extreme_event: style files

* #1960 enhance_derive_extreme_event:add example and tests for event-specific modes

* #1960 enhance_derive_extreme_event: add ignore_event_order argument

* #1960 enhance_derive_extreme_event: fix spelling

* #1960 enhance_derive_extreme_event: use correct input dataset

* #1960 enhance_derive_extreme_event: improve printing of event objects

* #1960 enhance_derive_extreme_event: rename keep_vars_source to keep_source_vars

* #1960 enhance_derive_extreme_event: add description field

* #1960 enhance_derive_extreme_event: address QC comments

* #1960 enhance_derive_extreme_event: update man pages

* #1960 enhance_derive_extreme_event: remove docs/pkgdown.yml

* #1960 enhance_derive_extreme_event: style files

* chore: #1960 properly formatted testthat

* chore: #1960 fix lint

---------

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>
Co-authored-by: Zelos Zhu <zdz2101@github.com>

* Closes #2068 Updated `traceability_vars` to `set_values_to` (#2079)

* Closes #2068 Updated `traceability_vars` to `set_values_to`

* Clarify the explanation for the traceability_vars replacement

* Closes #2083 bug adpp and adpc still using admiraltest (#2086)

* fix: #2083 using pharmaversesdtm

* fix: #2083 using pharmaversesdtm

* chore: #2083 renaming datasets

* chore: #2083 removing admiral prefix

* chore: #2083 removing admiral suffix

* chore: #2083 remove admiral suffix

* chore: remove admiral prefix

* Closes #1859 metadata updated for DAIDs in xlsx file (#2060)

* 1859 metadata updated for DAIDs in xlsx file

* 1859 metadata for DAIDs finalised

* 1859 update data.r for atoxgr_criteria_daids

* 1859 update man files

* 1859 fix spelling

* 1859 updated derive_var_atoxgr to read in DAIDS and create unit tests

* 1859 update man pages

* 1859 fix STYLER issue

* 1859 fix SPELLING

* 1859 fix LINTR

* 1859 Fix LINTR and add more unit tests

* 1859 added Acidosis and Alkalosis and more unit tests

* 1859 added more tests and partiallyy update gradin vignette

* 1859 all unit tests added

* 1859 fix STYLER

* 1859 use signif function in metadata

* 1859 use signif function in ncictcaev4 and v5 metadata

* Update unit test for Cal (Ionized) to test missing ANRHI

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Fix unit test for Cal (Ionized) Low for missing ANRLO.

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Add units to description of Glucose Nonfasting, High

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Add unit to description of Glucose fasting, High

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Fix typo in description of Triglycerides, Fasting, High for Grade 3

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* 1859 address last QC comments on unit tests

* 1859 update NEWS file

* 1859 updated Vignette

* 1859 Fix SPELLING

* Update NEWS.md following QC comment

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Update NEWS.md following QC comment

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* 1859 address QC comments

* Update vignettes/lab_grading.Rmd

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Update vignettes/lab_grading.Rmd

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* Update vignettes/lab_grading.Rmd

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>

* 1859 Fix STYLER issue

* 1859 Fix example in function header

* 1859 fix LINTR issue

---------

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>
Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Closes #2050 Remove print fns from pkgdown Reference page (#2087)

ref page updates

* Closes #1697 add keep_source_vars arg@devel (#2070)

* #1697 Added `keep_vars_source` arg in `derive_extreme_records()`, added relevent unit tests and updated NEWS.md.

* Updated pkgdown.yml

* Undoing renv.lock update

* #1697 Updated default from `NULL` to `exprs(everything())`

* #1697 Updated wordlist to include 'tidyselect'

* #1697 Moved `select()` after `process_set_values_to()`

* #1697 Updated `keep_vars_source` to `keep_source_vars` in `derive_extreme_records()`

* Update NEWS.md

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Update NEWS.md

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Update R/derive_extreme_records.R

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* #1697 Reverted changes made to `derive_var_merged_exist_flag()` and updated `derive_extreme_records()`

* #1697 Updated 'Details' section to include `keep_source_vars`

---------

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* #1995 Update to add Sophie as Author and Stefan's R in Pharma presentation. (#2082)

* #1995 Update to add Sophie as Autor and Stefan's R in Pharma presentation.

* #1995 Chore: roxygen

* #1995 chore:spellcheck and roxygen

* #1995 updates to readme with release schedule and 1.0.

* grammar fix in readme

---------

Co-authored-by: Ben Straub <ben.x.straub@gsk.com>
Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Closes #2028 removed erroneous section. updating rules section (#2088)

* docs: #2028 removed erroneous section. updating rules section

* docs: #2028 news and wordsmithing

* Update vignettes/imputation.Rmd

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Update vignettes/imputation.Rmd

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* docs: #2028 lite explanation of h.i. rule

---------

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>

* Closes #2091 fixing deprecation messaging in `derive_param_doseint()` (#2092)

* feat: #2091 did that work?

* chore: #2091 address errors

* fixed deprecation warning

* deprecation for analysis_var

---------

Co-authored-by: Zelos Zhu <zdz2101@github.com>
Co-authored-by: StefanThoma <40463122+StefanThoma@users.noreply.github.com>

* Fix for Get Started on Webpage (#2093)

Update _pkgdown.yml

* update readme with admiral release schedule (#2095)

Co-authored-by: Zelos Zhu <zdz2101@github.com>

---------

Co-authored-by: Zelos Zhu <zelos.zhu@atorusresearch.com>
Co-authored-by: sadchla-codes <sadchla.mathieu@gmail.com>
Co-authored-by: Sadchla Mascary <112789549+sadchla-codes@users.noreply.github.com>
Co-authored-by: lomaxj1 <jennifer.lomax@roche.com>
Co-authored-by: Jennifer Lomax <125990075+J-Lox@users.noreply.github.com>
Co-authored-by: Edoardo Mancini <53403957+manciniedoardo@users.noreply.github.com>
Co-authored-by: Mancini, Edoardo {MDBB~Welwyn} <edoardo.mancini@roche.com>
Co-authored-by: Jeff Dickinson <jeffreyd@gene.com>
Co-authored-by: Jeffrey Dickinson <dickinson.jeffrey@gene.com>
Co-authored-by: Zelos Zhu <zdz2101@github.com>
Co-authored-by: cicdguy <26552821+cicdguy@users.noreply.github.com>
Co-authored-by: Kangjie Zhang <47867131+kaz462@users.noreply.github.com>
Co-authored-by: pharmaverse-bot <113703390+pharmaverse-bot@users.noreply.github.com>
Co-authored-by: dgrassellyb <dgrassellyb@users.noreply.github.com>
Co-authored-by: GitHub Actions <action@github.com>
Co-authored-by: SyedMubasheer <106958950+SyedMubasheer@users.noreply.github.com>
Co-authored-by: Daniel Sjoberg <danield.sjoberg@gmail.com>
Co-authored-by: asha-gsk <134052893+ashachakma@users.noreply.github.com>
Co-authored-by: Sophie Shapcott <90790226+sophie-gem@users.noreply.github.com>
Co-authored-by: ynsec37 <98389771+ynsec37@users.noreply.github.com>
Co-authored-by: Adam Foryś <adam.forys@roche.com>
Co-authored-by: galachad <galachad@users.noreply.github.com>
Co-authored-by: Daphne Grasselly <daphne.grasselly@roche.com>
Co-authored-by: StefanThoma <40463122+StefanThoma@users.noreply.github.com>
Co-authored-by: Stefan Bundfuss <80953585+bundfussr@users.noreply.github.com>
Co-authored-by: Ross Farrugia <82581364+rossfarrugia@users.noreply.github.com>
Co-authored-by: Gordon Miller <80953007+millerg23@users.noreply.github.com>
Co-authored-by: G Gayatri <103511237+gg106046@users.noreply.github.com>
  • Loading branch information
1 parent a2b224a commit 62ea37c
Show file tree
Hide file tree
Showing 230 changed files with 8,821 additions and 3,883 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
^\.lycheeignore$
^staged_dependencies.yaml$
^inst/dev_dependencies.R$
^\.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
}
15 changes: 15 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This a CODEOWNERS file, where you can establish code owners.
# Code owners are automatically requested for review when someone opens a pull request
# that modifies code that they own.
#
# Lab related files for Gordon Miller
vignettes/lab_grading.Rmd @millerg23
inst/adlb_grading/* @millerg23
R/derive_var_atoxgr.R @millerg23
data/atoxgr_criteria_ctcv5.rda @millerg23

# PKPD related files for Jeff Dickinson
inst/templates/ad_adppk.R @jeffreyad
inst/templates/ad_adpc.R @jeffreyad
R/compute_kidney.R @jeffreyad
vignettes/pk_adnca.Rmd @jeffreyad
2 changes: 1 addition & 1 deletion .github/workflows/cran-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
# Whom should the issue be assigned to if errors are encountered
# in the CRAN status checks?
issue-assignees: "bundfussr,esimms999-gsk,thomas-neitmann,bms63"
issue-assignees: "bundfussr,esimms999-gsk,manciniedoardo,bms63"
# Create an issue if one or more of the following
# statuses are reported on the check report.
statuses: "WARN,ERROR,NOTE"
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# https://github.com/actions/stale

name: Close Inactive Issues and Pull Requests
on:
schedule:
- cron: "30 1 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
days-before-issue-stale: 90
days-before-issue-close: -1
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 90 days with no activity."
days-before-pr-stale: 15
days-before-pr-close: -1
stale-pr-label: "stale"
stale-pr-message: "This Pull Request is stale because it has not been worked on in 15 days."
repo-token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 5 additions & 3 deletions .github/workflows/templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ name: Check Templates

on:
workflow_dispatch:
pull_request_review:
types: [submitted]
pull_request:
branches:
- main
- devel

jobs:
templates:
name: Check Templates
uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main
if: github.event.review.state == 'approved'
if: github.event_name == 'pull_request'
with:
r-version: "4.1"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ vignettes/*.pdf

# website documents
/docs/*
!/docs/pkgdown.yml
doc
Meta
admiral.Rcheck/
Expand Down
1 change: 0 additions & 1 deletion .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ https://github.com/pharmaverse/admiral/blob/main/
https://github.com/pharmaverse/admiral/blob/main/inst/templates/ad_adxx.R
irongut/CodeCoverageSummary@v1.2.0
https://packagemanager.rstudio.com/cran/__linux__/focal/latest
https://pharmaverse.github.io/admiral/articles/higher_order.html
Loading

0 comments on commit 62ea37c

Please sign in to comment.