1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 setuptools-scm, 9 10 # dependencies 11 babel, 12 commonmark, 13 css-inline, 14 faicons, 15 htmltools, 16 importlib-metadata, 17 importlib-resources, 18 numpy, 19 typing-extensions, 20 21 # tests 22 ipykernel, 23 ipython, 24 pandas, 25 polars, 26 pyarrow, 27 pytestCheckHook, 28 pytest-cov-stub, 29 requests, 30 selenium, 31 shiny, 32 syrupy, 33}: 34 35buildPythonPackage rec { 36 pname = "great-tables"; 37 version = "0.18.0"; 38 pyproject = true; 39 40 src = fetchFromGitHub { 41 owner = "posit-dev"; 42 repo = "great-tables"; 43 tag = "v${version}"; 44 hash = "sha256-AuhcIQGBroWa2+Rg6qLTtB4ulq+vvCoouPcTZcZhnbQ="; 45 }; 46 47 build-system = [ 48 setuptools 49 setuptools-scm 50 ]; 51 52 dependencies = [ 53 babel 54 commonmark 55 css-inline 56 faicons 57 htmltools 58 importlib-metadata 59 importlib-resources 60 numpy 61 typing-extensions 62 ]; 63 64 pythonImportsCheck = [ "great_tables" ]; 65 66 nativeCheckInputs = [ 67 ipykernel 68 ipython 69 pandas 70 polars 71 pyarrow 72 pytestCheckHook 73 pytest-cov-stub 74 requests 75 selenium 76 shiny 77 syrupy 78 ]; 79 80 disabledTests = [ 81 # require selenium with chrome driver: 82 "test_save_custom_webdriver" 83 "test_save_image_file" 84 "test_save_non_png" 85 ]; 86 87 __darwinAllowLocalNetworking = true; 88 89 meta = { 90 description = "Library for rendering and formatting dataframes"; 91 homepage = "https://github.com/posit-dev/great-tables"; 92 changelog = "https://github.com/posit-dev/great-tables/releases/tag/${src.tag}"; 93 license = lib.licenses.mit; 94 maintainers = with lib.maintainers; [ bcdarwin ]; 95 }; 96}