Merge pull request #171375 from cpcloud/ibis-framework-features

main
Sandro 2 years ago committed by GitHub
commit 638091701f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 54
      pkgs/development/python-modules/ibis-framework/default.nix

@ -5,37 +5,45 @@
, pytestCheckHook , pytestCheckHook
, atpublic , atpublic
, cached-property , cached-property
, clickhouse-driver
, click , click
, clickhouse-cityhash
, clickhouse-driver
, dask , dask
, datafusion , datafusion
, duckdb , duckdb
, duckdb-engine , duckdb-engine
, graphviz , geoalchemy2
, geopandas
, graphviz-nox
, importlib-metadata , importlib-metadata
, lz4
, multipledispatch , multipledispatch
, numpy , numpy
, packaging
, pandas , pandas
, parsy , parsy
, poetry-core , poetry-core
, poetry-dynamic-versioning , poetry-dynamic-versioning
, psycopg2
, pyarrow , pyarrow
, pydantic , pydantic
, pymysql
, pyspark
, pytest-benchmark , pytest-benchmark
, pytest-randomly
, pytest-mock , pytest-mock
, pytest-xdist , pytest-xdist
, python , python
, pytz , pytz
, regex , regex
, requests , shapely
, sqlalchemy , sqlalchemy
, sqlite , sqlite
, tabulate , tabulate
, toolz , toolz
}: }:
let let
# ignore tests for which dependencies are not available testBackends = [
backends = [
"dask" "dask"
"datafusion" "datafusion"
"duckdb" "duckdb"
@ -70,24 +78,16 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
atpublic atpublic
cached-property cached-property
clickhouse-driver
dask
datafusion
duckdb
duckdb-engine
graphviz
importlib-metadata importlib-metadata
multipledispatch multipledispatch
numpy numpy
packaging
pandas pandas
parsy parsy
poetry-dynamic-versioning poetry-dynamic-versioning
pyarrow
pydantic pydantic
pytz pytz
regex regex
requests
sqlalchemy
tabulate tabulate
toolz toolz
]; ];
@ -97,9 +97,9 @@ buildPythonPackage rec {
click click
pytest-benchmark pytest-benchmark
pytest-mock pytest-mock
pytest-randomly
pytest-xdist pytest-xdist
sqlite ] ++ lib.concatMap (name: passthru.extras-require.${name}) testBackends;
];
preBuild = '' preBuild = ''
# setup.py exists only for developer convenience and is automatically generated # setup.py exists only for developer convenience and is automatically generated
@ -109,7 +109,7 @@ buildPythonPackage rec {
pytestFlagsArray = [ pytestFlagsArray = [
"--dist=loadgroup" "--dist=loadgroup"
"-m" "-m"
"'${lib.concatStringsSep " or " backends} or core'" "'${lib.concatStringsSep " or " testBackends} or core'"
]; ];
preCheck = '' preCheck = ''
@ -125,7 +125,7 @@ buildPythonPackage rec {
find "$IBIS_TEST_DATA_DIRECTORY" -type f -exec chmod u+rw {} + find "$IBIS_TEST_DATA_DIRECTORY" -type f -exec chmod u+rw {} +
# load data # load data
for backend in ${lib.concatStringsSep " " backends}; do for backend in ${lib.concatStringsSep " " testBackends}; do
${python.interpreter} ci/datamgr.py load "$backend" ${python.interpreter} ci/datamgr.py load "$backend"
done done
''; '';
@ -136,7 +136,23 @@ buildPythonPackage rec {
pythonImportsCheck = [ pythonImportsCheck = [
"ibis" "ibis"
] ++ (map (backend: "ibis.backends.${backend}") backends); ] ++ map (backend: "ibis.backends.${backend}") testBackends;
passthru = {
extras-require = {
clickhouse = [ clickhouse-cityhash clickhouse-driver lz4 ];
dask = [ dask pyarrow ];
datafusion = [ datafusion ];
duckdb = [ duckdb duckdb-engine sqlalchemy ];
geospatial = [ geoalchemy2 geopandas shapely ];
mysql = [ pymysql sqlalchemy ];
pandas = [ ];
postgres = [ psycopg2 sqlalchemy ];
pyspark = [ pyarrow pyspark ];
sqlite = [ sqlalchemy sqlite ];
visualization = [ graphviz-nox ];
};
};
meta = with lib; { meta = with lib; {
description = "Productivity-centric Python Big Data Framework"; description = "Productivity-centric Python Big Data Framework";

Loading…
Cancel
Save