Merge pull request #246170 from cpcloud/bump-ibis-framework
python3Packages.ibis-framework: 5.1.0 -> 6.0.0
This commit is contained in:
commit
3537471ce2
|
@ -0,0 +1,85 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
# build_requires
|
||||
, cython_3
|
||||
# install_requires
|
||||
, certifi
|
||||
, importlib-metadata
|
||||
, urllib3
|
||||
, pytz
|
||||
, zstandard
|
||||
, lz4
|
||||
# extras_require
|
||||
, sqlalchemy
|
||||
, numpy
|
||||
, pandas
|
||||
, pyarrow
|
||||
, orjson
|
||||
# not in tests_require, but should be
|
||||
, pytest-dotenv
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "clickhouse-connect";
|
||||
version = "0.6.8";
|
||||
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "clickhouse-connect";
|
||||
owner = "ClickHouse";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-T1vUXhOngPvA4wrg5jVzIiqj0B0gEnk/BS5OdopHgkA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cython_3 ];
|
||||
setupPyBuildFlags = [ "--inplace" ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
certifi
|
||||
importlib-metadata
|
||||
urllib3
|
||||
pytz
|
||||
zstandard
|
||||
lz4
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook pytest-dotenv ]
|
||||
++ passthru.optional-dependencies.sqlalchemy
|
||||
++ passthru.optional-dependencies.numpy;
|
||||
|
||||
# these tests require a running clickhouse instance
|
||||
disabledTestPaths = [
|
||||
"tests/integration_tests"
|
||||
"tests/tls"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"clickhouse_connect"
|
||||
"clickhouse_connect.driverc.buffer"
|
||||
"clickhouse_connect.driverc.dataconv"
|
||||
"clickhouse_connect.driverc.npconv"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
optional-dependencies = {
|
||||
sqlalchemy = [ sqlalchemy ];
|
||||
numpy = [ numpy ];
|
||||
pandas = [ pandas ];
|
||||
arrow = [ pyarrow ];
|
||||
orjson = [ orjson ];
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "ClickHouse Database Core Driver for Python, Pandas, and Superset";
|
||||
homepage = "https://github.com/ClickHouse/clickhouse-connect";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ cpcloud ];
|
||||
};
|
||||
}
|
|
@ -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
|
||||
|
@ -66,60 +63,55 @@ let
|
|||
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
|
||||
];
|
||||
|
||||
POETRY_DYNAMIC_VERSIONING_BYPASS = version;
|
||||
|
||||
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 +119,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
|
||||
|
@ -164,15 +141,11 @@ buildPythonPackage rec {
|
|||
'';
|
||||
|
||||
preCheck = ''
|
||||
set -eo pipefail
|
||||
|
||||
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 ];
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "sqlglot";
|
||||
version = "16.3.1";
|
||||
version = "17.14.2";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
|
@ -17,7 +17,7 @@ buildPythonPackage rec {
|
|||
repo = "sqlglot";
|
||||
owner = "tobymao";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-EN5ocyXCZaWE1BaC2eDg41+o5BoHAog1372b9rc2IDM=";
|
||||
hash = "sha256-aImshQ5jf0k62ucpK4X8G7uHGAFQkhGgjMYo4mvSvew=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
|
|
@ -1993,6 +1993,8 @@ self: super: with self; {
|
|||
|
||||
clickhouse-cli = callPackage ../development/python-modules/clickhouse-cli { };
|
||||
|
||||
clickhouse-connect = callPackage ../development/python-modules/clickhouse-connect { };
|
||||
|
||||
clickhouse-driver = callPackage ../development/python-modules/clickhouse-driver { };
|
||||
|
||||
cliff = callPackage ../development/python-modules/cliff { };
|
||||
|
|
Loading…
Reference in a new issue