Skip to content

Commit

Permalink
Release v0.5.0 (#90)
Browse files Browse the repository at this point in the history
This is the initial release to CRAN.

* Use hypergeometric functions from RcppGSL (#21)
* Consistent naming of R code files (#39)
* Remove validity methods (#40)
* Fix large batch of CRAN checks for first release (#44)
* Default implementations of all clv.model methods stop() (#45)
* CI setup (#52)
* Remove single use generics (#53)
* Bugfix: Fail CI if tests fail (#55)
* Bugfix: lubridate definition of period years (#58)
* clvtime epsilon (#57)
* Bugfix: Disable GSL's error reporting (#59)
* Setup vignettes (#60)
* Dyncov "cheating for stability" use data.table (#62)
* Parallelism setup and explanations (#66)
* Push documentation (#67)
* Feature new sampledata (#68)
* Various important todos (#69)
* vcov with Moore-Penrose and nearPD (#70)
* Compare vs BTYD: fitting and prediction (#72)
* Stubs for WIP models (#74)
* Remove parameter 'complete' from coef() (#75)
* Consistent internal names of class instances (#76)
* Vcov: nearPD after back-transformation (#77)
* Consistent constructors (#82)
* Bugfix update walkthrough (#79)
* Last ToDos before initial release (#84)
* Plot values backward-looking (#87)
* Setup github pages (#89)

* Fixes as demanded by CRAN

Co-authored-by: Patrick Bachmann <[email protected]>
Co-authored-by: Markus Meierer <[email protected]>
  • Loading branch information
3 people authored May 8, 2020
1 parent 04c6161 commit 0396ef5
Show file tree
Hide file tree
Showing 260 changed files with 7,683 additions and 9,515 deletions.
Binary file removed .DS_Store
Binary file not shown.
13 changes: 13 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
^.*\.Rproj$
^\.Rproj\.user$
^README\.md$
^README\.rmd$
^Walkthrough\.md$
^Walkthrough\.rmd$
^bibliography\.bib$
^man-roxygen$
^thoughts_parameterhandling\.rtf$
^\.github$
^cran-comments\.md$
^_pkgdown\.yml$
[.]o$
[.]o.tmp$

1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
32 changes: 32 additions & 0 deletions .github/workflows/Coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: coverage
on: pull_request # default to types [opened, synchronize, reopened]
jobs:
coverage-ubuntu-16-04-R-release:
runs-on: ubuntu-16.04
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
# to install binaries on ubuntu
RSPM: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@master
with:
r-version: 'release'
- name: Install system dependencies
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "install.packages(c('remotes', 'rcmdcheck'))"
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install package dependencies
run: |
remotes::install_deps(dependencies = TRUE) # installs binaries
# testthat and covr are part of package's Suggests and installed as package dependency.
shell: Rscript {0}

- name: Test coverage
# run: covr::codecov() # uploads to codecov.io
run: covr::package_coverage(type = "tests", quiet = FALSE)
shell: Rscript {0}
80 changes: 80 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: R-CMD-check
on: push
# CMD checks on win, mac, ubuntu
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: R-CMD-check-${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false # dont cancel if one fails, might have differen checks fail on different OS
matrix:
config:
- {os: macOS-latest, r: 'devel'}
- {os: windows-latest, r: 'devel'}
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-16.04, r: 'release', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}

steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
sudo apt-get install -y qpdf # qpdf needed on ubuntu
- name: Install tinytex for linux (to build vignettes)
if: runner.os == 'Linux'
run: |
install.packages('tinytex')
tinytex::install_tinytex()
shell: Rscript {0}

- name: Install gsl for mac
if: runner.os == 'macOS'
run: |
brew install gsl
- name: Install package dependencies
run: |
remotes::install_deps(dependencies = TRUE)
# remotes::install_cran(c("RcppGSL", "stringi"), repos = "https://cran.rstudio.com")
remotes::install_cran("rcmdcheck", repos = "https://cran.rstudio.com")
# remove because leads to NOTE. Does not exist on windows
if(file.exists('depends.Rds')) {file.remove('depends.Rds')}
shell: Rscript {0}

- name: Check on Mac / ubuntu
if: runner.os != 'Windows'
run: rcmdcheck::rcmdcheck(args = c("--no-tests", "--as-cran", "--no-manual"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Check on Windows, without install and vignette
if: runner.os == 'Windows'
run: rcmdcheck::rcmdcheck(args = c("--no-install", "--no-build-vignettes","--no-vignettes","--ignore-vignettes","--no-tests", "--as-cran", "--no-manual"), build_args = c("--no-build-vignettes"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
36 changes: 36 additions & 0 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: testthat-tests
on: pull_request # default to types [opened, synchronize, reopened]
jobs:
tests-ubuntu-16-04-R-release:
runs-on: ubuntu-16.04
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
# to install binaries on ubuntu
RSPM: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@master
with:
r-version: 'release'
- name: Install system dependencies
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "install.packages(c('remotes', 'rcmdcheck'))"
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install package dependencies
run: |
remotes::install_deps(dependencies = TRUE) # installs binaries
# Install testing stuff (testthat and covr are part of package's Suggests and installed as package dependency)
remotes::install_cran("devtools")
shell: Rscript {0}

- name: Run tests
run: |
library(testthat)
library(devtools)
reporter <- RstudioReporter$new() # has to be defined outside capture.output to still print
capture.output(devtools::test(reporter = reporter, stop_on_failure=TRUE, stop_on_warning=TRUE))
shell: Rscript {0}
46 changes: 46 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
push:
branches: master

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

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

- name: Install gsl for mac
run: |
brew install gsl
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: macOS-r-4.0-0-${{ hashFiles('.github/depends.Rds') }}
restore-keys: macOS-r-4.0-0-

- name: Install dependencies
run: |
install.packages("remotes")
remotes::install_deps(dependencies = TRUE)
remotes::install_dev("pkgdown")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: pkgdown::deploy_to_branch(new_process = FALSE)
shell: Rscript {0}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
src/*.o
src/*.so
src/*.dll
src/*.gcda
src/*.gcno
src/*.o.tmp
inst/doc
.DS_Store
2 changes: 1 addition & 1 deletion CLVTools.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --no-tests --no-install --as-cran
PackageCheckArgs: --no-tests --as-cran
PackageRoxygenize: rd,collate,namespace
Loading

0 comments on commit 0396ef5

Please sign in to comment.