mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-rstanarm: use metadata checks
This commit is contained in:
parent
c133a9184e
commit
b6b26bc1fe
3 changed files with 76 additions and 44 deletions
|
@ -1,30 +1,39 @@
|
|||
# system requirements: GNU make, pandoc (>= 1.12.3), pandoc-citeproc
|
||||
# Maintainer: sukanka <su975853527@gmail.com>
|
||||
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
|
||||
# Contributor: sukanka <su975853527@gmail.com>
|
||||
|
||||
_pkgname=rstanarm
|
||||
_pkgver=2.26.1
|
||||
pkgname=r-${_pkgname,,}
|
||||
pkgver=2.26.1
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
pkgdesc='Bayesian Applied Regression Modeling via Stan'
|
||||
arch=('x86_64')
|
||||
pkgdesc="Bayesian Applied Regression Modeling via Stan"
|
||||
arch=(x86_64)
|
||||
url="https://cran.r-project.org/package=${_pkgname}"
|
||||
license=('GPL')
|
||||
license=(GPL3)
|
||||
depends=(
|
||||
r
|
||||
pandoc
|
||||
r-bayesplot
|
||||
r-bh
|
||||
r-ggplot2
|
||||
r-lme4
|
||||
r-loo
|
||||
r-posterior
|
||||
r-rcpp
|
||||
r-rcppeigen
|
||||
r-rcppparallel
|
||||
r-rstan
|
||||
r-rstantools
|
||||
r-shinystan
|
||||
)
|
||||
makedepends=(
|
||||
r-bh
|
||||
r-rcppeigen
|
||||
r-stanheaders
|
||||
pandoc
|
||||
)
|
||||
checkdepends=(
|
||||
r-betareg
|
||||
r-biglm
|
||||
r-data.table
|
||||
r-hsaur3
|
||||
r-testthat
|
||||
)
|
||||
optdepends=(
|
||||
r-betareg
|
||||
|
@ -35,24 +44,39 @@ optdepends=(
|
|||
r-gridextra
|
||||
r-hsaur3
|
||||
r-knitr
|
||||
r-mass
|
||||
r-mgcv
|
||||
r-rmarkdown
|
||||
r-roxygen2
|
||||
r-shiny
|
||||
r-stanheaders
|
||||
r-testthat
|
||||
)
|
||||
makedepends=('make')
|
||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
||||
md5sums=('8505a33ae9ff139e9f0b3d5b8cc6ee7e')
|
||||
sha256sums=('4a54792d6e035931b613647aebfc98b81d1aac646a5a3f6f116b6f560d544444')
|
||||
|
||||
prepare() {
|
||||
cd "$_pkgname/tests/testthat"
|
||||
# skip tests that make a coredump
|
||||
sed -e '/"stan_betareg ok when modeling x and z (link.phi = '\'sqrt\'')"/a\ \ skip("dumps core")' \
|
||||
-e '/"heavy tailed priors work with stan_betareg"/a\ \ skip("dumps core")' \
|
||||
-i test_stan_betareg.R
|
||||
sed -i '1i skip("dumps core")' test_stan_jm.R
|
||||
sed -i '/"multiple grouping factors are ok"/a\ \ skip("dumps core")' test_stan_mvmer.R
|
||||
}
|
||||
|
||||
build() {
|
||||
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
||||
mkdir -p build
|
||||
# compilation needs a lot of memory
|
||||
MAKEFLAGS+=" -j1"
|
||||
R CMD INSTALL "$_pkgname" -l build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$_pkgname/tests"
|
||||
R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dm0755 "${pkgdir}/usr/lib/R/library"
|
||||
cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library"
|
||||
install -d "$pkgdir/usr/lib/R/library"
|
||||
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
|
||||
}
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
#!/usr/bin/env python3
|
||||
from lilaclib import *
|
||||
|
||||
# we use 2 threads in BioArchLinux, but it should not be pushed to aur.
|
||||
import os
|
||||
import sys
|
||||
sys.path.append(os.path.normpath(f'{__file__}/../../../lilac-extensions'))
|
||||
from lilac_r_utils import r_pre_build
|
||||
|
||||
def pre_build():
|
||||
for line in edit_file('PKGBUILD'):
|
||||
if line.startswith('_pkgver='):
|
||||
line = f'_pkgver={_G.newver}'
|
||||
elif line.startswith('build()'):
|
||||
line += '\n' + 'export MAKE="make -j2"'
|
||||
print(line)
|
||||
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
|
||||
r_pre_build(
|
||||
_G,
|
||||
expect_systemrequirements = "GNU make, pandoc (>= 1.12.3), pandoc-citeproc",
|
||||
)
|
||||
|
||||
def post_build():
|
||||
run_cmd(['sh', '-c', "sed -i '/export MAKE/d' PKGBUILD"])
|
||||
git_pkgbuild_commit()
|
||||
update_aur_repo()
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
build_prefix: extra-x86_64
|
||||
maintainers:
|
||||
- github: sukanka
|
||||
- github: pekkarr
|
||||
email: pekkarr@protonmail.com
|
||||
repo_depends:
|
||||
- r-bayesplot
|
||||
- r-bh
|
||||
- r-ggplot2
|
||||
- r-lme4
|
||||
- r-loo
|
||||
- r-rcpp
|
||||
- r-rcppeigen
|
||||
- r-rcppparallel
|
||||
- r-rstan
|
||||
- r-rstantools
|
||||
- r-shinystan
|
||||
- r-stanheaders
|
||||
- r-bayesplot
|
||||
- r-ggplot2
|
||||
- r-lme4
|
||||
- r-loo
|
||||
- r-posterior
|
||||
- r-rcpp
|
||||
- r-rcppparallel
|
||||
- r-rstan
|
||||
- r-rstantools
|
||||
- r-shinystan
|
||||
repo_makedepends:
|
||||
- r-bh
|
||||
- r-rcppeigen
|
||||
- r-stanheaders
|
||||
- r-betareg
|
||||
- r-biglm
|
||||
- r-data.table
|
||||
- r-hsaur3
|
||||
- r-testthat
|
||||
update_on:
|
||||
- regex: rstanarm_([\d._-]+).tar.gz
|
||||
source: regex
|
||||
url: https://cran.r-project.org/package=rstanarm
|
||||
- alias: r
|
||||
time_limit_hours: 10
|
||||
- source: rpkgs
|
||||
pkgname: rstanarm
|
||||
repo: cran
|
||||
md5: true
|
||||
- alias: r
|
||||
|
|
Loading…
Add table
Reference in a new issue