diff options
Diffstat (limited to 'pkgs/development/python-modules/ibis-framework/default.nix')
-rw-r--r-- | pkgs/development/python-modules/ibis-framework/default.nix | 221 |
1 files changed, 119 insertions, 102 deletions
diff --git a/pkgs/development/python-modules/ibis-framework/default.nix b/pkgs/development/python-modules/ibis-framework/default.nix index c6d68d83dbff2..abaabb11f1bb1 100644 --- a/pkgs/development/python-modules/ibis-framework/default.nix +++ b/pkgs/development/python-modules/ibis-framework/default.nix @@ -1,89 +1,91 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, pythonOlder -, pytestCheckHook -, atpublic -, bidict -, black -, clickhouse-connect -, dask -, datafusion -, db-dtypes -, duckdb -, duckdb-engine -, filelock -, geoalchemy2 -, geopandas -, google-cloud-bigquery -, google-cloud-bigquery-storage -, graphviz -, hypothesis -, multipledispatch -, numpy -, oracledb -, packaging -, pandas -, parsy -, pins -, poetry-core -, poetry-dynamic-versioning -, polars -, psycopg2 -, pyarrow -, pyarrow-hotfix -, pydata-google-auth -, pydruid -, pymysql -, pyodbc -, pyspark -, pytest-benchmark -, pytest-httpserver -, pytest-mock -, pytest-randomly -, pytest-snapshot -, pytest-xdist -, python-dateutil -, pytz -, regex -, rich -, shapely -, snowflake-connector-python -, snowflake-sqlalchemy -, sqlalchemy -, sqlalchemy-views -, sqlglot -, sqlite -, toolz -, trino-python-client -, typing-extensions +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + pytestCheckHook, + atpublic, + bidict, + black, + clickhouse-connect, + dask, + datafusion, + db-dtypes, + duckdb, + filelock, + geopandas, + google-cloud-bigquery, + google-cloud-bigquery-storage, + graphviz, + hypothesis, + multipledispatch, + numpy, + oracledb, + packaging, + pandas, + parsy, + pins, + poetry-core, + poetry-dynamic-versioning, + polars, + psycopg2, + pyarrow, + pyarrow-hotfix, + pydata-google-auth, + pydruid, + pymysql, + pyodbc, + pyspark, + pytest-benchmark, + pytest-httpserver, + pytest-mock, + pytest-randomly, + pytest-snapshot, + pytest-timeout, + pytest-xdist, + python-dateutil, + pytz, + regex, + rich, + shapely, + snowflake-connector-python, + sqlglot, + sqlite, + toolz, + trino-python-client, + typing-extensions, }: let - testBackends = [ "datafusion" "duckdb" "pandas" "sqlite" ]; + testBackends = [ + "datafusion" + "duckdb" + "pandas" + "sqlite" + ]; ibisTestingData = fetchFromGitHub { name = "ibis-testing-data"; owner = "ibis-project"; repo = "testing-data"; - # https://github.com/ibis-project/ibis/blob/8.0.0/nix/overlay.nix#L20-L26 - rev = "2c6a4bb5d5d525058d8d5b2312a9fee5dafc5476"; - hash = "sha256-Lq503bqh9ESZJSk6yVq/uZwkAubzmSmoTBZSsqMm0DY="; + # https://github.com/ibis-project/ibis/blob/9.1.0/nix/overlay.nix#L20-L26 + rev = "6737d1cb5951cabaccd095a3ae62a93dbd11ecb9"; + hash = "sha256-MoVTZPWh4KVlrICYACrgfeLdl/fqoa1iweNg3zUtdrs="; }; in buildPythonPackage rec { pname = "ibis-framework"; - version = "8.0.0"; + version = "9.1.0"; pyproject = true; - disabled = pythonOlder "3.9"; + disabled = pythonOlder "3.10"; src = fetchFromGitHub { name = "ibis-source"; repo = "ibis"; owner = "ibis-project"; rev = "refs/tags/${version}"; - hash = "sha256-KcNZslqmSbu8uPYKpkyvd7d8Fsf0nQt80y0auXsI8fs="; + hash = "sha256-GmzmXzYMs7K7B//is3ZoD4muPAkb0tM56zFBbsA+NEo="; }; nativeBuildInputs = [ @@ -91,7 +93,8 @@ buildPythonPackage rec { poetry-dynamic-versioning ]; - POETRY_DYNAMIC_VERSIONING_BYPASS = version; + dontBypassPoetryDynamicVersioning = true; + env.POETRY_DYNAMIC_VERSIONING_BYPASS = lib.head (lib.strings.splitString "-" version); propagatedBuildInputs = [ atpublic @@ -120,6 +123,7 @@ buildPythonPackage rec { pytest-mock pytest-randomly pytest-snapshot + pytest-timeout pytest-xdist ] ++ lib.concatMap (name: passthru.optional-dependencies.${name}) testBackends; @@ -130,25 +134,16 @@ buildPythonPackage rec { ]; disabledTests = [ - # breakage from sqlalchemy2 truediv changes - "test_tpc_h17" # tries to download duckdb extensions - "test_register_sqlite" + "test_attach_sqlite" + "test_connect_extensions" + "test_load_extension" "test_read_sqlite" - # duckdb does not respect sample_size=2 (reads 3 lines of csv). - "test_csv_reregister_schema" - # duckdb fails with: - # "This function can not be called with an active transaction!, commit or abort the existing one first" - "test_vectorized_udf" + "test_register_sqlite" + # requires network connection "test_s3_403_fallback" - "test_map_merge_udf" - "test_udf" - "test_map_udf" - # DataFusion error - "datafusion" - # pluggy.PluggyTeardownRaisedWarning - "test_repr_png_is_not_none_in_not_interactive" - "test_interval_arithmetic" + # requires pytest 8.2+ + "test_roundtrip_delta" ]; # patch out tests that check formatting with black @@ -170,30 +165,52 @@ buildPythonPackage rec { rm -r "$IBIS_TEST_DATA_DIRECTORY" ''; - pythonImportsCheck = [ - "ibis" - ] ++ map (backend: "ibis.backends.${backend}") testBackends; + pythonImportsCheck = [ "ibis" ] ++ map (backend: "ibis.backends.${backend}") testBackends; passthru = { optional-dependencies = { - bigquery = [ db-dtypes google-cloud-bigquery google-cloud-bigquery-storage pydata-google-auth ]; - clickhouse = [ clickhouse-connect sqlalchemy ]; - dask = [ dask regex ]; + bigquery = [ + db-dtypes + google-cloud-bigquery + google-cloud-bigquery-storage + pydata-google-auth + ]; + clickhouse = [ clickhouse-connect ]; + dask = [ + dask + regex + packaging + ]; datafusion = [ datafusion ]; - druid = [ pydruid sqlalchemy ]; - duckdb = [ duckdb duckdb-engine sqlalchemy sqlalchemy-views ]; + druid = [ pydruid ]; + duckdb = [ duckdb ]; flink = [ ]; - geospatial = [ geoalchemy2 geopandas shapely ]; - mssql = [ sqlalchemy pyodbc sqlalchemy-views ]; - mysql = [ sqlalchemy pymysql sqlalchemy-views ]; - oracle = [ sqlalchemy oracledb packaging sqlalchemy-views ]; - pandas = [ regex ]; - polars = [ polars packaging ]; - postgres = [ psycopg2 sqlalchemy sqlalchemy-views ]; - pyspark = [ pyspark sqlalchemy packaging ]; - snowflake = [ snowflake-connector-python snowflake-sqlalchemy sqlalchemy-views packaging ]; - sqlite = [ regex sqlalchemy sqlalchemy-views ]; - trino = [ trino-python-client sqlalchemy sqlalchemy-views ]; + geospatial = [ + geopandas + shapely + ]; + mssql = [ pyodbc ]; + mysql = [ pymysql ]; + oracle = [ + oracledb + packaging + ]; + pandas = [ + regex + packaging + ]; + polars = [ + polars + packaging + ]; + postgres = [ psycopg2 ]; + pyspark = [ + pyspark + packaging + ]; + snowflake = [ snowflake-connector-python ]; + sqlite = [ regex ]; + trino = [ trino-python-client ]; visualization = [ graphviz ]; decompiler = [ black ]; examples = [ pins ] ++ pins.optional-dependencies.gcs; |