2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, bokeh
|
|
|
|
, emcee
|
|
|
|
, matplotlib
|
|
|
|
, netcdf4
|
|
|
|
, numba
|
|
|
|
, numpy
|
|
|
|
, pandas
|
|
|
|
, pytest
|
2022-02-10 20:34:41 +00:00
|
|
|
, cloudpickle
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
|
|
|
, setuptools
|
2022-02-10 20:34:41 +00:00
|
|
|
, typing-extensions
|
|
|
|
# , tensorflow-probability (incompatible version)
|
2020-04-24 23:36:52 +00:00
|
|
|
, xarray
|
2022-02-10 20:34:41 +00:00
|
|
|
, zarr
|
|
|
|
, h5py
|
2020-04-24 23:36:52 +00:00
|
|
|
#, pymc3 (broken)
|
|
|
|
#, pyro-ppl (broken)
|
|
|
|
#, pystan (not packaged)
|
|
|
|
#, numpyro (not packaged)
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "arviz";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.11.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arviz-devs";
|
|
|
|
repo = "arviz";
|
2020-10-11 12:50:04 +00:00
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "0vindadyxhxhrhbalys6kzrda2d4qpqbqbsbwfprp8pxkldgk548";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
# needed to install
|
|
|
|
matplotlib
|
|
|
|
netcdf4
|
|
|
|
pandas
|
|
|
|
xarray
|
|
|
|
# needed to import
|
|
|
|
setuptools
|
|
|
|
# not needed to import, but used by many functions
|
|
|
|
# and is listed as a dependency in the documentation
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "typing_extensions>=3.7.4.3,<4" "typing_extensions>=3.7.4.3"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [
|
|
|
|
bokeh
|
|
|
|
emcee
|
|
|
|
numba
|
|
|
|
pytest
|
2022-02-10 20:34:41 +00:00
|
|
|
cloudpickle
|
|
|
|
zarr
|
|
|
|
#tensorflow-probability (used by disabled tests)
|
|
|
|
h5py
|
|
|
|
#pymc3 (broken, used by disabled tests)
|
|
|
|
#pyro-ppl (broken, used by disabled tests)
|
2020-04-24 23:36:52 +00:00
|
|
|
#pystan (not packaged)
|
2022-02-10 20:34:41 +00:00
|
|
|
#numpyro (not packaged, used by disabled tests)
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# check requires pymc3 and pyro-ppl, which are currently broken, and pystan
|
2022-02-10 20:34:41 +00:00
|
|
|
# and numpyro, which are not yet packaged, and an incompatible (old) version
|
|
|
|
# of tensorflow-probability. some checks also need to make
|
2020-04-24 23:36:52 +00:00
|
|
|
# directories and do not have permission to do so. So we can only check part
|
|
|
|
# of the package
|
|
|
|
# Additionally, there are some failures with the plots test, which revolve
|
|
|
|
# around attempting to output .mp4 files through an interface that only wants
|
|
|
|
# to output .html files.
|
|
|
|
# The following test have been disabled as a result: data_cmdstanpy,
|
2022-02-10 20:34:41 +00:00
|
|
|
# data_numpyro, data_pyro, data_pystan, data_tfp, data_pymc3 and plots.
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
|
|
|
cd arviz/tests/
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
pytest \
|
|
|
|
base_tests/test_data.py \
|
|
|
|
base_tests/test_diagnostics.py \
|
|
|
|
base_tests/test_plot_utils.py \
|
|
|
|
base_tests/test_rcparams.py \
|
|
|
|
base_tests/test_stats.py \
|
2022-02-10 20:34:41 +00:00
|
|
|
base_tests/test_stats_numba.py \
|
2020-04-24 23:36:52 +00:00
|
|
|
base_tests/test_stats_utils.py \
|
|
|
|
base_tests/test_utils.py \
|
2022-02-10 20:34:41 +00:00
|
|
|
base_tests/test_utils_numba.py \
|
|
|
|
base_tests/test_data_zarr.py \
|
2020-04-24 23:36:52 +00:00
|
|
|
external_tests/test_data_cmdstan.py \
|
2022-02-10 20:34:41 +00:00
|
|
|
external_tests/test_data_emcee.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "ArviZ is a Python package for exploratory analysis of Bayesian models";
|
|
|
|
homepage = "https://arviz-devs.github.io/arviz/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.omnipotententity ];
|
|
|
|
};
|
|
|
|
}
|