2020-04-24 23:36:52 +00:00
|
|
|
|
{ lib
|
|
|
|
|
, buildPythonPackage
|
2021-10-11 16:52:03 +00:00
|
|
|
|
, cmake
|
2022-06-16 17:23:12 +00:00
|
|
|
|
, fetchFromGitHub
|
2020-08-20 17:08:02 +00:00
|
|
|
|
, joblib
|
2022-06-16 17:23:12 +00:00
|
|
|
|
, jupyter
|
2021-10-28 06:52:43 +00:00
|
|
|
|
, jupyter-client
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, matplotlib
|
2024-01-02 11:29:13 +00:00
|
|
|
|
, nbconvert
|
2021-10-11 16:52:03 +00:00
|
|
|
|
, ninja
|
2020-04-24 23:36:52 +00:00
|
|
|
|
, numba
|
2024-01-02 11:29:13 +00:00
|
|
|
|
, numpy
|
|
|
|
|
, pandas
|
2021-10-11 16:52:03 +00:00
|
|
|
|
, pybind11
|
2024-01-02 11:29:13 +00:00
|
|
|
|
, pytestCheckHook
|
|
|
|
|
, pythonOlder
|
2022-06-16 17:23:12 +00:00
|
|
|
|
, scikit-build
|
2024-01-02 11:29:13 +00:00
|
|
|
|
, scipy
|
|
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
|
pname = "phik";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
version = "0.12.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "KaveIO";
|
|
|
|
|
repo = "PhiK";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
hash = "sha256-YsH7vVn6gzejunUjUY/RIcvWtaQ/W1gbciJWKi5LDTk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cmake
|
|
|
|
|
ninja
|
|
|
|
|
scikit-build
|
|
|
|
|
setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-08-20 17:08:02 +00:00
|
|
|
|
joblib
|
2020-04-24 23:36:52 +00:00
|
|
|
|
numpy
|
|
|
|
|
scipy
|
|
|
|
|
pandas
|
|
|
|
|
matplotlib
|
|
|
|
|
numba
|
2021-10-11 16:52:03 +00:00
|
|
|
|
pybind11
|
|
|
|
|
];
|
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
|
nativeCheckInputs = [
|
|
|
|
|
pytestCheckHook
|
|
|
|
|
nbconvert
|
|
|
|
|
jupyter
|
|
|
|
|
jupyter-client
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Uses setuptools to drive build process
|
2021-10-11 16:52:03 +00:00
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
|
pythonImportsCheck = [
|
|
|
|
|
"phik"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
|
rm -r $out/bin
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
|
# import from $out
|
|
|
|
|
rm -r phik
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
|
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/"
|
|
|
|
|
];
|
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
meta = with lib; {
|
|
|
|
|
description = "Phi_K correlation analyzer library";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
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";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
license = licenses.asl20;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
maintainers = with maintainers; [ melsigl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|