1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, emcee
5, h5netcdf
6, matplotlib
7, netcdf4
8, numba
9, numpy
10, pandas
11, pytest
12, setuptools
13, cloudpickle
14, pytestCheckHook
15, scipy
16, packaging
17, typing-extensions
18, pythonOlder
19, xarray
20, xarray-einstats
21, zarr
22, ffmpeg
23, h5py
24, jaxlib
25, torchvision
26, jax
27 # , pymc3 (circular dependency)
28, pyro-ppl
29 #, pystan (not packaged)
30, numpyro
31}:
32
33buildPythonPackage rec {
34 pname = "arviz";
35 version = "0.16.1";
36 pyproject = true;
37
38 disabled = pythonOlder "3.9";
39
40 src = fetchFromGitHub {
41 owner = "arviz-devs";
42 repo = "arviz";
43 rev = "refs/tags/v${version}";
44 hash = "sha256-kixWGj0M0flTq5rXSiPB0nfZaGYRvvMBGAJpehdW8KY=";
45 };
46
47 propagatedBuildInputs = [
48 h5netcdf
49 matplotlib
50 netcdf4
51 numpy
52 packaging
53 pandas
54 scipy
55 setuptools
56 xarray
57 xarray-einstats
58 ];
59
60 nativeCheckInputs = [
61 cloudpickle
62 emcee
63 ffmpeg
64 h5py
65 jax
66 jaxlib
67 numba
68 numpyro
69 # pymc3 (circular dependency)
70 pyro-ppl
71 # pystan (not packaged)
72 pytestCheckHook
73 torchvision
74 zarr
75 ];
76
77 preCheck = ''
78 export HOME=$(mktemp -d);
79 '';
80
81 pytestFlagsArray = [
82 "arviz/tests/base_tests/"
83 ];
84
85 disabledTests = [
86 # Tests require network access
87 "test_plot_separation"
88 "test_plot_trace_legend"
89 "test_cov"
90 # countourpy is not available at the moment
91 "test_plot_kde"
92 "test_plot_kde_2d"
93 "test_plot_pair"
94 # Array mismatch
95 "test_plot_ts"
96 # The following two tests fail in a common venv-based setup.
97 # An issue has been opened upstream: https://github.com/arviz-devs/arviz/issues/2282
98 "test_plot_ppc_discrete"
99 "test_plot_ppc_discrete_save_animation"
100 ];
101
102 pythonImportsCheck = [
103 "arviz"
104 ];
105
106 meta = with lib; {
107 description = "Library for exploratory analysis of Bayesian models";
108 homepage = "https://arviz-devs.github.io/arviz/";
109 changelog = "https://github.com/arviz-devs/arviz/blob/v${version}/CHANGELOG.md";
110 license = licenses.asl20;
111 maintainers = with maintainers; [ omnipotententity ];
112 };
113}