nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 142 lines 2.9 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 7 # nativeBuildInputs 8 writableTmpDirAsHomeHook, 9 10 # build-system 11 packaging, 12 setuptools, 13 14 # dependencies 15 h5netcdf, 16 matplotlib, 17 numpy, 18 pandas, 19 platformdirs, 20 scipy, 21 typing-extensions, 22 xarray, 23 xarray-einstats, 24 25 # tests 26 bokeh, 27 cloudpickle, 28 emcee, 29 ffmpeg, 30 h5py, 31 jax, 32 jaxlib, 33 numba, 34 numpyro, 35 #, pymc3 (circular dependency) 36 pyro-ppl, 37 #, pystan (not packaged) 38 pytestCheckHook, 39 torchvision, 40 zarr, 41}: 42 43buildPythonPackage (finalAttrs: { 44 pname = "arviz"; 45 version = "0.23.4"; 46 pyproject = true; 47 48 src = fetchFromGitHub { 49 owner = "arviz-devs"; 50 repo = "arviz"; 51 tag = "v${finalAttrs.version}"; 52 hash = "sha256-YQ5i+CSuznbWAQ29jgqrOs+zgOAS5U4wSNEIquJQkvY="; 53 }; 54 55 nativeBuildInputs = [ 56 # Arviz wants to write a stamp file to the homedir at import time. 57 # Without $HOME being writable, `pythonImportsCheck` fails. 58 # https://github.com/arviz-devs/arviz/commit/4db612908f588d89bb5bfb6b83a08ada3d54fd02 59 writableTmpDirAsHomeHook 60 ]; 61 62 build-system = [ 63 packaging 64 setuptools 65 ]; 66 67 dependencies = [ 68 h5netcdf 69 h5py 70 matplotlib 71 numpy 72 pandas 73 platformdirs 74 scipy 75 typing-extensions 76 xarray 77 xarray-einstats 78 ]; 79 80 nativeCheckInputs = [ 81 bokeh 82 cloudpickle 83 emcee 84 ffmpeg 85 jax 86 jaxlib 87 numba 88 numpyro 89 # pymc3 (circular dependency) 90 pyro-ppl 91 # pystan (not packaged) 92 pytestCheckHook 93 torchvision 94 zarr 95 ]; 96 97 enabledTestPaths = [ 98 "arviz/tests/base_tests/" 99 ]; 100 101 disabledTestPaths = [ 102 # AttributeError: module 'zarr.storage' has no attribute 'DirectoryStore' 103 # https://github.com/arviz-devs/arviz/issues/2357 104 "arviz/tests/base_tests/test_data_zarr.py::TestDataZarr::test_io_function" 105 "arviz/tests/base_tests/test_data_zarr.py::TestDataZarr::test_io_method" 106 ]; 107 108 disabledTests = [ 109 # TypeError: only 0-dimensional arrays can be converted to Python scalars 110 "test_deterministic" 111 "test_mcse_array" 112 "test_mcse_dataset" 113 "test_mcse_nan" 114 "test_multichain_summary_array" 115 "test_numba_mcse" 116 "test_plot_mcse" 117 118 # Tests require network access 119 "test_plot_ppc_transposed" 120 "test_plot_separation" 121 "test_plot_trace_legend" 122 "test_cov" 123 124 # countourpy is not available at the moment 125 "test_plot_kde" 126 "test_plot_kde_2d" 127 "test_plot_pair" 128 ]; 129 130 # Tests segfault on darwin 131 doCheck = !stdenv.hostPlatform.isDarwin; 132 133 pythonImportsCheck = [ "arviz" ]; 134 135 meta = { 136 description = "Library for exploratory analysis of Bayesian models"; 137 homepage = "https://arviz-devs.github.io/arviz/"; 138 changelog = "https://github.com/arviz-devs/arviz/blob/${finalAttrs.src.tag}/CHANGELOG.md"; 139 license = lib.licenses.asl20; 140 maintainers = with lib.maintainers; [ omnipotententity ]; 141 }; 142})