about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/phik/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
commit9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d (patch)
tree4368f9e4cb2d5b93a956c085337e45cb70f1e331 /nixpkgs/pkgs/development/python-modules/phik/default.nix
parenta9cbfb6941b47d6f50129e6e36927882392daed7 (diff)
parent2344fe1da14cb08b0c18743b207995f9b8597915 (diff)
downloadnixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.gz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.bz2
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.lz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.xz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.zst
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.zip
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/phik/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/phik/default.nix68
1 files changed, 44 insertions, 24 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/phik/default.nix b/nixpkgs/pkgs/development/python-modules/phik/default.nix
index adf507cb048b..bbc26de99cf7 100644
--- a/nixpkgs/pkgs/development/python-modules/phik/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/phik/default.nix
@@ -2,27 +2,29 @@
 , buildPythonPackage
 , cmake
 , fetchFromGitHub
-, isPy3k
-, pytestCheckHook
-, nbconvert
 , joblib
 , jupyter
 , jupyter-client
-, numpy
-, scipy
-, pandas
 , matplotlib
+, nbconvert
 , ninja
 , numba
+, numpy
+, pandas
 , pybind11
+, pytestCheckHook
+, pythonOlder
 , scikit-build
+, scipy
+, setuptools
 }:
 
 buildPythonPackage rec {
   pname = "phik";
   version = "0.12.3";
-  disabled = !isPy3k;
-  format = "pyproject";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "KaveIO";
@@ -31,11 +33,11 @@ buildPythonPackage rec {
     hash = "sha256-9o3EDhgmne2J1QfzjjNQc1mUcyCzoVrCnWXqjWkiZU0=";
   };
 
-  nativeCheckInputs = [
-    pytestCheckHook
-    nbconvert
-    jupyter
-    jupyter-client
+  nativeBuildInputs = [
+    cmake
+    ninja
+    scikit-build
+    setuptools
   ];
 
   propagatedBuildInputs = [
@@ -48,17 +50,20 @@ buildPythonPackage rec {
     pybind11
   ];
 
-  # uses setuptools to drive build process
+  nativeCheckInputs = [
+    pytestCheckHook
+    nbconvert
+    jupyter
+    jupyter-client
+  ];
+
+  # Uses setuptools to drive build process
   dontUseCmakeConfigure = true;
 
-  nativeBuildInputs = [
-    cmake
-    ninja
-    scikit-build
+  pythonImportsCheck = [
+    "phik"
   ];
 
-  pythonImportsCheck = [ "phik" ];
-
   postInstall = ''
     rm -r $out/bin
   '';
@@ -68,12 +73,27 @@ buildPythonPackage rec {
     rm -r phik
   '';
 
+  disabledTests = [
+    # TypeError: 'numpy.float64' object cannot be interpreted as an integer
+    # https://github.com/KaveIO/PhiK/issues/73
+    "test_significance_matrix_hybrid"
+    "test_significance_matrix_mc"
+  ];
+
+  disabledTestPaths = [
+    # Don't test integrations
+    "tests/phik_python/integration/"
+  ];
+
   meta = with lib; {
     description = "Phi_K correlation analyzer library";
-    longDescription = "Phi_K is a new and practical correlation coefficient based on several refinements to Pearson’s hypothesis test of independence of two variables.";
-    homepage = "https://phik.readthedocs.io/en/latest/";
-    changelog = "https://github.com/KaveIO/PhiK/blob/${src.rev}/CHANGES.rst";
-    maintainers = with maintainers; [ melsigl ];
+    longDescription = ''
+      Phi_K is a new and practical correlation coefficient based on several refinements to
+      Pearson’s hypothesis test of independence of two variables.
+    '';
+    homepage = "https://phik.readthedocs.io/";
+    changelog = "https://github.com/KaveIO/PhiK/blob/${version}/CHANGES.rst";
     license = licenses.asl20;
+    maintainers = with maintainers; [ melsigl ];
   };
 }