Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

90 lines
1.8 KiB
Nix

{
lib,
buildPythonPackage,
dask,
duckdb,
fetchFromGitHub,
hatchling,
hypothesis,
ibis-framework,
packaging,
pandas,
polars,
pyarrow-hotfix,
pyarrow,
pyspark,
pytest-env,
pytestCheckHook,
rich,
sqlframe,
}:
buildPythonPackage rec {
pname = "narwhals";
version = "2.6.0";
pyproject = true;
src = fetchFromGitHub {
owner = "narwhals-dev";
repo = "narwhals";
tag = "v${version}";
hash = "sha256-peD5CLp5YCLPrOmXnoezT+gAJLf7zSb0xdhV+PhC/XI=";
};
build-system = [ hatchling ];
optional-dependencies = {
# cudf = [ cudf ];
dask = [ dask ] ++ dask.optional-dependencies.dataframe;
# modin = [ modin ];
pandas = [ pandas ];
polars = [ polars ];
pyarrow = [ pyarrow ];
pyspark = [ pyspark ];
ibis = [
ibis-framework
rich
packaging
pyarrow-hotfix
];
sqlframe = [ sqlframe ];
};
nativeCheckInputs = [
duckdb
hypothesis
pytest-env
pytestCheckHook
]
++ lib.flatten (builtins.attrValues optional-dependencies);
pythonImportsCheck = [ "narwhals" ];
disabledTests = [
# Flaky
"test_rolling_var_hypothesis"
# Missing file
"test_pyspark_connect_deps_2517"
# Timezone issue
"test_to_datetime"
"test_unary_two_elements"
# Test requires pyspark binary
"test_datetime_w_tz_pyspark"
"test_convert_time_zone_to_connection_tz_pyspark"
"test_replace_time_zone_to_connection_tz_pyspark"
"test_lazy"
];
pytestFlags = [
"-Wignore::DeprecationWarning"
];
meta = {
description = "Lightweight and extensible compatibility layer between dataframe libraries";
homepage = "https://github.com/narwhals-dev/narwhals";
changelog = "https://github.com/narwhals-dev/narwhals/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}