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