mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-performance: use metadata checks
This commit is contained in:
parent
8846b37095
commit
773553da4a
3 changed files with 91 additions and 27 deletions
|
@ -1,20 +1,48 @@
|
|||
# Maintainer: Hu Butui <hot123tea123@gmail.com>
|
||||
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
|
||||
# Contributor: Hu Butui <hot123tea123@gmail.com>
|
||||
|
||||
_pkgname=performance
|
||||
_pkgver=0.10.5
|
||||
pkgname=r-${_pkgname,,}
|
||||
pkgver=0.10.5
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
pkgdesc='Assessment of Regression Models Performance'
|
||||
arch=('any')
|
||||
pkgdesc="Assessment of Regression Models Performance"
|
||||
arch=(any)
|
||||
url="https://cran.r-project.org/package=${_pkgname}"
|
||||
license=('GPL')
|
||||
license=(GPL3)
|
||||
depends=(
|
||||
r
|
||||
r-bayestestr
|
||||
r-datawizard
|
||||
r-insight
|
||||
)
|
||||
checkdepends=(
|
||||
r-aer
|
||||
r-afex
|
||||
r-bayesfactor
|
||||
r-betareg
|
||||
r-bigutilsr
|
||||
r-curl
|
||||
r-dbscan
|
||||
r-estimatr
|
||||
r-fixest
|
||||
r-glmmtmb
|
||||
r-httr
|
||||
r-ics
|
||||
r-icsoutlier
|
||||
r-islr
|
||||
r-ivreg
|
||||
r-lavaan
|
||||
r-lme4
|
||||
r-mclogit
|
||||
r-metafor
|
||||
r-nonnest2
|
||||
r-ordinal
|
||||
r-parameters
|
||||
r-pscl
|
||||
r-rstanarm
|
||||
r-rstantools
|
||||
r-testthat
|
||||
)
|
||||
optdepends=(
|
||||
r-aer
|
||||
r-afex
|
||||
|
@ -23,7 +51,6 @@ optdepends=(
|
|||
r-betareg
|
||||
r-bigutilsr
|
||||
r-blavaan
|
||||
r-boot
|
||||
r-brms
|
||||
r-car
|
||||
r-compquadform
|
||||
|
@ -36,7 +63,6 @@ optdepends=(
|
|||
r-gamm4
|
||||
r-ggplot2
|
||||
r-glmmtmb
|
||||
r-graphics
|
||||
r-hmisc
|
||||
r-httr
|
||||
r-ics
|
||||
|
@ -47,23 +73,19 @@ optdepends=(
|
|||
r-lme4
|
||||
r-lmtest
|
||||
r-loo
|
||||
r-mass
|
||||
r-matrix
|
||||
r-mclogit
|
||||
r-mclust
|
||||
r-metadat
|
||||
r-metafor
|
||||
r-mgcv
|
||||
r-mlogit
|
||||
r-multimode
|
||||
r-nlme
|
||||
r-nonnest2
|
||||
r-ordinal
|
||||
r-parallel
|
||||
r-parameters
|
||||
r-patchwork
|
||||
r-pscl
|
||||
r-psych
|
||||
r-qqplotr
|
||||
r-randomforest
|
||||
r-rmarkdown
|
||||
r-rstanarm
|
||||
|
@ -71,21 +93,33 @@ optdepends=(
|
|||
r-sandwich
|
||||
r-see
|
||||
r-survey
|
||||
r-survival
|
||||
r-testthat
|
||||
r-tweedie
|
||||
r-vgam
|
||||
r-withr
|
||||
)
|
||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
||||
md5sums=('79b638bc9062c40848cb38670b980c20')
|
||||
sha256sums=('d91c0dc1ab7e32868c750357b3af4e98f2bf972f724d9f6e50de4015c56f8caf')
|
||||
|
||||
prepare() {
|
||||
# skip failing tests
|
||||
cd "$_pkgname/tests/testthat"
|
||||
sed -i '/"brms_mixed_1"/i\ \ skip("fails")' test-icc.R
|
||||
sed -i '/"model_performance.brmsfit"/a\ \ skip("fails")' test-model_performance.bayesian.R
|
||||
}
|
||||
|
||||
build() {
|
||||
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
||||
mkdir -p build
|
||||
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,12 +1,13 @@
|
|||
#!/usr/bin/env python3
|
||||
from lilaclib import *
|
||||
|
||||
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}'
|
||||
print(line)
|
||||
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
|
||||
r_pre_build(_G)
|
||||
|
||||
def post_build():
|
||||
git_pkgbuild_commit()
|
||||
|
|
|
@ -1,12 +1,41 @@
|
|||
build_prefix: extra-x86_64
|
||||
maintainers:
|
||||
- github: hubutui
|
||||
- github: pekkarr
|
||||
email: pekkarr@protonmail.com
|
||||
repo_depends:
|
||||
- r-bayestestr
|
||||
- r-datawizard
|
||||
- r-insight
|
||||
repo_makedepends:
|
||||
- r-aer
|
||||
- r-afex
|
||||
- r-bayesfactor
|
||||
- r-betareg
|
||||
- r-bigutilsr
|
||||
- r-curl
|
||||
- r-dbscan
|
||||
- r-estimatr
|
||||
- r-fixest
|
||||
- r-glmmtmb
|
||||
- r-httr
|
||||
- r-ics
|
||||
- r-icsoutlier
|
||||
- r-islr
|
||||
- r-ivreg
|
||||
- r-lavaan
|
||||
- r-lme4
|
||||
- r-mclogit
|
||||
- r-metafor
|
||||
- r-nonnest2
|
||||
- r-ordinal
|
||||
- r-parameters
|
||||
- r-pscl
|
||||
- r-rstanarm
|
||||
- r-rstantools
|
||||
- r-testthat
|
||||
update_on:
|
||||
- regex: performance_([\d._-]+).tar.gz
|
||||
source: regex
|
||||
url: https://cran.r-project.org/package=performance
|
||||
- source: rpkgs
|
||||
pkgname: performance
|
||||
repo: cran
|
||||
md5: true
|
||||
- alias: r
|
||||
|
|
Loading…
Add table
Reference in a new issue