Skip to content

Commit 57e8479

Browse files
Jonathon-FlemingdaynefilerSkylarMarveldavidmreifflemingjf
authored
Updated version to 1.3 (#18)
* 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]>
1 parent bc1ba41 commit 57e8479

29 files changed

+1084
-298
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
55
branches: [main, master]
66
pull_request:
77
branches: [main, master]
88

9-
name: R-CMD-check
9+
name: R-CMD-check.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214
R-CMD-check:
@@ -18,7 +20,7 @@ jobs:
1820
fail-fast: false
1921
matrix:
2022
config:
21-
- {os: macOS-latest, r: 'release'}
23+
- {os: macos-latest, r: 'release'}
2224
- {os: windows-latest, r: 'release'}
2325
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
2426
- {os: ubuntu-latest, r: 'release'}
@@ -29,18 +31,22 @@ jobs:
2931
R_KEEP_PKG_SOURCE: yes
3032

3133
steps:
32-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v4
3335

34-
- uses: r-lib/actions/setup-pandoc@v1
36+
- uses: r-lib/actions/setup-pandoc@v2
3537

36-
- uses: r-lib/actions/setup-r@v1
38+
- uses: r-lib/actions/setup-r@v2
3739
with:
3840
r-version: ${{ matrix.config.r }}
3941
http-user-agent: ${{ matrix.config.http-user-agent }}
4042
use-public-rspm: true
4143

42-
- uses: r-lib/actions/setup-r-dependencies@v1
44+
- uses: r-lib/actions/setup-r-dependencies@v2
4345
with:
44-
extra-packages: rcmdcheck
46+
extra-packages: any::rcmdcheck
47+
needs: check
4548

46-
- uses: r-lib/actions/check-r-package@v1
49+
- uses: r-lib/actions/check-r-package@v2
50+
with:
51+
upload-snapshots: true
52+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,50 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
55
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
68
release:
79
types: [published]
810
workflow_dispatch:
911

10-
name: pkgdown
12+
name: pkgdown.yaml
13+
14+
permissions: read-all
1115

1216
jobs:
1317
pkgdown:
1418
runs-on: ubuntu-latest
19+
# Only restrict concurrency for non-PR jobs
20+
concurrency:
21+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
1522
env:
1623
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24+
permissions:
25+
contents: write
1726
steps:
18-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v4
1928

20-
- uses: r-lib/actions/setup-pandoc@v1
29+
- uses: r-lib/actions/setup-pandoc@v2
2130

22-
- uses: r-lib/actions/setup-r@v1
31+
- uses: r-lib/actions/setup-r@v2
2332
with:
2433
use-public-rspm: true
2534

26-
- uses: r-lib/actions/setup-r-dependencies@v1
35+
- uses: r-lib/actions/setup-r-dependencies@v2
2736
with:
28-
extra-packages: pkgdown
37+
extra-packages: any::pkgdown, local::.
2938
needs: website
3039

31-
- name: Deploy package
32-
run: |
33-
git config --local user.name "$GITHUB_ACTOR"
34-
git config --local user.email "[email protected]"
35-
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
40+
- name: Build site
41+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
42+
shell: Rscript {0}
43+
44+
- name: Deploy to GitHub pages 🚀
45+
if: github.event_name != 'pull_request'
46+
uses: JamesIves/[email protected]
47+
with:
48+
clean: false
49+
branch: gh-pages
50+
folder: docs

.github/workflows/test-coverage.yaml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
55
branches: [main, master]
66
pull_request:
77
branches: [main, master]
88

9-
name: test-coverage
9+
name: test-coverage.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214
test-coverage:
@@ -15,16 +17,45 @@ jobs:
1517
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1618

1719
steps:
18-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
1921

20-
- uses: r-lib/actions/setup-r@v1
22+
- uses: r-lib/actions/setup-r@v2
2123
with:
2224
use-public-rspm: true
2325

24-
- uses: r-lib/actions/setup-r-dependencies@v1
26+
- uses: r-lib/actions/setup-r-dependencies@v2
2527
with:
26-
extra-packages: covr
28+
extra-packages: any::covr, any::xml2
29+
needs: coverage
2730

2831
- name: Test coverage
29-
run: covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")
32+
run: |
33+
cov <- covr::package_coverage(
34+
quiet = FALSE,
35+
clean = FALSE,
36+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
37+
)
38+
covr::to_cobertura(cov)
3039
shell: Rscript {0}
40+
41+
- uses: codecov/codecov-action@v4
42+
with:
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44+
file: ./cobertura.xml
45+
plugin: noop
46+
disable_search: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
49+
- name: Show testthat output
50+
if: always()
51+
run: |
52+
## --------------------------------------------------------------------
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
54+
shell: bash
55+
56+
- name: Upload test results
57+
if: failure()
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: coverage-test-failures
61+
path: ${{ runner.temp }}/package

DESCRIPTION

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: toxpiR
22
Type: Package
33
Title: Create ToxPi Prioritization Models
4-
Version: 1.2.1
4+
Version: 1.3.0
55
Authors@R:
66
c(person("Dayne L", "Filer",
77
role = c("aut", "cre", "fnd"),
@@ -14,6 +14,8 @@ Authors@R:
1414
comment = c(ORCID = "0000-0001-5447-0129")),
1515
person("Skylar W", "Marvel",
1616
role = "aut"),
17+
person("Jonathon", "Fleming",
18+
role = "aut"),
1719
person("Alison A", "Motsinger-Reif",
1820
role = c("fnd"),
1921
comment = c(ORCID = "0000-0003-1346-2493")),
@@ -41,10 +43,11 @@ Imports:
4143
BiocGenerics,
4244
pryr,
4345
tidyr,
44-
utils
46+
utils,
47+
ggplot2
4548
Encoding: UTF-8
4649
LazyData: true
47-
RoxygenNote: 7.1.2
50+
RoxygenNote: 7.2.3
4851
Roxygen: list(markdown = TRUE)
4952
Depends:
5053
R (>= 4.0)

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ exportMethods(plot)
4444
exportMethods(sort)
4545
exportMethods(txpCalculateScores)
4646
exportMethods(txpIDs)
47+
exportMethods(txpMissing)
4748
exportMethods(txpModel)
4849
exportMethods(txpRanks)
4950
exportMethods(txpResultParam)
@@ -53,6 +54,7 @@ exportMethods(txpSlices)
5354
exportMethods(txpTransFuncs)
5455
exportMethods(txpValueNames)
5556
exportMethods(txpWeights)
57+
import(ggplot2)
5658
import(grid)
5759
import(methods)
5860
importClassesFrom(S4Vectors,List)

R/allClasses.R

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ setClassUnion("TxpTransFunc_OR_NULL", members = c("TxpTransFunc", "NULL"))
3333
#' @rdname TxpTransFuncList-class
3434
#' @exportClass TxpTransFuncList
3535

36-
setClass("TxpTransFuncList",
37-
contains = "SimpleList",
36+
setClass("TxpTransFuncList",
37+
contains = "SimpleList",
3838
prototype = prototype(elementType = "TxpTransFunc_OR_NULL"))
3939

4040
##----------------------------------------------------------------------------##
@@ -43,7 +43,7 @@ setClass("TxpTransFuncList",
4343
#' @rdname TxpSlice-class
4444
#' @exportClass TxpSlice
4545

46-
setClass("TxpSlice",
46+
setClass("TxpSlice",
4747
slots = c(txpValueNames = "character",
4848
txpTransFuncs = "TxpTransFuncList"))
4949

@@ -66,8 +66,8 @@ setClass("TxpSliceList",
6666
#' @rdname TxpModel-class
6767
#' @exportClass TxpModel
6868

69-
setClass("TxpModel",
70-
slots = c(txpSlices = "TxpSliceList",
69+
setClass("TxpModel",
70+
slots = c(txpSlices = "TxpSliceList",
7171
txpWeights = "numeric",
7272
txpTransFuncs = "TxpTransFuncList"))
7373

@@ -90,8 +90,8 @@ setClass("TxpModelList",
9090
#' @name TxpResultParam-class
9191
#' @exportClass TxpResultParam
9292

93-
setClass("TxpResultParam",
94-
slots = c(rank.ties.method = "character",
93+
setClass("TxpResultParam",
94+
slots = c(rank.ties.method = "character",
9595
negative.value.handling = "character"))
9696

9797
##----------------------------------------------------------------------------##
@@ -100,10 +100,11 @@ setClass("TxpResultParam",
100100
#' @name TxpResult-class
101101
#' @exportClass TxpResult
102102

103-
setClass("TxpResult",
104-
slots = c(txpScores = "numeric",
103+
setClass("TxpResult",
104+
slots = c(txpScores = "numeric",
105105
txpSliceScores = "matrix",
106106
txpRanks = "numeric",
107+
txpMissing = "numeric",
107108
txpModel = "TxpModel",
108109
txpIDs = "character_OR_NULL",
109110
txpResultParam = "TxpResultParam"))

R/allGenerics.R

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
#' @name txpGenerics
77
#' @title toxpiR package generics
8-
#' @description toxpiR package generics; see class man pages for associated
8+
#' @description toxpiR package generics; see class man pages for associated
99
#' methods
1010
#' @param x toxpiR S4 object
1111
#' @param value Replacement value
1212
#' @param ... Included for extendability; not currently used
13-
#'
13+
#'
1414
#' @return See specific methods for details.
1515

1616
NULL
@@ -19,32 +19,32 @@ NULL
1919
setGeneric("txpValueNames", function(x, ...) standardGeneric("txpValueNames"))
2020

2121
#' @rdname txpGenerics
22-
setGeneric("txpValueNames<-",
22+
setGeneric("txpValueNames<-",
2323
function(x, ..., value) standardGeneric("txpValueNames<-"))
2424

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

2828
#' @rdname txpGenerics
29-
setGeneric("txpTransFuncs<-",
29+
setGeneric("txpTransFuncs<-",
3030
function(x, ..., value) standardGeneric("txpTransFuncs<-"))
3131

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

3535
#' @rdname txpGenerics
36-
setGeneric("txpSlices<-",
36+
setGeneric("txpSlices<-",
3737
function(x, ..., value) standardGeneric("txpSlices<-"))
3838

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

4242
#' @rdname txpGenerics
43-
setGeneric("txpWeights<-",
43+
setGeneric("txpWeights<-",
4444
function(x, ..., value) standardGeneric("txpWeights<-"))
4545

4646
#' @rdname txpCalculateScores
47-
setGeneric("txpCalculateScores",
47+
setGeneric("txpCalculateScores",
4848
function(model, input, ...) standardGeneric("txpCalculateScores"))
4949

5050
#' @rdname txpGenerics
@@ -65,5 +65,8 @@ setGeneric("txpIDs<-", function(x, ..., value) standardGeneric("txpIDs<-"))
6565
#' @rdname txpGenerics
6666
setGeneric("txpRanks", function(x, ...) standardGeneric("txpRanks"))
6767

68+
#' @rdname txpGenerics
69+
setGeneric("txpMissing", function(x, ...) standardGeneric("txpMissing"))
70+
6871
#' @rdname txpGenerics
6972
setGeneric("txpResultParam", function(x, ...) standardGeneric("txpResultParam"))

0 commit comments

Comments
 (0)