Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / qgrid / default.nix
blobf5758c3182d9181a5457c9dbe2d4da8bcd246838
1 { lib
2 , buildPythonPackage
3 , fetchpatch
4 , fetchPypi
5 , ipywidgets
6 , notebook
7 , pandas
8 , pytestCheckHook
9 }:
11 buildPythonPackage rec {
12   pname = "qgrid";
13   version = "1.3.1";
15   src = fetchPypi {
16     inherit pname version;
17     sha256 = "sha256-/or1tQgzCE3AtqJlzRrHuDfAPA+FIRUBY1YNzneNcRw=";
18   };
20   patches = [
21     # Fixes compatibility of qgrid with ipywidgets >= 8.0.0
22     # See https://github.com/quantopian/qgrid/pull/331
23     (fetchpatch {
24       url = "https://github.com/quantopian/qgrid/pull/331/commits/8cc50d5117d4208a9dd672418021c59898e2d1b2.patch";
25       hash = "sha256-+NLz4yBUGUXKyukPVE4PehenPzjnfljR5RAX7CEtpV4=";
26     })
27   ];
29   propagatedBuildInputs = [
30     ipywidgets
31     notebook
32     pandas
33   ];
35   nativeCheckInputs = [
36     pytestCheckHook
37   ];
39   # Those tests are also failing upstream
40   disabledTests = [
41     "test_edit_date"
42     "test_edit_multi_index_df"
43     "test_multi_index"
44     "test_period_object_column"
45     # probably incompatible with pandas>=2.1
46     "test_add_row_button"
47   ];
49   pythonImportsCheck = [ "qgrid" ];
51   meta = with lib; {
52     description = "An interactive grid for sorting, filtering, and editing DataFrames in Jupyter notebooks";
53     homepage = "https://github.com/quantopian/qgrid";
54     license = licenses.asl20;
55     maintainers = with maintainers; [ GaetanLepage ];
56   };