Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
4.7 kB · 227 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228{ 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" ];
ibisTestingData = fetchFromGitHub { name = "ibis-testing-data"; owner = "ibis-project"; repo = "testing-data"; # 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 = "9.1.0"; pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub { name = "ibis-source"; repo = "ibis"; owner = "ibis-project"; rev = "refs/tags/${version}"; hash = "sha256-GmzmXzYMs7K7B//is3ZoD4muPAkb0tM56zFBbsA+NEo="; };
nativeBuildInputs = [ poetry-core poetry-dynamic-versioning ];
dontBypassPoetryDynamicVersioning = true; env.POETRY_DYNAMIC_VERSIONING_BYPASS = lib.head (lib.strings.splitString "-" version);
propagatedBuildInputs = [ atpublic bidict multipledispatch numpy pandas parsy pyarrow pyarrow-hotfix python-dateutil pytz rich sqlglot toolz typing-extensions ];
nativeCheckInputs = [ pytestCheckHook black filelock hypothesis pytest-benchmark pytest-httpserver pytest-mock pytest-randomly pytest-snapshot pytest-timeout pytest-xdist ] ++ lib.concatMap (name: passthru.optional-dependencies.${name}) testBackends;
pytestFlagsArray = [ "--dist=loadgroup" "-m" "'${lib.concatStringsSep " or " testBackends} or core'" ];
disabledTests = [ # tries to download duckdb extensions "test_attach_sqlite" "test_connect_extensions" "test_load_extension" "test_read_sqlite" "test_register_sqlite" # requires network connection "test_s3_403_fallback" # requires pytest 8.2+ "test_roundtrip_delta" ];
# patch out tests that check formatting with black postPatch = '' find ibis/tests -type f -name '*.py' -exec sed -i \ -e '/^ *assert_decompile_roundtrip/d' \ -e 's/^\( *\)code = ibis.decompile(expr, format=True)/\1code = ibis.decompile(expr)/g' {} + '';
preCheck = '' HOME="$TMPDIR" export IBIS_TEST_DATA_DIRECTORY="ci/ibis-testing-data"
# copy the test data to a directory ln -s "${ibisTestingData}" "$IBIS_TEST_DATA_DIRECTORY" '';
postCheck = '' rm -r "$IBIS_TEST_DATA_DIRECTORY" '';
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 ]; dask = [ dask regex packaging ]; datafusion = [ datafusion ]; druid = [ pydruid ]; duckdb = [ duckdb ]; flink = [ ]; 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; }; };
meta = with lib; { description = "Productivity-centric Python Big Data Framework"; homepage = "https://github.com/ibis-project/ibis"; changelog = "https://github.com/ibis-project/ibis/blob/${version}/docs/release_notes.md"; license = licenses.asl20; maintainers = with maintainers; [ cpcloud ]; };}