adibender / pammtools

Piece-wise exponential Additive Mixed Modeling tools
https://adibender.github.io/pammtools/
Other
47 stars 11 forks source link

Add GitHub actions for checks, pkgdown & codecov #197

Closed jemus42 closed 3 years ago

jemus42 commented 3 years ago

In theory, this PR supersedes existing Travis CI and Appveyor setup.

It adds 3 GitHub Actions workflows (see .github/workflows), which

All workflows are based on (or unmodified copies of) the example actions available at r-lib/actions/examples

Notably, this PR also adds various packages required for the vignettes to the Suggests: field in DESCRIPTION, which seems to helps with dependency discovery in the workflows.

The recurrent-events vignette was added to the article index in _pkgdown.yml to avoid pkgdown warnings. This may be undesirable, depending on the vignette's status.
In addition, the following pkgdown notes were not adressed:

Topics missing from index: 
* add_tdc
* as.data.frame.crps
* daily
* extub_event
* geom_hazard
* geom_stepribbon
* get_intervals
* get_plotinfo
* get_terms
* pammtools
* patient
* predictSurvProb.pamm
* simdf_elra
* staph 
adibender commented 3 years ago

Thx, looks good šŸ‘šŸ» Is the modification of the Suggests: necessary? Currently I omit the vignettes from the official package on purpose (i.e. it's in .buildignore), because it would make package checks etc. on CRAN more tedious and increases the amount of dependencies. Is it possible to keep it that way?

fabian-s commented 3 years ago

Thx, looks good šŸ‘šŸ» Is the modification of the Suggests: necessary? Currently I omit the vignettes from the official package on purpose (i.e. it's in .buildignore), because it would make package checks etc. on CRAN more tedious and increases the amount of dependencies. Is it possible to keep it that way?

could pre-compute the vignettes: https://ropensci.org/blog/2019/12/08/precompute-vignettes/ and add GH action for recompiling them, e.g by running something like this: https://github.com/ropensci/eia/blob/master/vignettes/precompile.R

jemus42 commented 3 years ago

I added the packages to Suggests: on a hunch because manual dependency installation in the pkgdown workflow might have been related to an Rmd issue I couldn't quite reproduce locally, I can try without the changes to Suggests: again to see if I can make it work.

I'll take a look at precompilation, that might be the least intrusive option.

jemus42 commented 3 years ago

Welp, looks like it works just as well without the changes to Suggests: with the vignette dependencies installed ad-hoc in the pkgdown workflow.

Future vignette dependencies will need to be added to .github/workflows/pkgdown.yaml.

adibender commented 3 years ago

Welp, looks like it works just as well without the changes to Suggests: with the vignette dependencies installed ad-hoc in the pkgdown workflow.

This is good, isn't it?

jemus42 commented 3 years ago

This is good, isn't it?

I guess so? It means no DESCRIPTION changes, no extra CRAN-dependencies for the vignettes, and the .Rbuildignore'd vignettes remain .Rbuildignore'd while still being rendered/deployed via GH Actions.

Unless I missed something, this should achieve the goal of "replace travis & appveyor at no extra cost" šŸ¤”

adibender commented 3 years ago

perfect, thx!