about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel W. Flint <swflint@flintfam.org>2022-10-01 17:12:44 -0500
committerSandro Jäckel <sandro.jaeckel@sap.com>2023-03-01 16:13:58 +0100
commit30ed80066d9e9c81f958a104a0aa77f3a70d7995 (patch)
tree1558a2d53b32f17a57cdf50e6b7d9bf3b7eb2760
parent02a0ccf413be884f9042a18428a38ba4c9bfb11b (diff)
python310Packages.formulaic: init at 0.5.2
-rw-r--r--pkgs/development/python-modules/formulaic/default.nix63
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/formulaic/default.nix b/pkgs/development/python-modules/formulaic/default.nix
new file mode 100644
index 0000000000000..1f7d875b917a8
--- /dev/null
+++ b/pkgs/development/python-modules/formulaic/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, hatchling
+, hatch-vcs
+, git
+, astor
+, interface-meta
+, numpy
+, pandas
+, scipy
+, sympy
+, wrapt
+, typing-extensions
+}:
+
+buildPythonPackage rec {
+  pname = "formulaic";
+  version = "0.5.2";
+
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "matthewwardrop";
+    repo = "formulaic";
+    rev = "v${version}";
+    sha256 = "sha256-sIvHTuUS/nkcDjRgZCoEOY2negIOsarzH0PeXJsavWc=";
+  };
+
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
+  nativeBuildInputs = [
+    hatchling
+    hatch-vcs
+  ];
+
+  propagatedBuildInputs = [
+    astor
+    numpy
+    pandas
+    scipy
+    wrapt
+    typing-extensions
+    interface-meta
+    sympy
+  ];
+
+  pythonImportsCheck = [ "formulaic" ];
+
+  checkInputs = [ pytestCheckHook ];
+
+  disabledTestPaths = [
+    "tests/transforms/test_poly.py"
+  ];
+
+  meta = {
+    homepage = "https://matthewwardrop.github.io/formulaic/";
+    description = "High-performance implementation of Wilkinson formulas for";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ swflint ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 13a8ab9a76bab..b127d12a1b852 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3617,6 +3617,8 @@ self: super: with self; {
 
   FormEncode = callPackage ../development/python-modules/FormEncode { };
 
+  formulaic = callPackage ../development/python-modules/formulaic { };
+
   foundationdb51 = callPackage ../servers/foundationdb/python.nix { foundationdb = pkgs.foundationdb51; };
   foundationdb52 = callPackage ../servers/foundationdb/python.nix { foundationdb = pkgs.foundationdb52; };
   foundationdb60 = callPackage ../servers/foundationdb/python.nix { foundationdb = pkgs.foundationdb60; };