18 , google-cloud-bigquery
19 , google-cloud-bigquery-storage
30 , poetry-dynamic-versioning
51 , snowflake-connector-python
52 , snowflake-sqlalchemy
62 testBackends = [ "datafusion" "duckdb" "pandas" "sqlite" ];
64 ibisTestingData = fetchFromGitHub {
65 name = "ibis-testing-data";
66 owner = "ibis-project";
67 repo = "testing-data";
68 # https://github.com/ibis-project/ibis/blob/8.0.0/nix/overlay.nix#L20-L26
69 rev = "2c6a4bb5d5d525058d8d5b2312a9fee5dafc5476";
70 hash = "sha256-Lq503bqh9ESZJSk6yVq/uZwkAubzmSmoTBZSsqMm0DY=";
74 buildPythonPackage rec {
75 pname = "ibis-framework";
79 disabled = pythonOlder "3.9";
81 src = fetchFromGitHub {
84 owner = "ibis-project";
85 rev = "refs/tags/${version}";
86 hash = "sha256-KcNZslqmSbu8uPYKpkyvd7d8Fsf0nQt80y0auXsI8fs=";
91 poetry-dynamic-versioning
94 POETRY_DYNAMIC_VERSIONING_BYPASS = version;
96 propagatedBuildInputs = [
113 nativeCheckInputs = [
124 ] ++ lib.concatMap (name: passthru.optional-dependencies.${name}) testBackends;
129 "'${lib.concatStringsSep " or " testBackends} or core'"
133 # breakage from sqlalchemy2 truediv changes
135 # tries to download duckdb extensions
136 "test_register_sqlite"
138 # duckdb does not respect sample_size=2 (reads 3 lines of csv).
139 "test_csv_reregister_schema"
141 # "This function can not be called with an active transaction!, commit or abort the existing one first"
142 "test_vectorized_udf"
143 "test_s3_403_fallback"
149 # pluggy.PluggyTeardownRaisedWarning
150 "test_repr_png_is_not_none_in_not_interactive"
151 "test_interval_arithmetic"
154 # patch out tests that check formatting with black
156 find ibis/tests -type f -name '*.py' -exec sed -i \
157 -e '/^ *assert_decompile_roundtrip/d' \
158 -e 's/^\( *\)code = ibis.decompile(expr, format=True)/\1code = ibis.decompile(expr)/g' {} +
163 export IBIS_TEST_DATA_DIRECTORY="ci/ibis-testing-data"
165 # copy the test data to a directory
166 ln -s "${ibisTestingData}" "$IBIS_TEST_DATA_DIRECTORY"
170 rm -r "$IBIS_TEST_DATA_DIRECTORY"
173 pythonImportsCheck = [
175 ] ++ map (backend: "ibis.backends.${backend}") testBackends;
178 optional-dependencies = {
179 bigquery = [ db-dtypes google-cloud-bigquery google-cloud-bigquery-storage pydata-google-auth ];
180 clickhouse = [ clickhouse-connect sqlalchemy ];
181 dask = [ dask regex ];
182 datafusion = [ datafusion ];
183 druid = [ pydruid sqlalchemy ];
184 duckdb = [ duckdb duckdb-engine sqlalchemy sqlalchemy-views ];
186 geospatial = [ geoalchemy2 geopandas shapely ];
187 mssql = [ sqlalchemy pyodbc sqlalchemy-views ];
188 mysql = [ sqlalchemy pymysql sqlalchemy-views ];
189 oracle = [ sqlalchemy oracledb packaging sqlalchemy-views ];
191 polars = [ polars packaging ];
192 postgres = [ psycopg2 sqlalchemy sqlalchemy-views ];
193 pyspark = [ pyspark sqlalchemy packaging ];
194 snowflake = [ snowflake-connector-python snowflake-sqlalchemy sqlalchemy-views packaging ];
195 sqlite = [ regex sqlalchemy sqlalchemy-views ];
196 trino = [ trino-python-client sqlalchemy sqlalchemy-views ];
197 visualization = [ graphviz ];
198 decompiler = [ black ];
199 examples = [ pins ] ++ pins.optional-dependencies.gcs;
204 description = "Productivity-centric Python Big Data Framework";
205 homepage = "https://github.com/ibis-project/ibis";
206 changelog = "https://github.com/ibis-project/ibis/blob/${version}/docs/release_notes.md";
207 license = licenses.asl20;
208 maintainers = with maintainers; [ cpcloud ];