depot/third_party/nixpkgs/pkgs/development/python-modules/phik/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

99 lines
1.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib
, buildPythonPackage
, cmake
, fetchFromGitHub
, joblib
, jupyter
, jupyter-client
, matplotlib
, nbconvert
, ninja
, numba
, numpy
, pandas
, pybind11
, pytestCheckHook
, pythonOlder
, scikit-build
, scipy
, setuptools
}:
buildPythonPackage rec {
pname = "phik";
version = "0.12.3";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "KaveIO";
repo = "PhiK";
rev = "refs/tags/v${version}";
hash = "sha256-9o3EDhgmne2J1QfzjjNQc1mUcyCzoVrCnWXqjWkiZU0=";
};
nativeBuildInputs = [
cmake
ninja
scikit-build
setuptools
];
propagatedBuildInputs = [
joblib
numpy
scipy
pandas
matplotlib
numba
pybind11
];
nativeCheckInputs = [
pytestCheckHook
nbconvert
jupyter
jupyter-client
];
# Uses setuptools to drive build process
dontUseCmakeConfigure = true;
pythonImportsCheck = [
"phik"
];
postInstall = ''
rm -r $out/bin
'';
preCheck = ''
# import from $out
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
Pearsons 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 ];
};
}