diff --git a/pkgs/development/python-modules/formulaic/default.nix b/pkgs/development/python-modules/formulaic/default.nix index 7faabf98b3d6..c8a60523aa9f 100644 --- a/pkgs/development/python-modules/formulaic/default.nix +++ b/pkgs/development/python-modules/formulaic/default.nix @@ -1,59 +1,69 @@ { lib, - astor, buildPythonPackage, + pythonOlder, fetchFromGitHub, hatch-vcs, hatchling, interface-meta, + narwhals, numpy, pandas, - pytestCheckHook, - pythonOlder, scipy, - sympy, typing-extensions, wrapt, + pyarrow, + polars, + sympy, + pytestCheckHook, }: buildPythonPackage rec { pname = "formulaic"; - version = "1.1.1"; + version = "1.2.0"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "matthewwardrop"; repo = "formulaic"; tag = "v${version}"; - hash = "sha256-7vmnibL0PMZWL/unUQxN4GtLPSYKmGnhDNtE5GRDFHk="; + hash = "sha256-+MyMxtX3DCmluf+8dvo0uulc1AeKE6les1xiRGVWjPU="; }; env.SETUPTOOLS_SCM_PRETEND_VERSION = version; - nativeBuildInputs = [ + build-system = [ hatchling hatch-vcs ]; - propagatedBuildInputs = [ - astor + dependencies = [ + narwhals numpy pandas scipy wrapt typing-extensions interface-meta - sympy ]; - nativeCheckInputs = [ pytestCheckHook ]; + optional-dependencies = { + arrow = [ pyarrow ]; + polars = [ polars ]; + calculus = [ sympy ]; + }; + + nativeCheckInputs = + [ + pytestCheckHook + ] + ++ optional-dependencies.arrow + ++ optional-dependencies.calculus; pythonImportsCheck = [ "formulaic" ]; - disabledTestPaths = [ "tests/transforms/test_poly.py" ]; - meta = with lib; { description = "High-performance implementation of Wilkinson formulas"; homepage = "https://matthewwardrop.github.io/formulaic/";