From 5db189be8b13ce57cb5592a0448741ca531fe8c5 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Tue, 19 Nov 2024 10:06:06 +0000 Subject: [PATCH 01/11] #93 Update readme and doc script --- README.md | 60 +++++++++++++++++++++++++++++++----- data-raw/create_adams_data.R | 2 ++ 2 files changed, 54 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6b4126a..d0665b4 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,23 @@ +--- +editor_options: + markdown: + wrap: 72 +--- + + + # pharmaverseadam -[](https://pharmaverse.org) +[](https://pharmaverse.org) [![CRAN status](https://www.r-pkg.org/badges/version/pharmaverseadam)](https://CRAN.R-project.org/package=pharmaverseadam) + Test data (ADaM) for the pharmaverse family of packages @@ -22,9 +31,9 @@ of packages. The ADaM contents of this package is populated by an action that executes the `{admiral}`, `{admiralonco}`, `{admiralophtha}`, -`{admiralvaccine}` and `{admiralpeds}` templates and saves the resulting datasets here. This -action can be triggered manually by the package maintainers in two -scenarios: +`{admiralvaccine}` and `{admiralpeds}` templates and saves the resulting +datasets here. This action can be triggered manually by the package +maintainers in two scenarios: - Regularly, upon new releases of `{admiral}`, `{admiralonco}`, `{admiralophtha}` and `{admiralvaccine}`; @@ -38,8 +47,43 @@ The package is available from CRAN and can be installed by running `install.packages("pharmaverseadam")`. To install the latest development version of the package directly from GitHub use the following code: - if (!requireNamespace("remotes", quietly = TRUE)) { - install.packages("remotes") - } +``` +if (!requireNamespace("remotes", quietly = TRUE)) { + install.packages("remotes") +} + +remotes::install_github("pharmaverse/pharmaverseadam", ref = "main") +``` + +# Documentation Process + +The documentation process in `{pharmaverseadam}` is automated for +consistency and ease of maintenance. Metadata for each dataset, such as +names, labels, descriptions, authors, and sources, is managed in a +centralized XLSX file (`inst/extdata/adams-specs.xlsx`) and used to +generate `.R` documentation files. + +## Workflow + +1. **Metadata Preparation**: + - Ensure `adams-specs.xlsx` contains up-to-date metadata for all + datasets. + - Missing fields default to "No label/description/source + available." +2. **Run Script**: + - The `data-raw/create_adams_data.R` script dynamically retrieves + metadata, enriches it with dataset attributes, and generates + `.R` files in the `R/` directory. +3. **Generate Documentation**: + - Use `roxygen2::roxygenize()` to update `.Rd` files in the `man/` + directory. + +## Key Benefits of this Documentation Approach + +- **Automation**: Eliminates manual effort in maintaining + documentation. +- **Consistency**: Ensures uniform documentation for all datasets. +- **Flexibility**: Easily update metadata centrally via the XLSX file. - remotes::install_github("pharmaverse/pharmaverseadam", ref = "main") +This streamlined approach aligns with best practices for efficient +package development. diff --git a/data-raw/create_adams_data.R b/data-raw/create_adams_data.R index b636819..baeb248 100644 --- a/data-raw/create_adams_data.R +++ b/data-raw/create_adams_data.R @@ -34,6 +34,8 @@ write_doc <- function(data, dataset_name, dataset_label, pkg, template_name) { # TODO: use metatools/metacore for doc ? dataset_label <- str_replace(dataset_label, "Hys Law", "Hy's Law") doc_string <- paste( + sprintf("# This file is automatically generated."), + sprintf("# Manual edits are not recommended, as changes may be overwritten."), sprintf("#' %s", dataset_name), "#'", sprintf("#' %s", dataset_label), From 8f5640d0ed417f3a46655fc8257450cae09e78f0 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Wed, 20 Nov 2024 11:07:30 +0000 Subject: [PATCH 02/11] #93 Update wordlist --- inst/WORDLIST | 1 + 1 file changed, 1 insertion(+) diff --git a/inst/WORDLIST b/inst/WORDLIST index 5be309d..feaafad 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -201,3 +201,4 @@ seropositivity Hy Hy's ORCID +XLSX From 7bd03ea7c7e711766002ebaa4ad3dac01b67981c Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Wed, 20 Nov 2024 11:11:33 +0000 Subject: [PATCH 03/11] #93 Update Readme --- README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d0665b4..0f28667 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ ---- -editor_options: - markdown: - wrap: 72 ---- - @@ -49,10 +43,8 @@ version of the package directly from GitHub use the following code: ``` if (!requireNamespace("remotes", quietly = TRUE)) { - install.packages("remotes") -} - -remotes::install_github("pharmaverse/pharmaverseadam", ref = "main") + install.packages("remotes") + } ``` # Documentation Process From 14c330283454f66d9bfe542f2b196c3a079f8ed5 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Wed, 20 Nov 2024 11:16:16 +0000 Subject: [PATCH 04/11] #93 Update Readme --- README.md | 50 +++++++++++++------------------------------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 0f28667..34cc0c6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ - - # pharmaverseadam @@ -9,8 +7,7 @@ [](https://pharmaverse.org) -[![CRAN -status](https://www.r-pkg.org/badges/version/pharmaverseadam)](https://CRAN.R-project.org/package=pharmaverseadam) +[![CRANstatus](https://www.r-pkg.org/badges/version/pharmaverseadam)](https://CRAN.R-project.org/package=pharmaverseadam) @@ -18,28 +15,18 @@ Test data (ADaM) for the pharmaverse family of packages # Purpose -To provide a one-stop-shop for ADaM test data in the pharmaverse family -of packages. +To provide a one-stop-shop for ADaM test data in the pharmaverse family of packages. # Package Contents -The ADaM contents of this package is populated by an action that -executes the `{admiral}`, `{admiralonco}`, `{admiralophtha}`, -`{admiralvaccine}` and `{admiralpeds}` templates and saves the resulting -datasets here. This action can be triggered manually by the package -maintainers in two scenarios: +The ADaM contents of this package is populated by an action that executes the `{admiral}`, `{admiralonco}`, `{admiralophtha}`, `{admiralvaccine}` and `{admiralpeds}` templates and saves the resulting datasets here. This action can be triggered manually by the package maintainers in two scenarios: -- Regularly, upon new releases of `{admiral}`, `{admiralonco}`, - `{admiralophtha}` and `{admiralvaccine}`; -- Ad-hoc, whenever templates in the above packages have been updated - but releases are far away in the calendar. In this case, the ADaM - datasets are created using the development version of the templates. +- Regularly, upon new releases of `{admiral}`, `{admiralonco}`, `{admiralophtha}` and `{admiralvaccine}`; +- Ad-hoc, whenever templates in the above packages have been updated but releases are far away in the calendar. In this case, the ADaM datasets are created using the development version of the templates. # Installation -The package is available from CRAN and can be installed by running -`install.packages("pharmaverseadam")`. To install the latest development -version of the package directly from GitHub use the following code: +The package is available from CRAN and can be installed by running `install.packages("pharmaverseadam")`. To install the latest development version of the package directly from GitHub use the following code: ``` if (!requireNamespace("remotes", quietly = TRUE)) { @@ -49,33 +36,22 @@ if (!requireNamespace("remotes", quietly = TRUE)) { # Documentation Process -The documentation process in `{pharmaverseadam}` is automated for -consistency and ease of maintenance. Metadata for each dataset, such as -names, labels, descriptions, authors, and sources, is managed in a -centralized XLSX file (`inst/extdata/adams-specs.xlsx`) and used to -generate `.R` documentation files. +The documentation process in `{pharmaverseadam}` is automated for consistency and ease of maintenance. Metadata for each dataset, such as names, labels, descriptions, authors, and sources, is managed in a centralized XLSX file (`inst/extdata/adams-specs.xlsx`) and used to generate `.R` documentation files. ## Workflow 1. **Metadata Preparation**: - - Ensure `adams-specs.xlsx` contains up-to-date metadata for all - datasets. - - Missing fields default to "No label/description/source - available." + - Ensure `adams-specs.xlsx` contains up-to-date metadata for all datasets. + - Missing fields default to "No label/description/source available." 2. **Run Script**: - - The `data-raw/create_adams_data.R` script dynamically retrieves - metadata, enriches it with dataset attributes, and generates - `.R` files in the `R/` directory. + - The `data-raw/create_adams_data.R` script dynamically retrieves metadata, enriches it with dataset attributes, and generates `.R` files in the `R/` directory. 3. **Generate Documentation**: - - Use `roxygen2::roxygenize()` to update `.Rd` files in the `man/` - directory. + - Use `roxygen2::roxygenize()` to update `.Rd` files in the `man/` directory. ## Key Benefits of this Documentation Approach -- **Automation**: Eliminates manual effort in maintaining - documentation. +- **Automation**: Eliminates manual effort in maintaining documentation. - **Consistency**: Ensures uniform documentation for all datasets. - **Flexibility**: Easily update metadata centrally via the XLSX file. -This streamlined approach aligns with best practices for efficient -package development. +This streamlined approach aligns with best practices for efficient package development. From cff06e8c49d6265ebb33e3752e17b4ffa680811b Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Wed, 20 Nov 2024 11:20:30 +0000 Subject: [PATCH 05/11] #93 Update Readme --- README.md | 4 ---- inst/WORDLIST | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 34cc0c6..d178f97 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ - - - - # pharmaverseadam diff --git a/inst/WORDLIST b/inst/WORDLIST index feaafad..cbd73be 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -202,3 +202,5 @@ Hy Hy's ORCID XLSX +WORD +CRANstatus From f451d7e7d0b9d20bea7648a186ee397a5ed0e887 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Wed, 20 Nov 2024 11:21:13 +0000 Subject: [PATCH 06/11] #93 Update Readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d178f97..43f1602 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [](https://pharmaverse.org) -[![CRANstatus](https://www.r-pkg.org/badges/version/pharmaverseadam)](https://CRAN.R-project.org/package=pharmaverseadam) +[![CRAN status](https://www.r-pkg.org/badges/version/pharmaverseadam)](https://CRAN.R-project.org/package=pharmaverseadam) From cb34f324168e0ef06afdba1403871c0706431050 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Wed, 20 Nov 2024 11:24:10 +0000 Subject: [PATCH 07/11] #93 Add new author --- DESCRIPTION | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 37069e2..f522c82 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -9,7 +9,8 @@ Authors@R: c( person("Gayatri", "G", role = "aut"), person("Daphne", "Grassely", role = "aut"), person("Zelos", "Zhu", role = "aut"), - person("Sadchla", "Mascary", role = "aut") + person("Sadchla", "Mascary", role = "aut"), + person("Vladyslav", "Shuliar", role = "aut", comment = c(ORCID = "0009-0008-2354-8999")) ) Description: A set of Analysis Data Model (ADaM) datasets constructed using the Study Data Tabulation Model (SDTM) datasets contained in the 'pharmaversesdtm' package and From 3d51ae31239b6c03ba1b7abbd72161c04b7cb32f Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Wed, 20 Nov 2024 11:29:06 +0000 Subject: [PATCH 08/11] #93 Run roxygenize --- man/pharmaverseadam-package.Rd | 1 + 1 file changed, 1 insertion(+) diff --git a/man/pharmaverseadam-package.Rd b/man/pharmaverseadam-package.Rd index e9c3744..8485d40 100644 --- a/man/pharmaverseadam-package.Rd +++ b/man/pharmaverseadam-package.Rd @@ -29,6 +29,7 @@ Authors: \item Daphne Grassely \item Zelos Zhu \item Sadchla Mascary + \item Vladyslav Shuliar (\href{https://orcid.org/0009-0008-2354-8999}{ORCID}) } } From 0e8310f2f6dbbe90d1cad2b75c4ae7cc5f408fd0 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Mon, 2 Dec 2024 08:48:18 +0000 Subject: [PATCH 09/11] #93 Improve readme --- README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index 43f1602..99500c0 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,7 @@ To provide a one-stop-shop for ADaM test data in the pharmaverse family of packa # Package Contents The ADaM contents of this package is populated by an action that executes the `{admiral}`, `{admiralonco}`, `{admiralophtha}`, `{admiralvaccine}` and `{admiralpeds}` templates and saves the resulting datasets here. This action can be triggered manually by the package maintainers in two scenarios: - -- Regularly, upon new releases of `{admiral}`, `{admiralonco}`, `{admiralophtha}` and `{admiralvaccine}`; +- Regularly, upon new releases of these packages; - Ad-hoc, whenever templates in the above packages have been updated but releases are far away in the calendar. In this case, the ADaM datasets are created using the development version of the templates. # Installation @@ -43,11 +42,3 @@ The documentation process in `{pharmaverseadam}` is automated for consistency an - The `data-raw/create_adams_data.R` script dynamically retrieves metadata, enriches it with dataset attributes, and generates `.R` files in the `R/` directory. 3. **Generate Documentation**: - Use `roxygen2::roxygenize()` to update `.Rd` files in the `man/` directory. - -## Key Benefits of this Documentation Approach - -- **Automation**: Eliminates manual effort in maintaining documentation. -- **Consistency**: Ensures uniform documentation for all datasets. -- **Flexibility**: Easily update metadata centrally via the XLSX file. - -This streamlined approach aligns with best practices for efficient package development. From e0fde62fb6feac50548b8fc0118d2eeb87311567 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Mon, 2 Dec 2024 08:49:42 +0000 Subject: [PATCH 10/11] #93 Resolve wordlist conflict --- inst/WORDLIST | 1 + 1 file changed, 1 insertion(+) diff --git a/inst/WORDLIST b/inst/WORDLIST index cbd73be..016998e 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -204,3 +204,4 @@ ORCID XLSX WORD CRANstatus +tibble From 71d0b4118ed404aa0c55843b6b766c257c68f975 Mon Sep 17 00:00:00 2001 From: Edoardo Mancini Date: Tue, 3 Dec 2024 10:09:45 +0000 Subject: [PATCH 11/11] #93 fix readme typo --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 99500c0..ea5a384 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ The package is available from CRAN and can be installed by running `install.pack if (!requireNamespace("remotes", quietly = TRUE)) { install.packages("remotes") } + +remotes::install_github("pharmaverse/pharmaverseadam", ref = "main") ``` # Documentation Process