at master 2.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 setuptools-scm, 9 10 # dependencies 11 lazy-loader, 12 matplotlib, 13 14 # tests 15 pytestCheckHook, 16 anywidget, 17 graphviz, 18 h5py, 19 ipympl, 20 ipywidgets, 21 mpltoolbox, 22 pandas, 23 plotly, 24 pooch, 25 pyarrow, 26 pythreejs, 27 scipp, 28 scipy, 29 xarray, 30 31 # tests data 32 symlinkJoin, 33 fetchurl, 34}: 35 36buildPythonPackage rec { 37 pname = "plopp"; 38 version = "25.09.0"; 39 pyproject = true; 40 41 src = fetchFromGitHub { 42 owner = "scipp"; 43 repo = "plopp"; 44 tag = version; 45 hash = "sha256-4qC+2FlbnhlJkXX0aDaxIVKi9Cf47x8ml9o5pY0Kiv4="; 46 }; 47 48 build-system = [ 49 setuptools 50 setuptools-scm 51 ]; 52 53 dependencies = [ 54 lazy-loader 55 matplotlib 56 ]; 57 58 nativeCheckInputs = [ 59 pytestCheckHook 60 anywidget 61 graphviz 62 h5py 63 ipympl 64 ipywidgets 65 mpltoolbox 66 pandas 67 plotly 68 pooch 69 pyarrow 70 pythreejs 71 scipp 72 scipy 73 xarray 74 ]; 75 76 env = { 77 # See: https://github.com/scipp/plopp/blob/25.05.0/src/plopp/data/examples.py 78 PLOPP_DATA_DIR = 79 let 80 # NOTE this might be changed by upstream in the future. 81 _version = "1"; 82 in 83 symlinkJoin { 84 name = "plopp-test-data"; 85 paths = 86 lib.mapAttrsToList 87 ( 88 file: hash: 89 fetchurl { 90 url = "https://public.esss.dk/groups/scipp/plopp/${_version}/${file}"; 91 inherit hash; 92 downloadToTemp = true; 93 recursiveHash = true; 94 postFetch = '' 95 mkdir -p $out/${_version} 96 mv $downloadedFile $out/${_version}/${file} 97 ''; 98 } 99 ) 100 { 101 "nyc_taxi_data.h5" = "sha256-hso8ESM+uLRf4y2CW/7dpAmm/kysAfJY3b+5vz78w4Q="; 102 "teapot.h5" = "sha256-i6hOw72ce1cBT6FMQTdCEKVe0WOMOjApKperGHoPW34="; 103 }; 104 }; 105 }; 106 107 pythonImportsCheck = [ 108 "plopp" 109 ]; 110 111 meta = { 112 description = "Visualization library for scipp"; 113 homepage = "https://scipp.github.io/plopp/"; 114 license = lib.licenses.bsd3; 115 maintainers = with lib.maintainers; [ doronbehar ]; 116 }; 117}