nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 105 lines 2.8 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, bokeh 5, emcee 6, matplotlib 7, netcdf4 8, numba 9, numpy 10, pandas 11, pytest 12, cloudpickle 13, scipy 14, setuptools 15, typing-extensions 16# , tensorflow-probability (incompatible version) 17, xarray 18, zarr 19, h5py 20#, pymc3 (broken) 21#, pyro-ppl (broken) 22#, pystan (not packaged) 23#, numpyro (not packaged) 24}: 25 26buildPythonPackage rec { 27 pname = "arviz"; 28 version = "0.12.0"; 29 30 src = fetchFromGitHub { 31 owner = "arviz-devs"; 32 repo = "arviz"; 33 rev = "v${version}"; 34 sha256 = "sha256-ClARxgfji/CavEy8g5oeYK7pwSZS1yUIZnBiyTbZ/zU="; 35 }; 36 37 propagatedBuildInputs = [ 38 # needed to install 39 matplotlib 40 netcdf4 41 pandas 42 xarray 43 # needed to import 44 setuptools 45 # not needed to import, but used by many functions 46 # and is listed as a dependency in the documentation 47 numpy 48 scipy 49 ]; 50 51 postPatch = '' 52 substituteInPlace requirements.txt \ 53 --replace "typing_extensions>=3.7.4.3,<4" "typing_extensions>=3.7.4.3" 54 ''; 55 56 checkInputs = [ 57 bokeh 58 emcee 59 numba 60 pytest 61 cloudpickle 62 zarr 63 #tensorflow-probability (used by disabled tests) 64 h5py 65 #pymc3 (broken, used by disabled tests) 66 #pyro-ppl (broken, used by disabled tests) 67 #pystan (not packaged) 68 #numpyro (not packaged, used by disabled tests) 69 ]; 70 71 # check requires pymc3 and pyro-ppl, which are currently broken, and pystan 72 # and numpyro, which are not yet packaged, and an incompatible (old) version 73 # of tensorflow-probability. some checks also need to make 74 # directories and do not have permission to do so. So we can only check part 75 # of the package 76 # Additionally, there are some failures with the plots test, which revolve 77 # around attempting to output .mp4 files through an interface that only wants 78 # to output .html files. 79 # The following test have been disabled as a result: data_cmdstanpy, 80 # data_numpyro, data_pyro, data_pystan, data_tfp, data_pymc3 and plots. 81 checkPhase = '' 82 cd arviz/tests/ 83 export HOME=$TMPDIR 84 pytest \ 85 base_tests/test_data.py \ 86 base_tests/test_diagnostics.py \ 87 base_tests/test_plot_utils.py \ 88 base_tests/test_rcparams.py \ 89 base_tests/test_stats.py \ 90 base_tests/test_stats_numba.py \ 91 base_tests/test_stats_utils.py \ 92 base_tests/test_utils.py \ 93 base_tests/test_utils_numba.py \ 94 base_tests/test_data_zarr.py \ 95 external_tests/test_data_cmdstan.py \ 96 external_tests/test_data_emcee.py 97 ''; 98 99 meta = with lib; { 100 description = "ArviZ is a Python package for exploratory analysis of Bayesian models"; 101 homepage = "https://arviz-devs.github.io/arviz/"; 102 license = licenses.asl20; 103 maintainers = [ maintainers.omnipotententity ]; 104 }; 105}