-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82410 from GuillaumeDesforges/pr/scikit-survival/…
…init scikit-survival: init at 0.11
- Loading branch information
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
pkgs/development/python-modules/scikit-survival/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
homepage = "https://github.com/sebp/scikit-survival"; | ||
license = licenses.gpl3Only; | ||
maintainers = with maintainers; [ GuillaumeDesforges ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters