Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchard committed Oct 30, 2023
2 parents 2b8eb20 + 6141974 commit 4d89788
Show file tree
Hide file tree
Showing 46 changed files with 838 additions and 189 deletions.
95 changes: 39 additions & 56 deletions .github/workflows/R_CMD_check_Hades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'} # Does not appear to have Java 32-bit, hence the --no-multiarch
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
# - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
CDM5_ORACLE_CDM_SCHEMA: ${{ secrets.CDM5_ORACLE_CDM_SCHEMA }}
Expand All @@ -43,75 +43,51 @@ jobs:
CDM5_SQL_SERVER_PASSWORD: ${{ secrets.CDM5_SQL_SERVER_PASSWORD }}
CDM5_SQL_SERVER_SERVER: ${{ secrets.CDM5_SQL_SERVER_SERVER }}
CDM5_SQL_SERVER_USER: ${{ secrets.CDM5_SQL_SERVER_USER }}
CDM5_REDSHIFT_CDM_SCHEMA: ${{ secrets.CDM5_REDSHIFT_CDM_SCHEMA }}
CDM5_REDSHIFT_OHDSI_SCHEMA: ${{ secrets.CDM5_REDSHIFT_OHDSI_SCHEMA }}
CDM5_REDSHIFT_PASSWORD: ${{ secrets.CDM5_REDSHIFT_PASSWORD }}
CDM5_REDSHIFT_SERVER: ${{ secrets.CDM5_REDSHIFT_SERVER }}
CDM5_REDSHIFT_USER: ${{ secrets.CDM5_REDSHIFT_USER }}
CDM5_SPARK_USER: ${{ secrets.CDM5_SPARK_USER }}
CDM5_SPARK_PASSWORD: ${{ secrets.CDM5_SPARK_PASSWORD }}
CDM5_SPARK_CONNECTION_STRING: ${{ secrets.CDM5_SPARK_CONNECTION_STRING }}
WEBAPI_TEST_WEBAPI_URL: ${{ secrets.WEBAPI_TEST_WEBAPI_URL }}
WEBAPI_TEST_SECURE_WEBAPI_URL: ${{ secrets.WEBAPI_TEST_SECURE_WEBAPI_URL }}
WEBAPI_TEST_ADMIN_USER_NAME: ${{ secrets.WEBAPI_TEST_ADMIN_USER_NAME }}
WEBAPI_TEST_ADMIN_USER_PASSWORD: ${{ secrets.WEBAPI_TEST_ADMIN_USER_PASSWORD }}

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

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

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

- uses: r-lib/actions/setup-pandoc@v1
- 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'
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
- name: Install system requirements
if: runner.os == 'Linux'
run: |
sudo apt-get install -y libssh-dev
Rscript -e 'install.packages("remotes")'
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
- name: Install libssh
if: runner.os == 'Linux'
run: |
sudo apt-get install libssh-dev
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE, INSTALL_opts=c("--no-multiarch"))
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Install covr
if: runner.os == 'macOS'
run: |
remotes::install_cran("covr")
shell: Rscript {0}

- name: Remove check folder if exists
if: runner.os == 'macOS'
run: unlink("check", recursive = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--no-multiarch"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- name: Upload check results
if: failure()
uses: actions/upload-artifact@v2
- 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")'
build_args: 'c("--compact-vignettes=both")'
error-on: '"warning"'
check-dir: '"check"'

- name: Upload source package
if: success() && runner.os == 'macOS' && github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
Expand All @@ -120,6 +96,12 @@ jobs:
name: package_tarball
path: check/*.tar.gz

- name: Install covr
if: runner.os == 'macOS'
run: |
install.packages("covr")
shell: Rscript {0}

- name: Test coverage
if: runner.os == 'macOS'
run: covr::codecov()
Expand All @@ -137,7 +119,7 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -163,7 +145,7 @@ jobs:
draft: false
prerelease: false

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
if: ${{ env.new_version != '' }}

- name: Install drat
Expand Down Expand Up @@ -192,3 +174,4 @@ jobs:
if: ${{ env.new_version != '' }}
run: |
curl --data "build=true" -X POST https://registry.hub.docker.com/u/ohdsi/broadsea-methodslibrary/trigger/f0b51cec-4027-4781-9383-4b38b42dd4f5/
4 changes: 2 additions & 2 deletions Cyclops.Rproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
Expand Down
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Cyclops
Type: Package
Title: Cyclic Coordinate Descent for Logistic, Poisson and Survival Analysis
Version: 3.3.1
Version: 3.3.1.999
Authors@R: c(
person("Marc A.", "Suchard", email = "[email protected]", role = c("aut","cre")),
person("Martijn J.", "Schuemie", role = "aut"),
Expand Down Expand Up @@ -30,7 +30,7 @@ Biarch: true
URL: https://github.com/ohdsi/cyclops
BugReports: https://github.com/ohdsi/cyclops/issues
Depends:
R (>= 3.1.0)
R (>= 3.5.0)
Imports:
rlang,
Matrix,
Expand All @@ -41,7 +41,6 @@ Imports:
survival,
bit64
LinkingTo: Rcpp,
BH (>= 1.51.0),
RcppEigen (>= 0.3.2)
Suggests:
testthat,
Expand Down
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ S3method(survfit,cyclopsFit)
S3method(vcov,cyclopsFit)
export(Multitype)
export(convertToCyclopsData)
export(convertToTimeVaryingCoef)
export(coverage)
export(createAutoGridCrossValidationControl)
export(createControl)
export(createCyclopsData)
export(createNonSeparablePrior)
export(createParameterizedPrior)
export(createPrior)
export(createWeightBasedSearchControl)
export(finalizeSqlCyclopsData)
export(fitCyclopsModel)
export(fitCyclopsSimulation)
Expand All @@ -39,6 +41,7 @@ export(meanLinearPredictor)
export(mse)
export(readCyclopsData)
export(simulateCyclopsData)
export(splitTime)
import(Matrix)
import(Rcpp)
import(dplyr)
Expand Down Expand Up @@ -71,5 +74,6 @@ importFrom(stats,terms)
importFrom(stats,time)
importFrom(stats,vcov)
importFrom(survival,Surv)
importFrom(survival,survSplit)
importFrom(survival,survfit)
useDynLib(Cyclops, .registration = TRUE)
27 changes: 23 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
Cyclops v3.4.0
==============

Changes:

1. remove dependence on `BH`
2. improvements on adaptive likelihood profiling
3. add `auto` option to `cvRepetitions`
4. bumped explicit C++11 requirement up to R v4.1
5. removed deprecated use of `dbplyr:::$.tbl_lazy`
a. breaking change in `dbplyr v2.4.0`

Cyclops v3.3.1
==============

Changes:

1. fix uninitialized value in detected in computeAsymptoticPrecisionMatrix(); value was priorType
2. fix memory leak caused by call to ::Rf_error()
1. fix uninitialized value in detected in `computeAsymptoticPrecisionMatrix()`; value was priorType
2. fix memory leak caused by call to `::Rf_error()`
3. fix line-endings on Makevar on windows

Cyclops v3.3.0
==============

Changes:

1. bump for R 4.2
2. fix CRAN warnings
a. used `minValues`
3. fix CRAN notes
a. remove explicit dependence on C++11 (except for R <= 4.0)

Cyclops v3.2.1
==============

Changes:

1. fix small memory leak caused by direct call to '::Rf_error()'
2. disable JVM calls on CRAN due to uninitialized memory in Java JVM


Cyclops v3.2.0
==============

Expand Down
6 changes: 6 additions & 0 deletions R/Cyclops-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
## usethis namespace: end
NULL
4 changes: 2 additions & 2 deletions R/DataManagement.R
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ reduce <- function(object, covariates, groupBy, power = 1) {
#' \code{appendSqlCyclopsData} appends data to an OHDSI data object.
#'
#' @details Append data using two tables. The outcomes table is dense and contains ... The covariates table is sparse and contains ...
#' All entries in the outcome table must be sorted in increasing order by {oStratumId, oRowId}. All entries in the covariate table
#' must be sorted in increasing order by {cRowId}. Each cRowId value must match exactly one oRowId value.
#' All entries in the outcome table must be sorted in increasing order by (oStratumId, oRowId). All entries in the covariate table
#' must be sorted in increasing order by (cRowId). Each cRowId value must match exactly one oRowId value.
#'
#' @param object OHDSI Cyclops data object to append entries
#' @param oStratumId Integer vector (optional): non-unique stratum identifier for each row in outcomes table
Expand Down
Loading

0 comments on commit 4d89788

Please sign in to comment.