Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.9 kB · 89 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990{ 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.4.0"; pyproject = true;
src = fetchFromGitHub { owner = "narwhals-dev"; repo = "narwhals"; tag = "v${version}"; hash = "sha256-ReF/6UNxxeQd4RspzmauEUJGaI1kY3hMPNYSDg8ZP2w="; };
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 ]; };}