Skip to content

Commit

Permalink
Closes #1 replace admiraltemplate placeholders (#2)
Browse files Browse the repository at this point in the history
* #1 replacing admiraltemplate files

* #1 update more files

* #1 chore: amend failed checks

* #1 chore: failed checks

* #1 fix styler check

* Update inst/templates/ad_adxx.R

Co-authored-by: Stefan Bundfuss <[email protected]>

* #1 updates following review

* #1 updated imported packages

* #1 updated namespace

* #1 updates to packages in description

* #1 updated wordlist order

* #1 updated namespace

* Update _pkgdown.yml

---------

Co-authored-by: Stefan Bundfuss <[email protected]>
  • Loading branch information
manciniedoardo and bundfussr authored Jun 17, 2024
1 parent f8356a1 commit fe78d4e
Show file tree
Hide file tree
Showing 18 changed files with 112 additions and 158 deletions.
6 changes: 3 additions & 3 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
^man/dev_util_.+\.Rd$
^LICENSE\.md$
^\.github$
^admiraltemplate\.Rcheck$
^admiraltemplate.*\.tar\.gz$
^admiraltemplate.*\.tgz$
^admiralmetabolic\.Rcheck$
^admiralmetabolic.*\.tar\.gz$
^admiralmetabolic.*\.tgz$
^staged_dependencies.yaml$
^README.Rmd$
^\.devcontainer$
3 changes: 2 additions & 1 deletion .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# Validate Links

https://packagemanager.rstudio.com/cran/linux/focal/latest
https://github.com/pharmaverse/admiraltemplate/blob/main/
https://github.com/pharmaverse/admiralmetabolic/blob/main/
irongut/[email protected]
insightsengineering/[email protected]
https://packagemanager.rstudio.com/cran/__linux__/focal/latest
tj-actions/[email protected]
https://pharmaverse.github.io/admiralmetabolic
24 changes: 10 additions & 14 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Type: Package
Package: `<<INSERT PACKAGE EXT NAME>>'
Title: ADaM in R Asset Library - Extension Package for `<<INSERT TA>>`
Version: 0.1.0
Package: admiralmetabolic
Title: Metabolism Extension Package for ADaM in 'R' Asset Library
Version: 0.0.0
Authors@R:
person("Open", "Source", , "admiraltemplate@pharmaverse.com", role = c("aut", "cre"))
person("Edoardo", "Mancini", , "edoardo.mancini@roche.com", role = c("aut", "cre"))
Description: A toolbox for programming Clinical Data Standards Interchange
Consortium (CDISC) compliant Analysis Data Model (ADaM) datasets in R.
ADaM datasets are a mandatory part of any New Drug or Biologics
Expand All @@ -12,7 +12,8 @@ Description: A toolbox for programming Clinical Data Standards Interchange
accordance with the "Analysis Data Model Implementation Guide" (CDISC
Analysis Data Model Team, 2021,
<https://www.cdisc.org/standards/foundational/adam>). The package is
an extension package of the 'admiral' package.
an extension package of the 'admiral' package focusing on the
metabolism therapeutic area.
License: Apache License (>= 2)
URL: https://pharmaverse.github.io/admiraltemplate,
https://github.com/pharmaverse/admiraltemplate
Expand All @@ -21,25 +22,20 @@ Depends:
Imports:
admiral (>= 1.0.0),
admiraldev (>= 1.0.0),
dplyr (>= 1.0.5),
hms (>= 0.5.3),
dplyr (>= 0.8.4),
stringr (>= 1.4.0),
lifecycle (>= 0.1.0),
lubridate (>= 1.7.4),
magrittr (>= 1.5),
purrr (>= 0.3.3),
rlang (>= 0.4.4),
stringr (>= 1.4.0),
tidyr (>= 1.0.2),
tidyselect (>= 1.1.0)
tidyselect (>= 1.0.0)
Suggests:
diffdf,
DT,
htmltools,
knitr,
methods,
pharmaversesdtm (>= 0.2.0),
reactable,
readxl,
pharmaversesdtm (>= 1.0.0),
rmarkdown,
testthat (>= 3.0.0),
tibble
Expand Down
29 changes: 0 additions & 29 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(hello_admiral)
importFrom(admiral,derive_vars_dy)
importFrom(admiraldev,assert_character_scalar)
importFrom(admiraldev,assert_character_vector)
importFrom(admiraldev,assert_data_frame)
importFrom(admiraldev,assert_filter_cond)
importFrom(admiraldev,assert_logical_scalar)
importFrom(admiraldev,assert_numeric_vector)
importFrom(admiraldev,assert_symbol)
importFrom(admiraldev,assert_vars)
importFrom(dplyr,arrange)
importFrom(dplyr,bind_cols)
importFrom(dplyr,bind_rows)
Expand Down Expand Up @@ -42,7 +33,6 @@ importFrom(dplyr,transmute)
importFrom(dplyr,ungroup)
importFrom(dplyr,union)
importFrom(dplyr,vars)
importFrom(hms,as_hms)
importFrom(lifecycle,deprecate_stop)
importFrom(lifecycle,deprecate_warn)
importFrom(lifecycle,deprecated)
Expand All @@ -63,20 +53,6 @@ importFrom(lubridate,years)
importFrom(lubridate,ymd)
importFrom(lubridate,ymd_hms)
importFrom(magrittr,"%>%")
importFrom(purrr,compose)
importFrom(purrr,every)
importFrom(purrr,flatten)
importFrom(purrr,keep)
importFrom(purrr,map)
importFrom(purrr,map2)
importFrom(purrr,map_chr)
importFrom(purrr,map_if)
importFrom(purrr,map_lgl)
importFrom(purrr,modify_at)
importFrom(purrr,modify_if)
importFrom(purrr,reduce)
importFrom(purrr,transpose)
importFrom(purrr,walk)
importFrom(rlang,":=")
importFrom(rlang,.data)
importFrom(rlang,abort)
Expand Down Expand Up @@ -136,11 +112,6 @@ importFrom(stringr,str_to_lower)
importFrom(stringr,str_to_title)
importFrom(stringr,str_to_upper)
importFrom(stringr,str_trim)
importFrom(tidyr,drop_na)
importFrom(tidyr,nest)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,pivot_wider)
importFrom(tidyr,unnest)
importFrom(tidyselect,all_of)
importFrom(tidyselect,contains)
importFrom(tidyselect,vars_select)
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# admiraltemplate 0.1.0
# admiralmetabolic 0.1.0

- Initial package release focused on `<<ADD INITIAL SCOPE>>`

Expand Down
8 changes: 0 additions & 8 deletions R/admiraltemplate-package.R → R/admiralmetabolic-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,10 @@
#' quo_is_missing quo_is_null quo_is_symbol quos quo_squash quo_text
#' set_names sym syms type_of warn quo_set_env quo_get_env
#' @importFrom utils capture.output str
#' @importFrom purrr map map2 map_chr map_lgl reduce walk keep map_if transpose
#' flatten every modify_at modify_if reduce compose
#' @importFrom stringr str_c str_detect str_extract str_remove str_remove_all
#' str_replace str_trim str_to_lower str_to_title str_to_upper str_glue
#' @importFrom lubridate as_datetime ceiling_date date days duration floor_date is.Date is.instant
#' time_length %--% ymd ymd_hms weeks years hours minutes
#' @importFrom tidyr drop_na nest pivot_longer pivot_wider unnest
#' @importFrom tidyselect all_of contains vars_select
#' @importFrom hms as_hms
#' @importFrom lifecycle deprecate_warn deprecated deprecate_stop
#' @importFrom admiral derive_vars_dy
#' @importFrom admiraldev assert_logical_scalar assert_character_vector assert_vars
#' assert_data_frame assert_character_scalar assert_numeric_vector assert_filter_cond
#' assert_symbol
"_PACKAGE"
6 changes: 0 additions & 6 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
#' xx Dataset
#'
#' An xx test dataset for xx
#' @keywords datasets
#' @family datasets
"xx"
141 changes: 74 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,74 @@
<!-- Please do not edit the README.md file as it is auto-generated after PR merges. Only edit the README.Rmd file -->
<!-- The purpose of this is to enable dynamic links using dyn_link function above to access devel/main admiral homepage respectively -->
<!-- To test this in your feature branch use code: rmarkdown::render("README.Rmd", output_format ="md_document") -->

# admiral package extension Template <img src="man/figures/logo.png" align="right" width="200" style="margin-left:50px;"/>

<!-- badges: start -->

[<img src="http://pharmaverse.org/shields/admiral.svg">](https://pharmaverse.org)
[![CRAN
status](https://www.r-pkg.org/badges/version/admiral)](https://CRAN.R-project.org/package=admiral)
[![Test
Coverage](https://raw.githubusercontent.com/pharmaverse/admiraltemplate/badges/main/test-coverage.svg)](https://github.com/pharmaverse/admiraltemplate/actions/workflows/code-coverage.yml)
<!-- badges: end -->

## Table of Contents

- [Extension Expectations](#extension-expectations)
- [What is included in the
template](#what-is-included-in-the-template)
- [Package Extension Guidance](#package-extension-guidance)
- [Quick Start Guide for Template](#quick-start-guide-for-template)

## Extension Expectations

To be included as an `{admiral}` package extension we expect developers
to adhere to the following standards:

- [Code of
Conduct](https://pharmaverse.github.io/admiral/CODE_OF_CONDUCT.html)
- [Manifesto](https://pharmaverse.github.io/admiral/index.html?q=manifest#admiral-manifesto)
- [Programming
Strategy](https://pharmaverse.github.io/admiraldev/articles/programming_strategy.html)
- Follow consistent workflow checks
- A CRAN Release means 90% or greater test coverage

We have developed this repository template in order to reduce the burden
on developers to follow these standards. This template will also help to
harmonize the `{admiral}` family of R packages, to ensure a consistent
user experience and ease of installing and adopting all the packages.
With this in mind, we expect the same core package dependencies and
versions as used for `{admiral}`.

## What is included in the template

The repository template includes the following:

- License file (Apache 2.0 - but company co-developers need to be
added to copyright section)
- Required folders (R; test; templates; vignettes; etc)
- Set-up files (DESCRIPTION; NAMESPACE; etc)
- Issue Templates (Bug Template; Feature Request; Documentation
Request/Update; Onboarding)
- Pull Request Template
- Workflow actions (a selection of generic and specific CI/CD
auto-checks)
- Package badges (Test coverage; etc)
- Branch protection rules

## Package Extension Guidance

For detailed information regarding the ethos of `{admiral}` package
extensions and how to decide if you should set your own one up, please
see our [Package Extension
Guidance](https://pharmaverse.github.io/admiraldev/articles/package_extensions.html).
You will also find details about team setup, suggested workflow and
lessons learned from past package extensions.
# admiralmetabolic <img src="man/figures/logo.png" align="right" width="200" style="margin-left:50px;"/>

Metabolism extension package for ADaM in R Asset Library `{admiral}`

## Purpose

To provide a complementary (to `{admiral}`) toolbox that enables users
to develop specifics for metabolic clinical trials.

## Installation

To install the latest development version of the package directly from
GitHub use the following code:

```r
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}

remotes::install_github("pharmaverse/admiraldev") # This is a required dependency of {admiralmetabolic}
remotes::install_github("pharmaverse/admiral") # This is a required dependency of {admiralmetabolic}
remotes::install_github("pharmaverse/admiralmetabolic")
```

### Dependencies

The latest version of the package works with the latest versions of the
packages stated in `DESCRIPTION`.

If a previous version of the package should be used, it is recommended
to use latest version of the dependencies at the point of time when the
previous version of `{admiralmetabolic}` was released.

## Scope

- Build a toolbox of re-usable functions and utilities to create
metabolism-specific ADaM datasets in R in a modular manner.
- All functions are created based upon the ADaM Implementation Guide
and aim to facilitate the programming of ADaM dataset standards.
- Initially the package will focus on <insert focus>.

## Expectations

`{admiralmetabolic}` is expected to complement `{admiral}` and provide
functions to help with the creation of analyses required
for metabolic trial ADaMs.

## References and Documentation

- Please refer to the [References and
Documentation](https://pharmaverse.github.io/admiral/index.html#references-and-documentation)

## R Versions

Here’s a summary of our strategy for this package related to R versions:

- R versions for developers and users will follow the same as
`{admiral}` core package.
- For development the `main` branch of `{admiral}` core is used as a
dependency. For releasing a new `{admiralmetabolic}` version it must run
using the latest released `{admiral}` core version.

## Contact

We use the following for support and communications between user and
developer community:

- [Slack](https://pharmaverse.slack.com/) - for
informal discussions, Q&A and building our user community. If you
don't have access, use this
[link](https://join.slack.com/t/pharmaverse/shared_invite/zt-yv5atkr4-Np2ytJ6W_QKz_4Olo7Jo9A)
to join the pharmaverse Slack workspace
- [GitHub Issues](https://github.com/pharmaverse/admiralmetabolic/issues) -
for direct feedback, enhancement requests or raising bugs
14 changes: 7 additions & 7 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
url: https://pharmaverse.github.io/admiraltemplate
url: https://pharmaverse.github.io/admiralmetabolic

template:
bootstrap: 5
params:
bootswatch: flatly
repo:
url:
home: https://github.com/pharmaverse/admiraltemplate
source: https://github.com/pharmaverse/admiraltemplate/blob/main/
issue: https://github.com/pharmaverse/admiraltemplate/issues/
home: https://github.com/pharmaverse/admiralmetabolic
source: https://github.com/pharmaverse/admiralmetabolic/blob/main/
issue: https://github.com/pharmaverse/admiralmetabolic/issues/
user: https://github.com/
news:
cran_dates: true
Expand All @@ -32,7 +32,7 @@ reference:

- title: Advanced Functions
- subtitle: Pre-Defined Source Objects
desc: Source objects defined by {admiraltemplate}
desc: Source objects defined by {admiralmetabolic}
- contents:
- has_keyword("source_specifications")

Expand Down Expand Up @@ -61,7 +61,7 @@ navbar:
components:
getstarted:
text: Get Started
href: articles/admiraltemplate.html
href: articles/admiralmetabolic.html
reference:
text: Reference
href: reference/index.html
Expand All @@ -80,5 +80,5 @@ navbar:
aria-label: Slack
newissue:
icon: fa-bug
href: https://github.com/pharmaverse/admiraltemplate/issues/new/choose
href: https://github.com/pharmaverse/admiralmetabolic/issues/new/choose
aria-label: New Issue
File renamed without changes.
7 changes: 0 additions & 7 deletions data-raw/xx.R

This file was deleted.

1 change: 0 additions & 1 deletion data/xx.rda

This file was deleted.

5 changes: 3 additions & 2 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Onboarding
README
SDTM
TAs
Template
USUBJIDs
admiralxxx
admiraltemplate
admiralmetabolic
adxx
anonymized
der
Expand All @@ -27,4 +28,4 @@ pharmaverse
renv
repo
roxygen
Template

4 changes: 2 additions & 2 deletions inst/templates/ad_adxx.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ library(pharmaversesdtm) # Contains example datasets from the CDISC pilot projec
# Save output ----

# Change to whichever directory you want to save the dataset in
dir <- tools::R_user_dir("admiraltemplate_templates_data", which = "cache")
dir <- tools::R_user_dir("admiralmetabolic_templates_data", which = "cache")
if (!file.exists(dir)) {
# Create the folder
dir.create(dir, recursive = TRUE, showWarnings = FALSE)
}
save(adxx, file = file.path(dir, "adxx.rda"), compress = "bzip2")
# save(adxx, file = file.path(dir, "adxx.rda"), compress = "bzip2")
Loading

0 comments on commit fe78d4e

Please sign in to comment.