diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-08-06 12:48:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-06 12:48:44 -0500 |
commit | 33f94e60320102c6636e4a0f3c3a96158ca06fe2 (patch) | |
tree | 2c3429dc5cf56fd0e87de562ec44b66593c7db96 | |
parent | 2ac27de2bc9bbc2d73a93508962a28c520f4fac5 (diff) | |
parent | 237e4da744e99b1aedcfced12977ff3d48a15754 (diff) | |
download | nixpkgs-33f94e60320102c6636e4a0f3c3a96158ca06fe2.tar nixpkgs-33f94e60320102c6636e4a0f3c3a96158ca06fe2.tar.gz nixpkgs-33f94e60320102c6636e4a0f3c3a96158ca06fe2.tar.bz2 nixpkgs-33f94e60320102c6636e4a0f3c3a96158ca06fe2.tar.lz nixpkgs-33f94e60320102c6636e4a0f3c3a96158ca06fe2.tar.xz nixpkgs-33f94e60320102c6636e4a0f3c3a96158ca06fe2.tar.zst nixpkgs-33f94e60320102c6636e4a0f3c3a96158ca06fe2.zip |
Merge pull request #244537 from bcdarwin/pyradiomics
python310Packages.pyradiomics: init at 3.1.0
-rw-r--r-- | pkgs/development/python-modules/pyradiomics/default.nix | 71 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
2 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyradiomics/default.nix b/pkgs/development/python-modules/pyradiomics/default.nix new file mode 100644 index 00000000000..606f542f8f9 --- /dev/null +++ b/pkgs/development/python-modules/pyradiomics/default.nix @@ -0,0 +1,71 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, numpy +, pykwalify +, pywavelets +, setuptools +, simpleitk +, six +, versioneer +}: + +buildPythonPackage rec { + pname = "pyradiomics"; + version = "3.1.0"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "AIM-Harvard"; + repo = "pyradiomics"; + rev = "refs/tags/v${version}"; + hash = "sha256-/qFNN63Bbq4DUZDPmwUGj1z5pY3ujsbqFJpVXbO+b8E="; + name = "pyradiomics"; + }; + + nativeBuildInputs = [ setuptools versioneer ]; + + propagatedBuildInputs = [ + numpy + pykwalify + pywavelets + simpleitk + six + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + preCheck = '' + rm -rf radiomics + ''; + # tries to access network at collection time: + disabledTestPaths = [ "tests/test_wavelet.py" ]; + # various urllib download errors and (probably related) missing feature errors: + disabledTests = [ + "brain1_shape2D-original_shape2D" + "brain2_shape2D-original_shape2D" + "breast1_shape2D-original_shape2D" + "lung1_shape2D-original_shape2D" + "lung2_shape2D-original_shape2D" + ]; + # note the above elements of disabledTests are patterns, not exact tests, + # so simply setting `disabledTests` does not suffice: + pytestFlagsArray = [ + "-k '${toString (lib.intersperse "and" (lib.forEach disabledTests (t: "not ${t}")))}'" + ]; + + pythonImportsCheck = [ + "radiomics" + ]; + + meta = with lib; { + homepage = "https://pyradiomics.readthedocs.io"; + description = "Extraction of Radiomics features from 2D and 3D images and binary masks"; + changelog = "https://github.com/AIM-Harvard/pyradiomics/releases/tag/v${version}"; + license = licenses.bsd3; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6ed68c04b69..72c64cc4e9e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9573,6 +9573,8 @@ self: super: with self; { pyrad = callPackage ../development/python-modules/pyrad { }; + pyradiomics = callPackage ../development/python-modules/pyradiomics { }; + pyradios = callPackage ../development/python-modules/pyradios { }; pyrainbird = callPackage ../development/python-modules/pyrainbird { }; |