-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from rpact-com/dev/4.1.1
Dev/4.1.1
- Loading branch information
Showing
96 changed files
with
992 additions
and
64,773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,12 @@ jobs: | |
config: ${{ github.event.inputs.config }} | ||
id: rhub-setup | ||
|
||
# Set the GitHub username and email for commits | ||
- name: Set GitHub user | ||
run: | | ||
git config --global user.name "RPACT GitHub Action RHub" | ||
git config --global user.email "[email protected]" | ||
linux-containers: | ||
needs: setup | ||
if: ${{ needs.setup.outputs.containers != '[]' }} | ||
|
@@ -51,7 +57,17 @@ jobs: | |
image: ${{ matrix.config.container }} | ||
|
||
steps: | ||
- uses: r-hub/actions/checkout@v1 | ||
- name: Checkout this package repository | ||
uses: r-hub/actions/checkout@v1 | ||
- name: Checkout the private tests repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'rpact-com/rpact.tests' | ||
ref: main | ||
token: ${{ secrets.RPACT_TESTS_ACCESS_TOKEN }} | ||
path: 'private-tests' | ||
sparse-checkout: | | ||
tests | ||
- uses: r-hub/actions/platform-info@v1 | ||
with: | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
|
@@ -60,6 +76,11 @@ jobs: | |
with: | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
job-config: ${{ matrix.config.job-config }} | ||
- name: Add private tests | ||
run: | | ||
find ./private-tests/tests -maxdepth 1 -name \*.R -exec cp {} ./tests \; | ||
find ./private-tests/tests/testthat -maxdepth 1 -name \*.R -exec cp {} ./tests/testthat \; | ||
shell: bash | ||
- uses: r-hub/actions/run-check@v1 | ||
with: | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
|
@@ -76,7 +97,17 @@ jobs: | |
config: ${{ fromJson(needs.setup.outputs.platforms) }} | ||
|
||
steps: | ||
- uses: r-hub/actions/checkout@v1 | ||
- name: Checkout this package repository | ||
uses: r-hub/actions/checkout@v1 | ||
- name: Checkout the private tests repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'rpact-com/rpact.tests' | ||
ref: main | ||
token: ${{ secrets.RPACT_TESTS_ACCESS_TOKEN }} | ||
path: 'private-tests' | ||
sparse-checkout: | | ||
tests | ||
- uses: r-hub/actions/setup-r@v1 | ||
with: | ||
job-config: ${{ matrix.config.job-config }} | ||
|
@@ -89,6 +120,11 @@ jobs: | |
with: | ||
job-config: ${{ matrix.config.job-config }} | ||
token: ${{ secrets.RHUB_TOKEN }} | ||
- name: Add private tests | ||
run: | | ||
find ./private-tests/tests -maxdepth 1 -name \*.R -exec cp {} ./tests \; | ||
find ./private-tests/tests/testthat -maxdepth 1 -name \*.R -exec cp {} ./tests/testthat \; | ||
shell: bash | ||
- uses: r-hub/actions/run-check@v1 | ||
with: | ||
job-config: ${{ matrix.config.job-config }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
# 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] | ||
branches: | ||
- main | ||
pull_request: | ||
branches: [main, master] | ||
branches: | ||
- main | ||
- 'dev/*' | ||
workflow_dispatch: | ||
|
||
name: test-coverage | ||
|
@@ -16,17 +20,40 @@ jobs: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
# Set the GitHub username and email for commits | ||
- name: Set GitHub user | ||
run: | | ||
git config --global user.name "RPACT GitHub Action CovR" | ||
git config --global user.email "[email protected]" | ||
- name: Checkout this package repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout the private tests repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'rpact-com/rpact.tests' | ||
ref: main | ||
token: ${{ secrets.RPACT_TESTS_ACCESS_TOKEN }} | ||
path: 'private-tests' | ||
sparse-checkout: | | ||
tests | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::covr | ||
extra-packages: any::covr, any::xml2 | ||
needs: coverage | ||
|
||
- name: Add private tests | ||
run: | | ||
find ./private-tests/tests -maxdepth 1 -name \*.R -exec cp {} ./tests \; | ||
find ./private-tests/tests/testthat -maxdepth 1 -name \*.R -exec cp {} ./tests/testthat \; | ||
shell: bash | ||
|
||
- name: Test coverage | ||
run: | | ||
Sys.setenv("RPACT_COMPLETE_UNIT_TEST_SET_ENABLED" = TRUE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ | |
## | | ||
## | Contact us for information about our services: [email protected] | ||
## | | ||
## | File version: $Revision: 8180 $ | ||
## | Last changed: $Date: 2024-09-06 10:13:14 +0200 (Fr, 06 Sep 2024) $ | ||
## | File version: $Revision: 8360 $ | ||
## | Last changed: $Date: 2024-11-04 15:40:23 +0100 (Mo, 04 Nov 2024) $ | ||
## | Last changed by: $Author: pahlke $ | ||
## | | ||
|
||
|
@@ -1942,9 +1942,22 @@ plot.AnalysisResults <- function(x, y, ..., | |
return(.createPlotResultObject(plotList, grid)) | ||
} | ||
|
||
.plotAnalysisResultsRCI <- function(..., | ||
x, y, nPlanned, allocationRatioPlanned, main, xlab, ylab, | ||
legendTitle, palette, legendPosition, showSource, analysisResultsName, plotSettings = NULL) { | ||
.plotAnalysisResultsRCI <- function( | ||
..., | ||
x, | ||
y, | ||
nPlanned, | ||
allocationRatioPlanned, | ||
main, | ||
xlab, | ||
ylab, | ||
legendTitle, | ||
palette, | ||
legendPosition, | ||
showSource, | ||
analysisResultsName, | ||
plotSettings = NULL) { | ||
|
||
.assertIsAnalysisResults(x) | ||
.warnInCaseOfUnknownArguments(functionName = "plot", ignore = c("treatmentArms", "populations"), ...) | ||
|
||
|
@@ -2103,10 +2116,24 @@ plot.AnalysisResults <- function(x, y, ..., | |
return(result) | ||
} | ||
|
||
.plotAnalysisResults <- function(..., | ||
x, y, type, nPlanned, allocationRatioPlanned, main, xlab, ylab, | ||
legendTitle, palette, legendPosition, showSource, functionCall, | ||
analysisResultsName, plotSettings = NULL) { | ||
.plotAnalysisResults <- function( | ||
..., | ||
x, | ||
y, | ||
type, | ||
nPlanned, | ||
allocationRatioPlanned, | ||
main, | ||
xlab, | ||
ylab, | ||
legendTitle, | ||
palette, | ||
legendPosition, | ||
showSource, | ||
functionCall, | ||
analysisResultsName, | ||
plotSettings = NULL) { | ||
|
||
.assertIsSingleInteger(type, "type", naAllowed = FALSE, validateType = FALSE) | ||
if (!(type %in% c(1, 2))) { | ||
stop(C_EXCEPTION_TYPE_ILLEGAL_ARGUMENT, "'type' (", type, ") is not allowed; must be 1 or 2") | ||
|
@@ -2117,12 +2144,20 @@ plot.AnalysisResults <- function(x, y, ..., | |
|
||
if (type == 2) { | ||
return(.plotAnalysisResultsRCI( | ||
x = x, y = y, nPlanned = nPlanned, allocationRatioPlanned = allocationRatioPlanned, | ||
main = main, xlab = xlab, ylab = ylab, | ||
legendTitle = legendTitle, palette = palette, | ||
legendPosition = legendPosition, showSource = showSource, | ||
x = x, | ||
y = y, | ||
nPlanned = nPlanned, | ||
allocationRatioPlanned = allocationRatioPlanned, | ||
main = main, | ||
xlab = xlab, | ||
ylab = ylab, | ||
legendTitle = legendTitle, | ||
palette = palette, | ||
legendPosition = legendPosition, | ||
showSource = showSource, | ||
analysisResultsName = analysisResultsName, | ||
plotSettings = plotSettings, ... | ||
plotSettings = plotSettings, | ||
... | ||
)) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.