summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/textual-fastdatatable/default.nix
blob: d97f7d3730f4073f9ca1ac3ffdae55f2f16ab9bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  pandas,
  pyarrow,
  pytz,
  textual,
  tzdata,
  polars,
  pytest-asyncio,
  pytest-textual-snapshot,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "textual-fastdatatable";
  version = "0.14.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "tconbeer";
    repo = "textual-fastdatatable";
    tag = "v${version}";
    hash = "sha256-gm1h+r8rZO1/9sXoNwqVuBbv7CpZm2a3YAMHRHGg5uo=";
  };

  build-system = [ hatchling ];

  dependencies = [
    pandas
    pyarrow
    pytz
    textual
    tzdata
  ]
  ++ textual.optional-dependencies.syntax;

  optional-dependencies = {
    polars = [ polars ];
  };

  nativeCheckInputs = [
    pytest-asyncio
    pytest-textual-snapshot
    pytestCheckHook
  ]
  ++ lib.concatAttrValues optional-dependencies;

  pythonRelaxDeps = [
    "numpy"
    "pyarrow"
  ];

  pythonImportsCheck = [ "textual_fastdatatable" ];

  disabledTestPaths = [
    # Tests are comparing CLI output
    "tests/snapshot_tests/test_snapshots.py"
  ];

  meta = {
    description = "Performance-focused reimplementation of Textual's DataTable widget, with a pluggable data storage backend";
    homepage = "https://github.com/tconbeer/textual-fastdatatable";
    changelog = "https://github.com/tconbeer/textual-fastdatatable/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pcboy ];
  };
}