1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pythonOlder, 7 8 geopandas, 9 libpysal, 10 matplotlib, 11 networkx, 12 numpy, 13 pandas, 14 scikit-learn, 15 scipy, 16 setuptools-scm, 17}: 18 19buildPythonPackage rec { 20 pname = "mapclassify"; 21 version = "2.10.0"; 22 pyproject = true; 23 disabled = pythonOlder "3.9"; 24 25 src = fetchFromGitHub { 26 owner = "pysal"; 27 repo = "mapclassify"; 28 tag = "v${version}"; 29 hash = "sha256-OQpDrxa0zRPDAdyS6KP5enb/JZwbYoXTV8kUijV3tNM="; 30 }; 31 32 build-system = [ setuptools-scm ]; 33 34 propagatedBuildInputs = [ 35 networkx 36 numpy 37 pandas 38 scikit-learn 39 scipy 40 ]; 41 42 nativeCheckInputs = [ 43 pytestCheckHook 44 geopandas 45 libpysal 46 matplotlib 47 ]; 48 49 # requires network access 50 disabledTestPaths = [ 51 # this module does http requests *at import time* 52 "mapclassify/tests/test_greedy.py" 53 # depends on remote data 54 "mapclassify/tests/test_rgba.py" 55 ]; 56 57 disabledTests = [ 58 # depends on remote datasets 59 "test_legendgram_map" 60 "test_legendgram_most_recent_cmap" 61 ]; 62 63 pythonImportsCheck = [ "mapclassify" ]; 64 65 meta = { 66 description = "Classification Schemes for Choropleth Maps"; 67 homepage = "https://pysal.org/mapclassify/"; 68 changelog = "https://github.com/pysal/mapclassify/releases/tag/${src.tag}"; 69 license = lib.licenses.bsd3; 70 teams = [ lib.teams.geospatial ]; 71 }; 72}