Skip to content

Commit

Permalink
Updated version to 1.3 (#18)
Browse files Browse the repository at this point in the history
* v1.3.0 (dev)

* Added ggplot2 and missingness

* Update methods-TxpResult-plot.R

added showCenter parameter for showing/removing inner circle

* Update introduction.Rmd

added ggplot method examples and comparisons

* Update DESCRIPTION

Added Jonathon Fleming as author

* Update introduction.Rmd

Adjusted presentation of graphical "paths" and their comparison

* updated with embedded pdf example and new sections for ggplot method

* Intro vignette formatting

* Update introduction.Rmd

Editing text in the Graphics (fka Plotting) section

* Update introduction.Rmd

updated text + swapped out intro figure

* New introductory figure

* Updated version to 1.3

* Patched coord_munch update

* Make coord_munch update compatible with older versions of ggplot2

* added testing for new missingness and plot code

* added extra testing and vignette comments

* Swapped to svg rendering to remove blurriness, removed pdf comparison, fixed workflow image scaling, fixed "rigid lines" in center of plot by removing coord_munch reset

* Updated README to contain updated steps for installing/building package

* reverted to png and set fig.retina parameter to improve plot resolution

* Update README.md

Minor text and line-wrap adjustments

* Update README.md

Minor edits

* updated pkgdown workflow to V2 to replace deprecated version

* updated all files for V2 setup

---------

Co-authored-by: Dayne Filer, MD, PhD <[email protected]>
Co-authored-by: SkylarMarvel <[email protected]>
Co-authored-by: David Reif <[email protected]>
Co-authored-by: Fleming <[email protected]>
Co-authored-by: SkylarMarvel <[email protected]>
  • Loading branch information
6 people authored Aug 7, 2024
1 parent bc1ba41 commit 57e8479
Show file tree
Hide file tree
Showing 29 changed files with 1,084 additions and 298 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -18,7 +20,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand All @@ -29,18 +31,22 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v1
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
39 changes: 27 additions & 12 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: pkgdown
extra-packages: any::pkgdown, local::.
needs: website

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
45 changes: 38 additions & 7 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -15,16 +17,45 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
9 changes: 6 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: toxpiR
Type: Package
Title: Create ToxPi Prioritization Models
Version: 1.2.1
Version: 1.3.0
Authors@R:
c(person("Dayne L", "Filer",
role = c("aut", "cre", "fnd"),
Expand All @@ -14,6 +14,8 @@ Authors@R:
comment = c(ORCID = "0000-0001-5447-0129")),
person("Skylar W", "Marvel",
role = "aut"),
person("Jonathon", "Fleming",
role = "aut"),
person("Alison A", "Motsinger-Reif",
role = c("fnd"),
comment = c(ORCID = "0000-0003-1346-2493")),
Expand Down Expand Up @@ -41,10 +43,11 @@ Imports:
BiocGenerics,
pryr,
tidyr,
utils
utils,
ggplot2
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
Depends:
R (>= 4.0)
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ exportMethods(plot)
exportMethods(sort)
exportMethods(txpCalculateScores)
exportMethods(txpIDs)
exportMethods(txpMissing)
exportMethods(txpModel)
exportMethods(txpRanks)
exportMethods(txpResultParam)
Expand All @@ -53,6 +54,7 @@ exportMethods(txpSlices)
exportMethods(txpTransFuncs)
exportMethods(txpValueNames)
exportMethods(txpWeights)
import(ggplot2)
import(grid)
import(methods)
importClassesFrom(S4Vectors,List)
Expand Down
19 changes: 10 additions & 9 deletions R/allClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ setClassUnion("TxpTransFunc_OR_NULL", members = c("TxpTransFunc", "NULL"))
#' @rdname TxpTransFuncList-class
#' @exportClass TxpTransFuncList

setClass("TxpTransFuncList",
contains = "SimpleList",
setClass("TxpTransFuncList",
contains = "SimpleList",
prototype = prototype(elementType = "TxpTransFunc_OR_NULL"))

##----------------------------------------------------------------------------##
Expand All @@ -43,7 +43,7 @@ setClass("TxpTransFuncList",
#' @rdname TxpSlice-class
#' @exportClass TxpSlice

setClass("TxpSlice",
setClass("TxpSlice",
slots = c(txpValueNames = "character",
txpTransFuncs = "TxpTransFuncList"))

Expand All @@ -66,8 +66,8 @@ setClass("TxpSliceList",
#' @rdname TxpModel-class
#' @exportClass TxpModel

setClass("TxpModel",
slots = c(txpSlices = "TxpSliceList",
setClass("TxpModel",
slots = c(txpSlices = "TxpSliceList",
txpWeights = "numeric",
txpTransFuncs = "TxpTransFuncList"))

Expand All @@ -90,8 +90,8 @@ setClass("TxpModelList",
#' @name TxpResultParam-class
#' @exportClass TxpResultParam

setClass("TxpResultParam",
slots = c(rank.ties.method = "character",
setClass("TxpResultParam",
slots = c(rank.ties.method = "character",
negative.value.handling = "character"))

##----------------------------------------------------------------------------##
Expand All @@ -100,10 +100,11 @@ setClass("TxpResultParam",
#' @name TxpResult-class
#' @exportClass TxpResult

setClass("TxpResult",
slots = c(txpScores = "numeric",
setClass("TxpResult",
slots = c(txpScores = "numeric",
txpSliceScores = "matrix",
txpRanks = "numeric",
txpMissing = "numeric",
txpModel = "TxpModel",
txpIDs = "character_OR_NULL",
txpResultParam = "TxpResultParam"))
Expand Down
17 changes: 10 additions & 7 deletions R/allGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

#' @name txpGenerics
#' @title toxpiR package generics
#' @description toxpiR package generics; see class man pages for associated
#' @description toxpiR package generics; see class man pages for associated
#' methods
#' @param x toxpiR S4 object
#' @param value Replacement value
#' @param ... Included for extendability; not currently used
#'
#'
#' @return See specific methods for details.

NULL
Expand All @@ -19,32 +19,32 @@ NULL
setGeneric("txpValueNames", function(x, ...) standardGeneric("txpValueNames"))

#' @rdname txpGenerics
setGeneric("txpValueNames<-",
setGeneric("txpValueNames<-",
function(x, ..., value) standardGeneric("txpValueNames<-"))

#' @rdname txpGenerics
setGeneric("txpTransFuncs", function(x, ...) standardGeneric("txpTransFuncs"))

#' @rdname txpGenerics
setGeneric("txpTransFuncs<-",
setGeneric("txpTransFuncs<-",
function(x, ..., value) standardGeneric("txpTransFuncs<-"))

#' @rdname txpGenerics
setGeneric("txpSlices", function(x, ...) standardGeneric("txpSlices"))

#' @rdname txpGenerics
setGeneric("txpSlices<-",
setGeneric("txpSlices<-",
function(x, ..., value) standardGeneric("txpSlices<-"))

#' @rdname txpGenerics
setGeneric("txpWeights", function(x, ...) standardGeneric("txpWeights"))

#' @rdname txpGenerics
setGeneric("txpWeights<-",
setGeneric("txpWeights<-",
function(x, ..., value) standardGeneric("txpWeights<-"))

#' @rdname txpCalculateScores
setGeneric("txpCalculateScores",
setGeneric("txpCalculateScores",
function(model, input, ...) standardGeneric("txpCalculateScores"))

#' @rdname txpGenerics
Expand All @@ -65,5 +65,8 @@ setGeneric("txpIDs<-", function(x, ..., value) standardGeneric("txpIDs<-"))
#' @rdname txpGenerics
setGeneric("txpRanks", function(x, ...) standardGeneric("txpRanks"))

#' @rdname txpGenerics
setGeneric("txpMissing", function(x, ...) standardGeneric("txpMissing"))

#' @rdname txpGenerics
setGeneric("txpResultParam", function(x, ...) standardGeneric("txpResultParam"))
Loading

0 comments on commit 57e8479

Please sign in to comment.