Skip to content

Commit

Permalink
Test ci. (#4)
Browse files Browse the repository at this point in the history
* Test ci.

* Add qpdf.

* Try message=False

* Set env variables above.

* global message=F, warning=F

* Try conda

* add environment.yml.

* Add some dependencies.

* Add r-knitr to env.yaml.

* install knitr manually.

* Add r-covr and r-units to env.yaml.

* Test R location

* execute command in shell

* Execute steps in shell

* Add pdflatex to environment

* check pdflatex

* add texlive env

* move

* don't check for pdflatex

* Add texlive to env

* Remove texlive action

* Update env

* Upd env

* Add tinytex install

* force tiny tex

* Update env and install demos

* Fix typo

* No need to make docs

* Add codetools to env

* Suppress manual check

* add qpdf

* Add picdb data-env doclines

* Don't check doc size

* run roxygen

* Add qpdf

* Add env var

* Add env var to check step

* Edit

* Change to r-qpdf

* Add qpdf

* remove force

* remove env var

* grep exclude pdf size warning

* don't cache conda env

* Add caching back

* ch sh

* Revert

* Delete coverage.yaml, pkgdown.yaml

* Add comment to check.yaml, only run this on ubuntu.

* cleanup environment.yamls.

* cleanup environment.yamls 2.

* mimic-demo is on conda-forge.

* yaml -> yml.

* r-mimic-demo -> r-mimic.demo

---------

Co-authored-by: Manuel Burger <[email protected]>
  • Loading branch information
mlondschien and manuelburger authored Mar 27, 2024
1 parent 887f22b commit 00424ee
Show file tree
Hide file tree
Showing 16 changed files with 280 additions and 203 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,55 @@ on:
branches:
- main

name: check

jobs:
check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
R-CMD-check:
name: R CMD check (${{ matrix.os }})
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
os: ['ubuntu-latest']

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-tinytex@v2
- run: tlmgr --version

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

- 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@v2
- uses: actions/checkout@v4
- name: Set up Conda env
uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d
with:
extra-packages: |
any::rcmdcheck
eth-mds/mimic-demo
eth-mds/eicu-demo
nbenn/mockthat
- uses: r-lib/actions/check-r-package@v2
cache-env: true
- name: Install TinyTex
shell: bash -l {0}
run: |
Rscript -e 'tinytex::install_tinytex()'
- name: Install demo datasets
shell: bash -l {0}
run: |
Rscript -e 'install.packages("eicu.demo", repos="https://eth-mds.github.io/physionet-demo")'
- name: Run R CMD check
shell: bash -l {0}
run: |
R CMD build . && R CMD check --no-manual --as-cran $(ls -t . | head -n1)
env:
_R_CHECK_CRAN_INCOMING_: false
_R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_DOC_SIZES_: false
with:
upload-snapshots: true
# R CMD check raises a warning by qpdf that the generated docs PDF is large and
# should be compressed. Currently we ignore this warning via the grep below.
- name: Check for warnings
shell: bash -l {0}
run: |
CHECK_LOG_FILE=ricu.Rcheck/00check.log
CHECK_INSTALL_FILE=ricu.Rcheck/00install.out
if ! [[ -f "$CHECK_LOG_FILE" ]]; then
echo "Log-file not found."
exit 1
fi
if cat $CHECK_LOG_FILE | grep -q "ERROR"; then
cat $CHECK_INSTALL_FILE
cat $CHECK_LOG_FILE
exit 1
fi
if cat $CHECK_LOG_FILE | grep -q "WARNING" | grep -q -v -e "checking sizes of PDF files under ‘inst/doc’ ... WARNING"; then
echo "Found warnings, treated as errors."
cat $CHECK_LOG_FILE
exit 1
fi
36 changes: 0 additions & 36 deletions .github/workflows/coverage.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/pkgdown.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Suggests:
pdftools,
magick,
pillar
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Additional_repositories: https://eth-mds.github.io/physionet-demo
VignetteBuilder: knitr
Config/testthat/edition: 3
7 changes: 7 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,14 @@ S3method(do_callback,fun_itm)
S3method(do_callback,hrd_itm)
S3method(do_callback,itm)
S3method(do_callback,rec_cncpt)
S3method(do_callback,sic_itm)
S3method(do_itm_load,col_itm)
S3method(do_itm_load,default)
S3method(do_itm_load,fun_itm)
S3method(do_itm_load,hrd_itm)
S3method(do_itm_load,itm)
S3method(do_itm_load,nul_itm)
S3method(do_itm_load,sic_itm)
S3method(downgrade_id,default)
S3method(downgrade_id,id_tbl)
S3method(downgrade_id,ts_tbl)
Expand Down Expand Up @@ -126,6 +128,7 @@ S3method(id_map_helper,default)
S3method(id_map_helper,src_env)
S3method(id_orig_helper,default)
S3method(id_orig_helper,miiv_env)
S3method(id_orig_helper,sic_env)
S3method(id_orig_helper,src_env)
S3method(id_vars,col_cfg)
S3method(id_vars,default)
Expand All @@ -139,6 +142,7 @@ S3method(id_win_helper,eicu_env)
S3method(id_win_helper,hirid_env)
S3method(id_win_helper,miiv_env)
S3method(id_win_helper,mimic_env)
S3method(id_win_helper,picdb_env)
S3method(id_win_helper,sic_env)
S3method(import_src,aumc_cfg)
S3method(import_src,character)
Expand All @@ -164,6 +168,7 @@ S3method(init_itm,hrd_itm)
S3method(init_itm,itm)
S3method(init_itm,rgx_itm)
S3method(init_itm,sel_itm)
S3method(init_itm,sic_itm)
S3method(interval,default)
S3method(interval,difftime)
S3method(interval,itm)
Expand All @@ -188,6 +193,7 @@ S3method(load_difftime,eicu_tbl)
S3method(load_difftime,hirid_tbl)
S3method(load_difftime,miiv_tbl)
S3method(load_difftime,mimic_tbl)
S3method(load_difftime,picdb_tbl)
S3method(load_difftime,sic_tbl)
S3method(load_id,character)
S3method(load_id,default)
Expand Down Expand Up @@ -232,6 +238,7 @@ S3method(prepare_query,default)
S3method(prepare_query,hrd_itm)
S3method(prepare_query,rgx_itm)
S3method(prepare_query,sel_itm)
S3method(prepare_query,sic_itm)
S3method(print,cncpt)
S3method(print,id_tbl)
S3method(print,itm)
Expand Down
4 changes: 4 additions & 0 deletions R/data-env.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ NULL
#' @rdname data_env
NULL

#' @name picdb
#' @rdname data_env
NULL

data_env <- function() get("data", envir = pkg_env(), mode = "environment")

#' Data source environments
Expand Down
21 changes: 0 additions & 21 deletions environment.yaml

This file was deleted.

14 changes: 11 additions & 3 deletions test_environment.yaml → environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ricu-test
name: ricu
channels:
- nodefaults
- conda-forge
Expand All @@ -18,7 +18,6 @@ dependencies:
- r-cli>=2.1.0
- r-fansi
- r-openssl
- r-units
# optional
- r-rticles
- r-forestmodel
Expand All @@ -29,4 +28,13 @@ dependencies:
- r-cowplot
- r-knitr
- r-pdftools
- r-covr
- r-covr
- r-units
- r-tinytex
- r-testthat
- r-mockthat
- r-pkgload
- r-codetools
- r-qpdf
- qpdf
- r-mimic.demo
Loading

0 comments on commit 00424ee

Please sign in to comment.