Skip to content

Commit

Permalink
redo for updated dpcys
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewphamilton committed Oct 4, 2023
1 parent c712a3e commit 3321b08
Show file tree
Hide file tree
Showing 19 changed files with 262 additions and 103 deletions.
99 changes: 27 additions & 72 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Adapted from: https://github.com/ready4-dev/ready4class/runs/3657635374?check_suite_focus=true
# NOTE: This workflow is overkill for most R packages
# check-standard.yaml is likely a better choice
# usethis::use_github_action("check-standard") will install it.
#
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
Expand Down Expand Up @@ -29,85 +26,43 @@ jobs:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: '3.6'}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.0.0 (ubuntu-20.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-latest, r: 'release'}
#- {os: windows-latest, r: '3.6'}
# - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.0.0 (ubuntu-20.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
# - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
#- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v3 #
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}

# with:
# r-version: ${{ matrix.config.r }}
# http-user-agent: ${{ matrix.config.http-user-agent }}
# use-public-rspm: true
- uses: r-lib/actions/setup-tinytex@v2
- run: tlmgr --version
- uses: r-lib/actions/setup-pandoc@v2

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows' && !matrix.config.autobrew
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ matrix.config.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
pandoc-version: '2.17.1' # The pandoc version to download (if necessary) and use.
- run: echo "# Test" | pandoc -t html
# Addresses issue with incompatibility between libcurl4-gnutls-dev and libcurl4-openssl-dev
# Below fix is a customisation of approach outlined in https://github.com/r-hub/sysreqsdb/issues/77#issuecomment-620025428
- name: Install libraptor on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get install libharfbuzz-dev
sudo apt-get install libfribidi-dev
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
- name: Install system dependencies
if: runner.os == 'MacOS' && !matrix.config.autobrew
run: brew install harfbuzz fribidi

- name: Remove homebrew
if: matrix.config.autobrew
uses: autobrew/uninstall-homebrew@master

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
sudo add-apt-repository ppa:cran/librdf
sudo apt update
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::XML, any::rcmdcheck
needs: check
- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
args: 'c("--no-manual", "--as-cran")'
error-on: '"error"'
check-dir: '"check"'
12 changes: 12 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,27 @@ jobs:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-tinytex@v2

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

# Addresses issue with incompatibility between libcurl4-gnutls-dev and libcurl4-openssl-dev
# Below fix is a customisation of approach outlined in https://github.com/r-hub/sysreqsdb/issues/77#issuecomment-620025428
- name: Install libraptor on Linux
if: runner.os == 'Linux'
run: |
sudo add-apt-repository ppa:cran/librdf
sudo apt update
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::XML, any::pkgdown, local::.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
youthu - Transform Youth Outcomes to Health Utility Predictions with Ready4
youthu - Transform Youth Outcomes to Health Utility Predictions
Copyright (C) 2023 Orygen

This program is free software: you can redistribute it and/or modify
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# youthu

## Transform Youth Outcomes to Health Utility Predictions with Ready4
## Transform Youth Outcomes to Health Utility Predictions

<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![ready4](https://img.shields.io/badge/ready4-prediction-forestgreen?style=flat&labelColor=black&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAIXRFWHRDcmVhdGlvbiBUaW1lADIwMjI6MDM6MDcgMTY6MTM6NTPZeG5UAAABa0lEQVQ4T4WT607CQBCFpyUi3qIR0eAfNfCi/vENfEgENIAIlcJ6vr1oLaZOerJzdst0zpklc49nznqHZs6ZfWwDem1xM1sqXwtXkb8rL4SuOLEoLXPPXWfD01Dg9dPsrTQbngQ+EZ+LDyIfiy/FHyIfFZbbTslWKOOqxx/uWBPSfp07FahGlqlNfWGqL9HNfBO+CAfwdO55WS8g4MFML834sfJVA9e7vwsg50aGohncdmRojV9XeL+jArRNmZxVSJ4Acj3NHqARdyeFJqC2KJiCfKE9zsfxnNYTl5TcCtmNMcwY/ZXf+3wdzzVza2vj4iCaq3d1R/bvwVSH6IPjNIUHx0FSNZA7WquDqOVb35+eiO8h7Oe+vRfp0a3yGtFMDuiAIg2R20YaVwJ3Hj+4kehO/J/I7VJ/jHtpvBP6mrHnR4EzdyQ0xI8HhM8jUiChxVpDK3iVuadzx43yRdI4E2d0gNtX74TCs419AR8YEST/cHPBAAAAAElFTkSuQmCC)](https://www.ready4-dev.com/toolkits/)
[![ready4](https://img.shields.io/badge/ready4-prediction-forestgreen?style=flat&labelColor=black&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAAAEZ0FNQQAAsY8L/GEFAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAIXRFWHRDcmVhdGlvbiBUaW1lADIwMjI6MDM6MDcgMTY6MTM6NTPZeG5UAAABa0lEQVQ4T4WT607CQBCFpyUi3qIR0eAfNfCi/vENfEgENIAIlcJ6vr1oLaZOerJzdst0zpklc49nznqHZs6ZfWwDem1xM1sqXwtXkb8rL4SuOLEoLXPPXWfD01Dg9dPsrTQbngQ+EZ+LDyIfiy/FHyIfFZbbTslWKOOqxx/uWBPSfp07FahGlqlNfWGqL9HNfBO+CAfwdO55WS8g4MFML834sfJVA9e7vwsg50aGohncdmRojV9XeL+jArRNmZxVSJ4Acj3NHqARdyeFJqC2KJiCfKE9zsfxnNYTl5TcCtmNMcwY/ZXf+3wdzzVza2vj4iCaq3d1R/bvwVSH6IPjNIUHx0FSNZA7WquDqOVb35+eiO8h7Oe+vRfp0a3yGtFMDuiAIg2R20YaVwJ3Hj+4kehO/J/I7VJ/jHtpvBP6mrHnR4EzdyQ0xI8HhM8jUiChxVpDK3iVuadzx43yRdI4E2d0gNtX74TCs419AR8YEST/cHPBAAAAAElFTkSuQmCC)](https://www.ready4-dev.com/docs/software/libraries/types/module/)
[![R-CMD-check](https://github.com/ready4-dev/youthu/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ready4-dev/youthu/actions/workflows/R-CMD-check.yaml)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5646668.svg)](https://doi.org/10.5281/zenodo.5646668)
<!-- badges: end -->

Tools for mapping measures routinely collected in youth
mental health services to Quality Adjusted Life Years (QALYs). Part of
the ready4 youth mental health systems model
(https://www.ready4-dev.com/). This development version of the youthu
package has been made available as part of the process of testing and
documenting the package. If you have any questions, please contact the
authors (matthew.[email protected]).
(https://www.ready4-dev.com/docs/model/). This development version of
the youthu package has been made available as part of the process of
testing and documenting the package. If you have any questions, please
contact the authors (matthew.[email protected]).

To install a development version of this software, run the following commands in your R console:

Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ home:
href: https://github.com/ready4-dev/youthu/releases/download/Documentation_0.0/youthu_User.pdf
- text: Manual - Developer (PDF)
href: https://github.com/ready4-dev/youthu/releases/download/Documentation_0.0/youthu_Developer.pdf
- text: Model
- text: Framework & Model
href: https://www.ready4-dev.com/
development:
mode: auto
Expand Down
18 changes: 11 additions & 7 deletions data-raw/DATASET.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
library(generics)
#library(generics)
library(ready4)
library(ready4show)
library(ready4use)
library(youthvars)
library(scorz)
#library(scorz)
library(specific)
ready4fun::write_fn_type_dirs()
# MANUAL STEP. Write all your functions to R files in the new "fns" directory.
fns_env_ls <- ready4fun::read_fns(c("data-raw/fns/","data-raw/mthds/"),
fns_env = new.env(parent = globalenv()))
x <- ready4fun::make_pkg_desc_ls(pkg_title_1L_chr = "Transform Youth Outcomes to Health Utility Predictions With Ready4",
pkg_desc_1L_chr = "Tools for mapping measures routinely collected in youth mental health services to Quality Adjusted Life Years (QALYs). Part of the ready4 youth mental health systems model (https://www.ready4-dev.com/).
This development version of the youthu package has been made available as part of the process of testing and documenting the package. If you have any questions, please contact the authors (matthew.[email protected]).",
authors_prsn = c(utils::person(given = "Matthew",family = "Hamilton",email = "matthew.[email protected]", role = c("aut", "cre"),comment = c(ORCID = "0000-0001-7407-9194")),
x <- ready4fun::make_pkg_desc_ls(pkg_title_1L_chr = "Transform Youth Outcomes to Health Utility Predictions",
pkg_desc_1L_chr = "Tools for mapping measures routinely collected in youth mental health services to Quality Adjusted Life Years (QALYs). Part of the ready4 youth mental health systems model (https://www.ready4-dev.com/docs/model/).
This development version of the youthu package has been made available as part of the process of testing and documenting the package. If you have any questions, please contact the authors (matthew.[email protected]).",
authors_prsn = c(utils::person(given = "Matthew",family = "Hamilton",email = "matthew.[email protected]", role = c("aut", "cre"),comment = c(ORCID = "0000-0001-7407-9194")),
utils::person(given = "Caroline",family = "Gao",email = "[email protected]", role = c("aut"),comment = c(ORCID = "0000-0002-0987-2759")),
utils::person("Orygen", role = c("cph", "fnd")),
utils::person("Headspace", role = c( "fnd")),
Expand Down Expand Up @@ -54,7 +54,11 @@ z <- ready4pack::make_pt_ready4pack_manifest(x,
pkg_ds_ls_ls = datasets_ls) %>%
ready4pack::ready4pack_manifest()
z <- ready4::author(z)
ready4::write_extra_pkgs_to_actions()
ready4::write_extra_pkgs_to_actions(consent_1L_chr = "Y")
write_to_edit_workflow("pkgdown.yaml", consent_1L_chr = "Y") # In other packages, run for "test-coverage.yaml" as well.
readLines("_pkgdown.yml") %>%
stringr::str_replace_all(" - text: Model", " - text: Framework & Model") %>%
writeLines(con = "_pkgdown.yml")
devtools::build_vignettes()
# ready4::write_citation_cff(packageDescription("youthu"),
# citation_chr = readLines("inst/CITATION"))
Expand Down
Binary file modified data/mdls_lup.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ citEntry(
entry = "Manual",
doi = "10.5281/zenodo.5646668",
title = paste0(meta$Package,": ",meta$Title),
author = c(person("Matthew Hamilton <matthew.[email protected]> [aut, cre]", "(<https://orcid.org/0000-0001-7407-9194>)"), person("Caroline Gao <[email protected]> [aut]", "(<https://orcid.org/0000-0002-0987-2759>)")),
author = c(person("Matthew Hamilton <matthew.[email protected]> [aut, cre]", "(<https://orcid.org/0000-0001-7407-9194>)"), person("Caroline Gao <[email protected]> [aut]", "(<https://orcid.org/0000-0002-0987-2759>)")),
year = "2023",
note = sprintf("R package version %s", meta$Version),
url = "https://ready4-dev.github.io/youthu/",
textVersion = paste("Matthew Hamilton <matthew.[email protected]> [aut, cre] (<https://orcid.org/0000-0001-7407-9194>) and Caroline Gao <[email protected]> [aut] (<https://orcid.org/0000-0002-0987-2759>) ",
textVersion = paste("Matthew Hamilton <matthew.[email protected]> [aut, cre] (<https://orcid.org/0000-0001-7407-9194>) and Caroline Gao <[email protected]> [aut] (<https://orcid.org/0000-0002-0987-2759>) ",
"(2023).",
paste0(meta$Package,": ",meta$Title,
"."),
Expand Down
22 changes: 21 additions & 1 deletion man/figures/lifecycle-archived.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 21 additions & 1 deletion man/figures/lifecycle-defunct.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3321b08

Please sign in to comment.