summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Smedstad2024-01-15 19:01:08 +0100
committerCarl Smedstad2024-01-15 19:01:08 +0100
commit50814c271077061f1f7f8b8b5eae91232e613f53 (patch)
tree034c9a72521bfacaaf5c6a839aea341d1c52138b
parent6ded0f6b3ccdeb9544e9790be5dcd06946a3500b (diff)
downloadaur-50814c271077061f1f7f8b8b5eae91232e613f53.tar.gz
upgpkg: python-pymc 5.10.3-2
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD86
2 files changed, 74 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e9e6bd8d343a..594eaec82997 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-pymc
pkgdesc = Markov chain Monte Carlo for Python
pkgver = 5.10.3
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/pymc-devs/pymc
arch = any
license = MIT
@@ -26,6 +26,6 @@ pkgbase = python-pymc
depends = python-typing_extensions
depends = python-xarray
source = python-pymc-5.10.3.tar.gz::https://github.com/pymc-devs/pymc/archive/refs/tags/v5.10.3.tar.gz
- sha256sums = 32e0d317f017b2e763b39e6e5946054970b2b5b2018a01cfae614537fe0a2560
+ sha256sums = 786932f6cbd137f100200c9b5230ac6d943578eadf252d74e191941ee9791430
pkgname = python-pymc
diff --git a/PKGBUILD b/PKGBUILD
index 41797b89beaf..6daeebd12c44 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=python-pymc
_name=${pkgname#python-}
pkgver=5.10.3
-pkgrel=1
+pkgrel=2
pkgdesc="Markov chain Monte Carlo for Python"
arch=(any)
url="https://github.com/pymc-devs/pymc"
@@ -35,7 +35,7 @@ makedepends=(
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
-sha256sums=('32e0d317f017b2e763b39e6e5946054970b2b5b2018a01cfae614537fe0a2560')
+sha256sums=('786932f6cbd137f100200c9b5230ac6d943578eadf252d74e191941ee9791430')
_archive="$_name-$pkgver"
@@ -48,23 +48,81 @@ build() {
check() {
cd "$_archive"
- python -m pytest \
- tests/test_initial_point.py \
- tests/test_math.py \
- tests/test_model_graph.py \
- tests/test_printing.py \
- tests/test_pytensorf.py \
- tests/test_testing.py \
- tests/test_util.py \
- -k "\
- not test_softmax_logsoftmax_no_warnings \
- and not TestImputationModel \
- "
+ _ignored_tests=(
+ # Requires https://github.com/pyro-ppl/numpyro which is not yet pacakged.
+ tests/sampling/test_jax.py
+ tests/sampling/test_mcmc_external.py
+
+ # Requires https://aur.archlinux.org/packages/python-numdifftools which
+ # currently is broken.
+ tests/logprob/test_transform_value.py
+
+ # Error during test collection.
+ tests/backends/test_mcbackend.py
+
+ # Most time-consuming test files, ignore these to make test duration more
+ # reasonable.
+ tests/backends/test_arviz.py
+ tests/distributions/test_continuous.py
+ tests/distributions/test_discrete.py
+ tests/distributions/test_distribution.py
+ tests/distributions/test_mixture.py
+ tests/distributions/test_multivariate.py
+ tests/distributions/test_timeseries.py
+ tests/distributions/test_transform.py
+ tests/distributions/test_truncated.py
+ tests/gp/test_cov.py
+ tests/gp/test_gp.py
+ tests/gp/test_hsgp_approx.py
+ tests/logprob/test_mixture.py
+ tests/logprob/test_tensor.py
+ tests/logprob/test_transforms.py
+ tests/model/test_core.py
+ tests/sampling/test_forward.py
+ tests/sampling/test_mcmc.py
+ tests/sampling/test_parallel.py
+ tests/step_methods/hmc/test_nuts.py
+ tests/step_methods/test_metropolis.py
+ tests/test_func_utils.py
+ tests/test_math.py
+ tests/test_pytensorf.py
+ tests/variational/test_inference.py
+ )
+ _ignored_tests_arg=$(printf " --ignore=%s" "${_ignored_tests[@]}")
+
+ _deselected_tests=(
+ # Fails due to:
+ # DeprecationWarning: np.find_common_type is deprecated. Please use `np.result_type` or `np.promote_types`.
+ tests/backends/test_arviz.py::TestDataPyMC::test_autodetect_coords_from_model
+
+ # Fails due to:
+ # assert (2, 50) == (2, 50, 20)
+ tests/backends/test_arviz.py::TestDataPyMC::test_multivariate_observations
+
+ # Fails due to:
+ # pymc.logprob.utils.ParameterValueError or AssertionError
+ tests/distributions/test_mixture.py::TestMixtureSameFamily::test_with_multinomial
+ tests/distributions/test_multivariate.py::TestMatchesScipy::test_multinomial
+ tests/distributions/test_multivariate.py::TestMatchesScipy::test_multinomial_invalid_value
+ tests/distributions/test_multivariate.py::TestMatchesScipy::test_multinomial_vectorized
+ tests/distributions/test_multivariate.py::TestMoments::test_multinomial_moment
+
+ # Fails due to:
+ # assert array(nan) >= 0
+ tests/distributions/test_multivariate.py::TestMatchesScipy::test_multinomial_zero_probs
+ )
+ _deselected_tests_arg=$(printf " --deselect=%s" "${_deselected_tests[@]}")
+
+ # shellcheck disable=SC2086
+ pytest \
+ $_ignored_tests_arg \
+ $_deselected_tests_arg
}
package() {
cd "$_archive"
python -m installer --destdir="$pkgdir" dist/*.whl
+
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}