1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatch-vcs,
8 hatchling,
9
10 # dependencies
11 acres,
12 attrs,
13 importlib-resources,
14 jinja2,
15 looseversion,
16 matplotlib,
17 nibabel,
18 nilearn,
19 nipype,
20 nitransforms,
21 numpy,
22 packaging,
23 pandas,
24 pybids,
25 pyyaml,
26 scikit-image,
27 scipy,
28 seaborn,
29 svgutils,
30 templateflow,
31 traits,
32 transforms3d,
33
34 # tests
35 pytest-cov-stub,
36 pytest-env,
37 pytestCheckHook,
38 writableTmpDirAsHomeHook,
39}:
40
41buildPythonPackage rec {
42 pname = "niworkflows";
43 version = "1.14.2";
44 pyproject = true;
45
46 src = fetchFromGitHub {
47 owner = "nipreps";
48 repo = "niworkflows";
49 tag = version;
50 hash = "sha256-LzzbletoZdI9HuaBWhFB6IGs1nX6ZItNP6cWlw5m5EE=";
51 };
52
53 pythonRelaxDeps = [ "traits" ];
54
55 build-system = [
56 hatch-vcs
57 hatchling
58 ];
59
60 dependencies = [
61 acres
62 attrs
63 importlib-resources
64 jinja2
65 looseversion
66 matplotlib
67 nibabel
68 nilearn
69 nipype
70 nitransforms
71 numpy
72 packaging
73 pandas
74 pybids
75 pyyaml
76 scikit-image
77 scipy
78 seaborn
79 svgutils
80 templateflow
81 traits
82 transforms3d
83 ];
84
85 env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
86
87 nativeCheckInputs = [
88 pytest-cov-stub
89 pytest-env
90 pytestCheckHook
91 writableTmpDirAsHomeHook
92 ];
93
94 enabledTestPaths = [ "niworkflows" ];
95
96 disabledTests = [
97 # try to download data:
98 "ROIsPlot"
99 "ROIsPlot2"
100 "niworkflows.interfaces.cifti._prepare_cifti"
101 "niworkflows.utils.misc.get_template_specs"
102 "test_GenerateCifti"
103 "test_SimpleShowMaskRPT"
104 "test_cifti_surfaces_plot"
105 "test_brain_extraction_wf_smoketest"
106 ];
107
108 disabledTestPaths = [
109 "niworkflows/tests/test_registration.py"
110 ];
111
112 pythonImportsCheck = [ "niworkflows" ];
113
114 meta = {
115 description = "Common workflows for MRI (anatomical, functional, diffusion, etc.)";
116 mainProgram = "niworkflows-boldref";
117 homepage = "https://github.com/nipreps/niworkflows";
118 changelog = "https://github.com/nipreps/niworkflows/blob/${src.tag}/CHANGES.rst";
119 license = lib.licenses.asl20;
120 maintainers = with lib.maintainers; [ bcdarwin ];
121 };
122}