evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / jupysql / default.nix
blob01fa1c0f31634f6817db569c7b3b7ad612c82034
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   setuptools,
9   # dependencies
10   ipython-genutils,
11   jinja2,
12   jupysql-plugin,
13   ploomber-core,
14   prettytable,
15   sqlalchemy,
16   sqlglot,
17   sqlparse,
19   # optional-dependencies
20   duckdb,
21   duckdb-engine,
22   grpcio,
23   ipython,
24   ipywidgets,
25   matplotlib,
26   numpy,
27   pandas,
28   polars,
29   pyarrow,
30   pyspark,
32   # tests
33   pytestCheckHook,
34   psutil,
37 buildPythonPackage rec {
38   pname = "jupysql";
39   version = "0.10.13";
41   pyproject = true;
43   src = fetchFromGitHub {
44     owner = "ploomber";
45     repo = "jupysql";
46     rev = "refs/tags/${version}";
47     hash = "sha256-vNuMGHFkatJS5KjxaOBwZ7JolIDAdYqGq3JNKSV2fKE=";
48   };
50   pythonRelaxDeps = [ "sqlalchemy" ];
52   build-system = [ setuptools ];
54   dependencies = [
55     ipython-genutils
56     jinja2
57     jupysql-plugin
58     ploomber-core
59     prettytable
60     sqlalchemy
61     sqlglot
62     sqlparse
63   ];
65   optional-dependencies.dev = [
66     duckdb
67     duckdb-engine
68     grpcio
69     ipython
70     ipywidgets
71     matplotlib
72     numpy
73     pandas
74     polars
75     pyarrow
76     pyspark
77   ];
79   nativeCheckInputs = [
80     pytestCheckHook
81     psutil
82   ] ++ optional-dependencies.dev;
84   disabledTests = [
85     # AttributeError: 'DataFrame' object has no attribute 'frame_equal'
86     "test_resultset_polars_dataframe"
87     # all of these are broken with later versions of duckdb; see
88     # https://github.com/ploomber/jupysql/issues/1030
89     "test_resultset_getitem"
90     "test_resultset_dict"
91     "test_resultset_len"
92     "test_resultset_dicts"
93     "test_resultset_dataframe"
94     "test_resultset_csv"
95     "test_resultset_str"
96     "test_resultset_repr_html_when_feedback_is_2"
97     "test_resultset_repr_html_with_reduced_feedback"
98     "test_invalid_operation_error"
99     "test_resultset_config_autolimit_dict"
100     # fails due to strict warnings
101     "test_calling_legacy_plotting_functions_displays_warning"
102   ];
104   disabledTestPaths = [
105     # require docker
106     "src/tests/integration"
108     # require network access
109     "src/tests/test_telemetry.py"
111     # want to download test data from the network
112     "src/tests/test_parse.py"
113     "src/tests/test_ggplot.py"
114     "src/tests/test_plot.py"
115     "src/tests/test_magic.py"
116     "src/tests/test_magic_plot.py"
118     # require js2py (which is unmaintained and insecure)
119     "src/tests/test_widget.py"
120   ];
122   preCheck = ''
123     # tests need to write temp data
124     export HOME=$(mktemp -d)
125   '';
127   pythonImportsCheck = [ "sql" ];
129   meta = {
130     description = "Better SQL in Jupyter";
131     homepage = "https://github.com/ploomber/jupysql";
132     changelog = "https://github.com/ploomber/jupysql/blob/${version}/CHANGELOG.md";
133     license = lib.licenses.asl20;
134     maintainers = with lib.maintainers; [ pacien ];
135   };