python39Packages.phik: fix tests

This commit is contained in:
Robert Schütz 2022-05-25 19:14:05 +00:00 committed by Robert Schütz
parent 8f2c491391
commit 24903b5de2

View File

@ -1,12 +1,12 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, cmake , cmake
, fetchPypi , fetchFromGitHub
, isPy3k , isPy3k
, pytest , pytestCheckHook
, pytest-pylint
, nbconvert , nbconvert
, joblib , joblib
, jupyter
, jupyter-client , jupyter-client
, numpy , numpy
, scipy , scipy
@ -24,15 +24,17 @@ buildPythonPackage rec {
disabled = !isPy3k; disabled = !isPy3k;
format = "pyproject"; format = "pyproject";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "KaveIO";
sha256 = "sha256-sGdOuCnSMpBDP3GNI2ASK+gEsXDMyAetnZqNHBOYVTM="; repo = "PhiK";
rev = "v${version}";
hash = "sha256-nr3804MLIBPFw/PlJ9B8xKFFGI5LDp8m2gLtJB7YcEE=";
}; };
checkInputs = [ checkInputs = [
pytest pytestCheckHook
pytest-pylint
nbconvert nbconvert
jupyter
jupyter-client jupyter-client
]; ];
@ -55,16 +57,22 @@ buildPythonPackage rec {
scikit-build scikit-build
]; ];
pythonImportCheck = [ "phik" ]; pythonImportsCheck = [ "phik" ];
postInstall = '' postInstall = ''
rm -r $out/bin rm -r $out/bin
''; '';
preCheck = ''
# import from $out
rm -r phik
'';
meta = with lib; { meta = with lib; {
description = "Phi_K correlation analyzer library"; description = "Phi_K correlation analyzer library";
longDescription = "Phi_K is a new and practical correlation coefficient based on several refinements to Pearsons hypothesis test of independence of two variables."; longDescription = "Phi_K is a new and practical correlation coefficient based on several refinements to Pearsons hypothesis test of independence of two variables.";
homepage = "https://phik.readthedocs.io/en/latest/"; homepage = "https://phik.readthedocs.io/en/latest/";
changelog = "https://github.com/KaveIO/PhiK/blob/${src.rev}/CHANGES.rst";
maintainers = with maintainers; [ melsigl ]; maintainers = with maintainers; [ melsigl ];
license = licenses.asl20; license = licenses.asl20;
}; };