forked from mirrors/nixpkgs
python39Packages.arviz: refactor
This commit is contained in:
parent
68f5159e30
commit
97b7f3bc1a
|
@ -9,97 +9,97 @@
|
|||
, numpy
|
||||
, pandas
|
||||
, pytest
|
||||
, cloudpickle
|
||||
, scipy
|
||||
, setuptools
|
||||
, cloudpickle
|
||||
, pytestCheckHook
|
||||
, scipy
|
||||
, packaging
|
||||
, typing-extensions
|
||||
# , tensorflow-probability (incompatible version)
|
||||
, pythonOlder
|
||||
, xarray
|
||||
, xarray-einstats
|
||||
, zarr
|
||||
, h5py
|
||||
#, pymc3 (broken)
|
||||
#, pyro-ppl (broken)
|
||||
#, pystan (not packaged)
|
||||
#, numpyro (not packaged)
|
||||
, jaxlib
|
||||
, torchvision
|
||||
, jax
|
||||
# , pymc3 (circular dependency)
|
||||
, pyro-ppl
|
||||
#, pystan (not packaged)
|
||||
, numpyro
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "arviz";
|
||||
version = "0.12.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arviz-devs";
|
||||
repo = "arviz";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ClARxgfji/CavEy8g5oeYK7pwSZS1yUIZnBiyTbZ/zU=";
|
||||
hash = "sha256-ClARxgfji/CavEy8g5oeYK7pwSZS1yUIZnBiyTbZ/zU=";
|
||||
};
|
||||
|
||||
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
|
||||
packaging
|
||||
pandas
|
||||
scipy
|
||||
setuptools
|
||||
xarray
|
||||
xarray-einstats
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "typing_extensions>=3.7.4.3,<4" "typing_extensions>=3.7.4.3"
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
bokeh
|
||||
emcee
|
||||
numba
|
||||
pytest
|
||||
cloudpickle
|
||||
zarr
|
||||
#tensorflow-probability (used by disabled tests)
|
||||
emcee
|
||||
h5py
|
||||
#pymc3 (broken, used by disabled tests)
|
||||
#pyro-ppl (broken, used by disabled tests)
|
||||
#pystan (not packaged)
|
||||
#numpyro (not packaged, used by disabled tests)
|
||||
jax
|
||||
jaxlib
|
||||
numba
|
||||
numpyro
|
||||
# pymc3 (circular dependency)
|
||||
pyro-ppl
|
||||
# pystan (not packaged)
|
||||
pytestCheckHook
|
||||
torchvision
|
||||
zarr
|
||||
];
|
||||
|
||||
# check requires pymc3 and pyro-ppl, which are currently broken, and pystan
|
||||
# and numpyro, which are not yet packaged, and an incompatible (old) version
|
||||
# of tensorflow-probability. some checks also need to make
|
||||
# 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,
|
||||
# data_numpyro, data_pyro, data_pystan, data_tfp, data_pymc3 and plots.
|
||||
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 \
|
||||
base_tests/test_stats_numba.py \
|
||||
base_tests/test_stats_utils.py \
|
||||
base_tests/test_utils.py \
|
||||
base_tests/test_utils_numba.py \
|
||||
base_tests/test_data_zarr.py \
|
||||
external_tests/test_data_cmdstan.py \
|
||||
external_tests/test_data_emcee.py
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d);
|
||||
'';
|
||||
|
||||
pytestFlagsArray = [
|
||||
"arviz/tests/base_tests/"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Remove tests as dependency creates a circular dependency
|
||||
"arviz/tests/external_tests/test_data_pymc.py"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Tests require network access
|
||||
"test_plot_separation"
|
||||
"test_plot_trace_legend"
|
||||
"test_cov"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"arviz"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "ArviZ is a Python package for exploratory analysis of Bayesian models";
|
||||
description = "Library for exploratory analysis of Bayesian models";
|
||||
homepage = "https://arviz-devs.github.io/arviz/";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.omnipotententity ];
|
||||
maintainers = with maintainers; [ omnipotententity ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue