python3Packages.ibis-framework: 5.1.0 -> 6.0.0

This commit is contained in:
Phillip Cloud 2023-07-26 08:21:26 -04:00
parent ad53346987
commit 04146ce1c4
No known key found for this signature in database
GPG key ID: D908212070FD785E

View file

@ -1,14 +1,12 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pythonOlder
, pytestCheckHook
, atpublic
, bidict
, black
, clickhouse-cityhash
, clickhouse-driver
, clickhouse-connect
, dask
, datafusion
, db-dtypes
@ -21,14 +19,14 @@
, google-cloud-bigquery-storage
, graphviz-nox
, hypothesis
, importlib-resources
, lz4
, multipledispatch
, numpy
, oracledb
, packaging
, pandas
, parsy
, poetry-core
, poetry-dynamic-versioning
, polars
, pooch
, psycopg2
@ -47,7 +45,6 @@
, pytz
, regex
, rich
, rsync
, shapely
, snowflake-connector-python
, snowflake-sqlalchemy
@ -60,66 +57,59 @@
, typing-extensions
}:
let
testBackends = [ "datafusion" "duckdb" "pandas" "sqlite" ];
testBackends = [ "dask" "datafusion" "duckdb" "pandas" "polars" "sqlite" ];
ibisTestingData = fetchFromGitHub {
name = "ibis-testing-data";
owner = "ibis-project";
repo = "testing-data";
rev = "8a59df99c01fa217259554929543e71c3bbb1761";
hash = "sha256-NbgEe0w/qf9hCr9rRfIpyaH9pv25I8x0ykY7EJxDOuk=";
rev = "2b3968deaa1a28791b2901dbbcc9bfd3d2f23e9b";
hash = "sha256-q1b5IcOl5oIFXP7/P5RufncjHEVrWp4NjoU2uo/BE9U=";
};
in
buildPythonPackage rec {
pname = "ibis-framework";
version = "5.1.0";
version = "6.0.0";
format = "pyproject";
disabled = pythonOlder "3.8";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
name = "ibis-source";
repo = "ibis";
owner = "ibis-project";
rev = "refs/tags/${version}";
hash = "sha256-u3BBGdhWajZ5WtoBvNxmx76+orfHY6LX3IWAq/x2/9A=";
hash = "sha256-qIxacrRSN/Il9cY6ZsOiYLPyxI20aI+DyDM0/9jr654=";
};
patches = [
# fixes a small bug in the datafusion backend to reorder predicates
(fetchpatch {
name = "fix-datafusion-compilation.patch";
url = "https://github.com/ibis-project/ibis/commit/009230421b2bc1f86591e8b850d37a489e8e4f06.patch";
hash = "sha256-5NHkgc8d2bkOMpbY1vme1XgNfyHSr0f7BrR3JTTjjPI=";
})
];
nativeBuildInputs = [
poetry-core
poetry-dynamic-versioning
];
propagatedBuildInputs = [
atpublic
bidict
filelock
multipledispatch
numpy
pandas
parsy
pooch
pyarrow
python-dateutil
pytz
rich
sqlglot
toolz
typing-extensions
] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ]
]
++ pooch.optional-dependencies.progress
++ pooch.optional-dependencies.xxhash;
nativeCheckInputs = [
pytestCheckHook
filelock
hypothesis
pytest-benchmark
pytest-httpserver
@ -127,32 +117,17 @@ buildPythonPackage rec {
pytest-randomly
pytest-snapshot
pytest-xdist
rsync
] ++ lib.concatMap (name: passthru.optional-dependencies.${name}) testBackends;
pytestFlagsArray = [
"--dist=loadgroup"
"-m"
"'${lib.concatStringsSep " or " testBackends} or core'"
# sqlalchemy2 breakage
# breakage from sqlalchemy2 truediv changes
"--deselect=ibis/tests/sql/test_sqlalchemy.py::test_tpc_h17"
# tries to download duckdb extensions
"--deselect=ibis/backends/duckdb/tests/test_register.py::test_register_sqlite"
"--deselect=ibis/backends/duckdb/tests/test_register.py::test_read_sqlite"
# all the following tests are fixed in the next release (6.0.0)
"--deselect=ibis/backends/tests/test_export.py::test_column_to_pyarrow_table_schema"
"--deselect=ibis/backends/tests/test_export.py::test_table_to_pyarrow_batches"
"--deselect=ibis/backends/tests/test_export.py::test_column_to_pyarrow_batches"
"--deselect=ibis/backends/tests/test_export.py::test_to_pyarrow_batches_memtable"
"--deselect=ibis/backends/tests/test_export.py::test_table_to_pyarrow_table_schema"
"--deselect=ibis/backends/tests/test_export.py::test_to_pyarrow_batches_borked_types"
"--deselect=ibis/backends/tests/test_export.py::test_table_pyarrow_batch_chunk_size"
"--deselect=ibis/backends/tests/test_export.py::test_column_pyarrow_batch_chunk_size"
"--deselect=ibis/backends/tests/test_export.py::test_roundtrip_partitioned_parquet"
"--deselect=ibis/tests/sql/test_sqlalchemy.py::test_order_by"
"--deselect=ibis/tests/sql/test_sqlalchemy.py::test_no_cart_join"
"--deselect=ibis/backends/tests/test_temporal.py::test_temporal_binop"
"--deselect=ibis/backends/tests/test_temporal.py::test_interval_literal"
];
# patch out tests that check formatting with black
@ -169,10 +144,8 @@ buildPythonPackage rec {
HOME="$TMPDIR"
export IBIS_TEST_DATA_DIRECTORY="ci/ibis-testing-data"
mkdir -p "$IBIS_TEST_DATA_DIRECTORY"
# copy the test data to a directory
rsync --chmod=Du+rwx,Fu+rw --archive "${ibisTestingData}/" "$IBIS_TEST_DATA_DIRECTORY"
ln -s "${ibisTestingData}" "$IBIS_TEST_DATA_DIRECTORY"
'';
postCheck = ''
@ -186,17 +159,19 @@ buildPythonPackage rec {
passthru = {
optional-dependencies = {
bigquery = [ db-dtypes google-cloud-bigquery google-cloud-bigquery-storage pydata-google-auth ];
clickhouse = [ clickhouse-cityhash clickhouse-driver lz4 sqlalchemy ];
dask = [ dask pyarrow regex ];
clickhouse = [ clickhouse-connect sqlalchemy ];
dask = [ dask regex ];
datafusion = [ datafusion ];
druid = [ pydruid sqlalchemy ];
duckdb = [ duckdb duckdb-engine packaging pyarrow sqlalchemy sqlalchemy-views ];
duckdb = [ duckdb duckdb-engine packaging sqlalchemy sqlalchemy-views ];
flink = [ ];
geospatial = [ geoalchemy2 geopandas shapely ];
mysql = [ sqlalchemy pymysql sqlalchemy-views ];
oracle = [ sqlalchemy oracledb packaging sqlalchemy-views ];
pandas = [ regex ];
polars = [ polars pyarrow ];
polars = [ polars ];
postgres = [ psycopg2 sqlalchemy sqlalchemy-views ];
pyspark = [ pyarrow pyspark sqlalchemy ];
pyspark = [ pyspark sqlalchemy ];
snowflake = [ snowflake-connector-python snowflake-sqlalchemy sqlalchemy-views ];
sqlite = [ regex sqlalchemy sqlite sqlalchemy-views ];
trino = [ trino-python-client sqlalchemy sqlalchemy-views ];