Merge pull request #284103 from bcdarwin/niworkflows

python311Packages.niworkflows: init at 1.10.0
This commit is contained in:
Mario Rodas 2024-02-01 21:08:11 -05:00 committed by GitHub
commit 3b9c0d92db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 240 additions and 0 deletions

View File

@ -0,0 +1,46 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, flit-scm
, packaging
, setuptools-scm
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "nipreps-versions";
version = "1.0.4";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "nipreps";
repo = "version-schemes";
rev = "refs/tags/${version}";
hash = "sha256-B2wtLurzgk59kTooH51a2dewK7aEyA0dAm64Wp+tqhM=";
};
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
flit-scm
setuptools-scm
];
propagatedBuildInputs = [
packaging
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "nipreps_versions" ];
meta = with lib; {
description = "Setuptools_scm plugin for nipreps version schemes";
homepage = "https://github.com/nipreps/version-schemes";
changelog = "https://github.com/nipreps/version-schemes/blob/${src.rev}/CHANGES.md";
license = licenses.asl20;
maintainers = with maintainers; [ bcdarwin ];
};
}

View File

@ -0,0 +1,101 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, hatch-vcs
, hatchling
, pytestCheckHook
, attrs
, importlib-resources
, jinja2
, looseversion
, matplotlib
, nibabel
, nilearn
, nipype
, nitransforms
, numpy
, packaging
, pandas
, pybids
, pyyaml
, scikit-image
, scipy
, seaborn
, svgutils
, templateflow
, traits
, transforms3d
}:
buildPythonPackage rec {
pname = "niworkflows";
version = "1.10.0";
pyproject = true;
src = fetchFromGitHub {
owner = "nipreps";
repo = "niworkflows";
rev = "refs/tags/${version}";
hash = "sha256-wQPk9imDvomg+NTWk+VeW1TE2QlvMyi1YYVVaznhktU=";
};
postPatch = ''
substituteInPlace pyproject.toml --replace '"traits < 6.4"' '"traits"'
'';
nativeBuildInputs = [
hatch-vcs
hatchling
];
propagatedBuildInputs = [
attrs
importlib-resources
jinja2
looseversion
matplotlib
nibabel
nilearn
nipype
nitransforms
numpy
packaging
pandas
pybids
pyyaml
scikit-image
scipy
seaborn
svgutils
templateflow
traits
transforms3d
];
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''export HOME=$(mktemp -d)'';
pytestFlagsArray = [ "niworkflows" ];
# try to download data:
disabledTests = [
"test_GenerateCifti"
"ROIsPlot"
"ROIsPlot2"
"test_SimpleShowMaskRPT"
"test_cifti_surfaces_plot"
"niworkflows.utils.misc.get_template_specs"
"niworkflows.interfaces.cifti._prepare_cifti"
];
disabledTestPaths = [ "niworkflows/tests/test_registration.py" ];
pythonImportsCheck = [ "niworkflows" ];
meta = with lib; {
description = "Common workflows for MRI (anatomical, functional, diffusion, etc.)";
homepage = "https://github.com/nipreps/niworkflows";
changelog = "https://github.com/nipreps/niworkflows/blob/${src.rev}/CHANGES.rst";
license = licenses.asl20;
maintainers = with maintainers; [ bcdarwin ];
};
}

View File

@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, lxml
, matplotlib
, pytestCheckHook
, nose
}:
buildPythonPackage rec {
pname = "svgutils";
version = "0.3.4";
pyproject = true;
src = fetchFromGitHub {
owner = "btel";
repo = "svg_utils";
rev = "refs/tags/v${version}";
hash = "sha256-ITvZx+3HMbTyaRmCb7tR0LKqCxGjqDdV9/2taziUD0c=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
lxml
matplotlib
];
nativeCheckInputs = [ pytestCheckHook nose ];
pythonImportsCheck = [ "svgutils" ];
meta = with lib; {
description = "Python tools to create and manipulate SVG files";
homepage = "https://github.com/btel/svg_utils";
license = licenses.mit;
maintainers = with maintainers; [ bcdarwin ];
};
}

View File

@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, setuptools-scm
, nipreps-versions
, pybids
, requests
, tqdm
}:
buildPythonPackage rec {
pname = "templateflow";
version = "23.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "templateflow";
repo = "python-client";
rev = "refs/tags/${version}";
hash = "sha256-8AdXC1IFGfYZ5cvCAyBz0tD3zia+KBILX0tL9IcO2NA=";
};
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [
nipreps-versions
pybids
requests
tqdm
];
doCheck = false; # most tests try to download data
#pythonImportsCheck = [ "templateflow" ]; # touches $HOME/.cache, hence needs https://github.com/NixOS/nixpkgs/pull/120300
meta = with lib; {
homepage = "https://templateflow.org/python-client";
description = "Python API to query TemplateFlow via pyBIDS";
changelog = "https://github.com/templateflow/python-client/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ bcdarwin ];
};
}

View File

@ -8373,6 +8373,8 @@ self: super: with self; {
ninja = callPackage ../development/python-modules/ninja { inherit (pkgs) ninja; };
nipreps-versions = callPackage ../development/python-modules/nipreps-versions { };
nipy = callPackage ../development/python-modules/nipy { };
nipype = callPackage ../development/python-modules/nipype {
@ -8385,6 +8387,8 @@ self: super: with self; {
nitransforms = callPackage ../development/python-modules/nitransforms { };
niworkflows = callPackage ../development/python-modules/niworkflows { };
nix-kernel = callPackage ../development/python-modules/nix-kernel {
inherit (pkgs) nix;
};
@ -14026,6 +14030,8 @@ self: super: with self; {
svgelements = callPackage ../development/python-modules/svgelements { };
svgutils = callPackage ../development/python-modules/svgutils { };
svgwrite = callPackage ../development/python-modules/svgwrite { };
sv-ttk = callPackage ../development/python-modules/sv-ttk { };
@ -14165,6 +14171,8 @@ self: super: with self; {
tempita = callPackage ../development/python-modules/tempita { };
templateflow = callPackage ../development/python-modules/templateflow { };
tempora = callPackage ../development/python-modules/tempora { };
tenacity = callPackage ../development/python-modules/tenacity { };