Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scikit-survival: init at 0.11 #82410

Merged
merged 1 commit into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions pkgs/development/python-modules/scikit-survival/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{ lib
, buildPythonPackage
, fetchPypi
, cython
, ecos
, joblib
, numexpr
, numpy
, osqp
, pandas
, scikitlearn
, scipy
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "scikit-survival";
version = "0.15.0.post0";

src = fetchPypi {
inherit pname version;
sha256 = "572c3ac6818a9d0944fc4b8176eb948051654de857e28419ecc5060bcc6fbf37";
};

nativeBuildInputs = [
cython
];

propagatedBuildInputs = [
ecos
joblib
numexpr
numpy
osqp
pandas
scikitlearn
scipy
];

pythonImportsCheck = [ "sksurv" ];

checkInputs = [ pytestCheckHook ];

# Hack needed to make pytest + cython work
# https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298
preCheck = ''
export HOME=$(mktemp -d)
cp -r $TMP/$sourceRoot/tests $HOME
pushd $HOME
'';
postCheck = "popd";

# very long tests, unnecessary for a leaf package
disabledTests = [
"test_coxph"
"test_datasets"
"test_ensemble_selection"
"test_minlip"
"test_pandas_inputs"
"test_survival_svm"
"test_tree"
];

meta = with lib; {
description = "Survival analysis built on top of scikit-learn";
GuillaumeDesforges marked this conversation as resolved.
Show resolved Hide resolved
homepage = "https://github.com/sebp/scikit-survival";
license = licenses.gpl3Only;
maintainers = with maintainers; [ GuillaumeDesforges ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7265,6 +7265,8 @@ in {

scripttest = callPackage ../development/python-modules/scripttest { };

scikit-survival = callPackage ../development/python-modules/scikit-survival { };

scs = callPackage ../development/python-modules/scs { scs = pkgs.scs; };

sdnotify = callPackage ../development/python-modules/sdnotify { };
Expand Down