Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated version to 1.3 #18

Merged
26 commits merged into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
60f0565
Merge pull request #13 from ToxPi/main
daynefiler Jul 20, 2022
36a9fa9
v1.3.0 (dev)
daynefiler Jul 20, 2022
19d5ef0
Added ggplot2 and missingness
SkylarMarvel Nov 20, 2023
1b8d27b
Update methods-TxpResult-plot.R
Dec 5, 2023
feff1f8
Update introduction.Rmd
Dec 5, 2023
78d6887
Update DESCRIPTION
davidmreif Dec 7, 2023
7f6ce80
Update introduction.Rmd
davidmreif Dec 7, 2023
68d8975
updated with embedded pdf example and new sections for ggplot method
flemingjf Dec 21, 2023
caec0b5
Intro vignette formatting
SkylarMarvel Jan 3, 2024
1281d34
Update introduction.Rmd
davidmreif Jan 4, 2024
8ef9d64
Update introduction.Rmd
davidmreif Jan 5, 2024
0bc04ea
New introductory figure
davidmreif Jan 5, 2024
211e05a
Updated version to 1.3
SkylarMarvel Jan 5, 2024
252b1fe
Merge branch 'dev' into ggplot
SkylarMarvel Jan 5, 2024
68b9323
Merge pull request #16 from ToxPi/ggplot
SkylarMarvel Jan 5, 2024
c213352
Patched coord_munch update
SkylarMarvel May 9, 2024
2415291
Make coord_munch update compatible with older versions of ggplot2
SkylarMarvel May 10, 2024
a3882a4
added testing for new missingness and plot code
flemingjf Jul 23, 2024
096fbf0
added extra testing and vignette comments
flemingjf Jul 23, 2024
1ead8ca
Swapped to svg rendering to remove blurriness, removed pdf comparison…
flemingjf Jul 24, 2024
9c5e7e5
Updated README to contain updated steps for installing/building package
flemingjf Jul 29, 2024
706ae1b
reverted to png and set fig.retina parameter to improve plot resolution
flemingjf Jul 30, 2024
b7193b3
Update README.md
davidmreif Aug 2, 2024
26bbf15
Update README.md
Aug 2, 2024
362288e
updated pkgdown workflow to V2 to replace deprecated version
flemingjf Aug 2, 2024
12cd2d3
updated all files for V2 setup
flemingjf Aug 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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