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.15.1";
36 format = "setuptools";
37
38 disabled = pythonOlder "3.7";
39
40 src = fetchFromGitHub {
41 owner = "arviz-devs";
42 repo = pname;
43 rev = "refs/tags/v${version}";
44 hash = "sha256-jjA+yltvpPZldIxXXqu1bXCLqpiU5/NBYTPlI9ImGVs=";
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 ];
97
98 pythonImportsCheck = [
99 "arviz"
100 ];
101
102 meta = with lib; {
103 description = "Library for exploratory analysis of Bayesian models";
104 homepage = "https://arviz-devs.github.io/arviz/";
105 changelog = "https://github.com/arviz-devs/arviz/blob/v${version}/CHANGELOG.md";
106 license = licenses.asl20;
107 maintainers = with maintainers; [ omnipotententity ];
108 };
109}