Skip to content

Commit

Permalink
Merge pull request #255 from alan-turing-institute/param6
Browse files Browse the repository at this point in the history
Param6
  • Loading branch information
RaphaelS1 authored Jul 31, 2021
2 parents 23a3734 + 8d470be commit 8cb8306
Show file tree
Hide file tree
Showing 287 changed files with 2,077 additions and 7,734 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ jobs:
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
run: brew install harfbuzz fribidi

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown")
remotes::install_github("mlr-org/mlr3pkgdowntemplate")
install.packages(c("pkgdown", "textshaping"))
shell: Rscript {0}

- name: Install package
Expand All @@ -45,4 +47,3 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
82 changes: 55 additions & 27 deletions .github/workflows/rcmdcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,104 @@ on:
schedule:
- cron: "0 4 * * *"

name: Check/Codecov/Render
name: R-CMD-check

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

name: R CMD Check (${{ matrix.config.os }} (${{ matrix.config.r }}))
name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- { os: macOS-latest, r: "3.6" }
- { os: macOS-latest, r: "devel" }
- { os: macOS-latest, r: "release" }
- {os: windows-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v1
id: install-r
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}

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

- name: Query dependencies
- name: Install pak and query dependencies
run: |
install.packages(c("remotes", "devtools"))
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
- name: Restore R package cache
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-
path: |
${{ env.R_LIBS_USER }}/*
!${{ env.R_LIBS_USER }}/pak
key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
pak::local_system_requirements(execute = TRUE)
pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
shell: Rscript {0}

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
pak::local_install_dev_deps(upgrade = TRUE)
pak::pkg_install("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
_R_CHECK_CRAN_INCOMING_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results
path: check

- name: Install covr
if: ${{ github.event_name == 'pull_request' && runner.os == 'macOS' }}
run: install.packages('covr')
shell: Rscript {0}
- name: Don't use tar from old Rtools to store the cache
if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }}
shell: bash
run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH

- name: Test coverage
if: ${{ github.event_name == 'pull_request' && runner.os == 'macOS' }}
run: covr::codecov()
if: ${{ runner.os == 'Linux' && matrix.config.r == 'release'}}
run: |
install.packages('covr')
covr::codecov()
shell: Rscript {0}

- name: Render rmd
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ CRAN-RELEASE
*.o
*.so
*.dll
/doc/
/Meta/
67 changes: 39 additions & 28 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Package: distr6
Title: The Complete R6 Probability Distributions Interface
Version: 1.5.6
Version: 1.6.0
Authors@R:
c(person(given = "Raphael",
c(person(given = "Raphael",
family = "Sonabend",
role = c("aut","cre"),
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0001-9225-4654")),
person(given = "Franz",
Expand All @@ -15,12 +15,12 @@ Authors@R:
family = "Ruckdeschel",
role = "ctb",
email = "[email protected]",
comment = c("Author of distr")),
comment = "Author of distr"),
person(given = "Matthias",
family = "Kohl",
role = "ctb",
email = "[email protected]",
comment = c("Author of distr")),
comment = "Author of distr"),
person(given = "Nurul Ain",
family = "Toha",
role = "ctb",
Expand Down Expand Up @@ -64,33 +64,48 @@ Authors@R:
person(given = "Qian",
family = "Zhou",
role = "ctb",
email = "[email protected]")
)
Description: An R6 object oriented distributions package. Unified interface for 42 probability distributions and 11 kernels including functionality for multiple scientific types. Additionally functionality for composite distributions and numerical imputation. Design patterns including wrappers and decorators are described in Gamma et al. (1994, ISBN:0-201-63361-2). For quick reference of probability distributions including d/p/q/r functions and results we refer to McLaughlin, M. P. (2001). Additionally Devroye (1986, ISBN:0-387-96305-7) for sampling the Dirichlet distribution, Gentle (2009) <doi:10.1007/978-0-387-98144-4> for sampling the Multivariate Normal distribution and Michael et al. (1976) <doi:10.2307/2683801> for sampling the Wald distribution.
email = "[email protected]"))
Description: An R6 object oriented distributions package. Unified
interface for 42 probability distributions and 11 kernels including
functionality for multiple scientific types. Additionally
functionality for composite distributions and numerical imputation.
Design patterns including wrappers and decorators are described in
Gamma et al. (1994, ISBN:0-201-63361-2). For quick reference of
probability distributions including d/p/q/r functions and results we
refer to McLaughlin, M. P. (2001). Additionally Devroye (1986,
ISBN:0-387-96305-7) for sampling the Dirichlet distribution, Gentle
(2009) <doi:10.1007/978-0-387-98144-4> for sampling the Multivariate
Normal distribution and Michael et al. (1976) <doi:10.2307/2683801>
for sampling the Wald distribution.
License: MIT + file LICENSE
URL: https://alan-turing-institute.github.io/distr6/,
https://github.com/alan-turing-institute/distr6/
BugReports: https://github.com/alan-turing-institute/distr6/issues
Imports:
checkmate,
data.table,
param6 (>= 0.2.1),
R6,
Rcpp,
set6 (>= 0.2.3),
stats
Suggests:
actuar,
cubature,
extraDistr,
GoFKernel,
knitr,
magrittr,
plotly,
pracma,
R62S3 (>= 1.4.0),
set6 (>= 0.2.0),
stats,
rmarkdown,
testthat
LinkingTo:
Rcpp
Suggests:
cubature,
GoFKernel,
knitr,
testthat,
rmarkdown,
magrittr,
extraDistr,
actuar,
plotly,
pracma
License: MIT + file LICENSE
URL: https://alan-turing-institute.github.io/distr6/, https://github.com/alan-turing-institute/distr6/
BugReports: https://github.com/alan-turing-institute/distr6/issues
VignetteBuilder:
knitr
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE, r6 = TRUE)
RoxygenNote: 7.1.1
Expand All @@ -116,8 +131,6 @@ Collate:
'Kernel_Tricube.R'
'Kernel_Triweight.R'
'Kernel_Uniform.R'
'ParameterSet.R'
'ParameterSetCollection.R'
'RcppExports.R'
'SDistribution_Arcsine.R'
'SDistribution_Bernoulli.R'
Expand Down Expand Up @@ -209,5 +222,3 @@ Collate:
'skewType.R'
'sugar.R'
'zzz.R'
LinkingTo:
Rcpp
Loading

0 comments on commit 8cb8306

Please sign in to comment.