capsul 2.3.2__tar.gz → 2.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. {capsul-2.3.2/capsul.egg-info → capsul-2.6.0}/PKG-INFO +21 -10
  2. capsul-2.6.0/README.rst +32 -0
  3. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/__init__.py +1 -1
  4. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/__init__.py +1 -0
  5. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/attributes.py +1 -8
  6. capsul-2.6.0/capsul/engine/module/mrtrix.py +101 -0
  7. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/nipype.py +2 -2
  8. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/somaworkflow.py +2 -5
  9. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/spm.py +5 -3
  10. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/run.py +3 -1
  11. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/settings.py +4 -4
  12. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/test/test_capsul_engine.py +45 -20
  13. capsul-2.6.0/capsul/in_context/freesurfer.py +143 -0
  14. {capsul-2.3.2 → capsul-2.6.0}/capsul/in_context/fsl.py +1 -1
  15. capsul-2.6.0/capsul/in_context/mrtrix.py +127 -0
  16. {capsul-2.3.2 → capsul-2.6.0}/capsul/in_context/nipype.py +40 -9
  17. {capsul-2.3.2 → capsul-2.6.0}/capsul/in_context/spm.py +1 -1
  18. {capsul-2.3.2 → capsul-2.6.0}/capsul/info.py +12 -11
  19. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/pipeline.py +5 -4
  20. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/pipeline_nodes.py +1 -1
  21. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/pipeline_tools.py +15 -5
  22. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/pipeline_workflow.py +4 -3
  23. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/process_iteration.py +16 -13
  24. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_pipeline_parameters.py +4 -7
  25. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/nipype_process.py +9 -3
  26. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/process.py +45 -20
  27. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/runprocess.py +141 -16
  28. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/main_window.py +2 -2
  29. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/utils/application.py +4 -5
  30. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/utils/find_pipelines.py +4 -4
  31. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/board_widget.py +1 -1
  32. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/pipeline_developer_view.py +51 -34
  33. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/__init__.py +1 -1
  34. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/capsul_pipeline_rst.py +1 -1
  35. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/attributes_config.py +2 -5
  36. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/freesurfer_config.py +1 -1
  37. capsul-2.6.0/capsul/study_config/config_modules/mrtrix_config.py +118 -0
  38. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/somaworkflow_config.py +8 -7
  39. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/spm_config.py +2 -0
  40. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/memory.py +5 -5
  41. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/process_instance.py +5 -13
  42. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/study_config.py +16 -9
  43. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/test/test_study_config_configuration.py +21 -22
  44. {capsul-2.3.2 → capsul-2.6.0}/capsul/subprocess/fsl.py +1 -1
  45. {capsul-2.3.2 → capsul-2.6.0/capsul.egg-info}/PKG-INFO +21 -10
  46. {capsul-2.3.2 → capsul-2.6.0}/capsul.egg-info/SOURCES.txt +3 -1
  47. capsul-2.6.0/capsul.egg-info/requires.txt +20 -0
  48. {capsul-2.3.2 → capsul-2.6.0}/doc/source/status.rst +1 -1
  49. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/capsul_tutorial.ipynb.in +3 -3
  50. {capsul-2.3.2 → capsul-2.6.0}/doc/source/user_guide_tree/xml_spec.rst +2 -2
  51. capsul-2.3.2/README.rst +0 -45
  52. capsul-2.3.2/capsul/in_context/freesurfer.py +0 -121
  53. capsul-2.3.2/capsul.egg-info/requires.txt +0 -20
  54. capsul-2.3.2/doc/source/tutorial/capsul_tutorial.ipynb +0 -1987
  55. {capsul-2.3.2 → capsul-2.6.0}/AUTHOR +0 -0
  56. {capsul-2.3.2 → capsul-2.6.0}/LICENSE +0 -0
  57. {capsul-2.3.2 → capsul-2.6.0}/MANIFEST.in +0 -0
  58. {capsul-2.3.2 → capsul-2.6.0}/capsul/__init__.py +0 -0
  59. {capsul-2.3.2 → capsul-2.6.0}/capsul/__main__.py +0 -0
  60. {capsul-2.3.2 → capsul-2.6.0}/capsul/api.py +0 -0
  61. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/__init__.py +0 -0
  62. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/attributes_factory.py +0 -0
  63. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/attributes_schema.py +0 -0
  64. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/completion_engine.py +0 -0
  65. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/completion_engine_factory.py +0 -0
  66. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/completion_engine_iteration.py +0 -0
  67. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/fom_completion_engine.py +0 -0
  68. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/test/__init__.py +0 -0
  69. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/test/test_attributed_process.py +0 -0
  70. {capsul-2.3.2 → capsul-2.6.0}/capsul/attributes/test/test_fom_process.py +0 -0
  71. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/database.py +0 -0
  72. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/database_json.py +0 -0
  73. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/database_populse.py +0 -0
  74. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/afni.py +0 -0
  75. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/ants.py +0 -0
  76. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/axon.py +0 -0
  77. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/fom.py +0 -0
  78. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/freesurfer.py +0 -0
  79. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/fsl.py +0 -0
  80. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/matlab.py +0 -0
  81. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/module/python.py +0 -0
  82. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/test/__init__.py +0 -0
  83. {capsul-2.3.2 → capsul-2.6.0}/capsul/engine/write_engine_config.py +0 -0
  84. {capsul-2.3.2 → capsul-2.6.0}/capsul/in_context/__init__.py +0 -0
  85. {capsul-2.3.2 → capsul-2.6.0}/capsul/in_context/afni.py +0 -0
  86. {capsul-2.3.2 → capsul-2.6.0}/capsul/in_context/ants.py +0 -0
  87. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/__init__.py +0 -0
  88. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/custom_nodes/__init__.py +0 -0
  89. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/custom_nodes/cv_node.py +0 -0
  90. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/custom_nodes/loo_node.py +0 -0
  91. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/custom_nodes/map_node.py +0 -0
  92. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/custom_nodes/reduce_node.py +0 -0
  93. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/custom_nodes/strcat_node.py +0 -0
  94. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/custom_nodes/strconv.py +0 -0
  95. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/json_io.py +0 -0
  96. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/pipeline_construction.py +0 -0
  97. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/python_export.py +0 -0
  98. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/__init__.py +0 -0
  99. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/__init__.py +0 -0
  100. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/acpcorientation.py +0 -0
  101. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/aimsconverter.py +0 -0
  102. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/baladinnormalizationpipeline.py +0 -0
  103. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/baladinnormalizationtoaims.py +0 -0
  104. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/brainorientation.py +0 -0
  105. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/brainsegmentation.py +0 -0
  106. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/fslnormalization.py +0 -0
  107. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/fslnormalizationtoaims.py +0 -0
  108. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/greywhiteclassificationhemi.py +0 -0
  109. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/greywhitemesh.py +0 -0
  110. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/greywhitetopology.py +0 -0
  111. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/histoanalysis.py +0 -0
  112. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/importt1mri.py +0 -0
  113. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/morphologist.py +0 -0
  114. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/normalization.py +0 -0
  115. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/normalization_aimsmiregister.py +0 -0
  116. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/normalization_baladin.py +0 -0
  117. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/normalization_fsl_reinit.py +0 -0
  118. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/normalization_t1_spm12_reinit.py +0 -0
  119. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/normalization_t1_spm8_reinit.py +0 -0
  120. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/normalizationskullstripped.py +0 -0
  121. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/pialmesh.py +0 -0
  122. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/reorientanatomy.py +0 -0
  123. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/scalpmesh.py +0 -0
  124. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/skullstripping.py +0 -0
  125. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/splitbrain.py +0 -0
  126. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/spmnormalization.py +0 -0
  127. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/spmsn3dtoaims.py +0 -0
  128. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulcideeplabeling.py +0 -0
  129. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulcigraph.py +0 -0
  130. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulcigraphmorphometrybysubject.py +0 -0
  131. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulcilabelling.py +0 -0
  132. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulcilabellingann.py +0 -0
  133. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulcilabellingspam.py +0 -0
  134. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulcilabellingspamglobal.py +0 -0
  135. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulcilabellingspamlocal.py +0 -0
  136. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulcilabellingspammarkov.py +0 -0
  137. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/sulciskeleton.py +0 -0
  138. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/t1biascorrection.py +0 -0
  139. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/talairachtransformation.py +0 -0
  140. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/fake_morphologist/talairachtransformationfromnormalization.py +0 -0
  141. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_activation.py +0 -0
  142. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_complex_pipeline_activations.py +0 -0
  143. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_custom_nodes.py +0 -0
  144. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_double_switch.py +0 -0
  145. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_iterative_process.py +0 -0
  146. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_optional_output_switch.py +0 -0
  147. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_pipeline.py +0 -0
  148. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_pipeline_with_temp.py +0 -0
  149. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_pipeline_workflow.py +0 -0
  150. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_proc_with_outputs.py +0 -0
  151. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_process_iteration.py +0 -0
  152. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_qc_nodes.py +0 -0
  153. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_switch_optional_output.py +0 -0
  154. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_switch_pipeline.py +0 -0
  155. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_switch_subpipeline.py +0 -0
  156. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_switch_subpipeline_one.json +0 -0
  157. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_switch_subpipeline_two.json +0 -0
  158. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/test/test_temporary.py +0 -0
  159. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/topological_sort.py +0 -0
  160. {capsul-2.3.2 → capsul-2.6.0}/capsul/pipeline/xml.py +0 -0
  161. {capsul-2.3.2 → capsul-2.6.0}/capsul/plugins/__init__.py +0 -0
  162. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/__init__.py +0 -0
  163. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/test/__init__.py +0 -0
  164. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/test/test_load_from_description.py +0 -0
  165. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/test/test_nipype_wrap.py +0 -0
  166. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/test/test_pipeline.xml +0 -0
  167. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/test/test_runprocess.py +0 -0
  168. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/test/test_traits.py +0 -0
  169. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/test/xml_pipeline.xml +0 -0
  170. {capsul-2.3.2 → capsul-2.6.0}/capsul/process/xml.py +0 -0
  171. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/__init__.py +0 -0
  172. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/capsulview +0 -0
  173. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/pipeline_viewer_app.py +0 -0
  174. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/__init__.py +0 -0
  175. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/capsul.ui +0 -0
  176. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/change_view.png +0 -0
  177. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/config.png +0 -0
  178. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/controller.png +0 -0
  179. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/exit.png +0 -0
  180. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/help.png +0 -0
  181. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/icones.py +0 -0
  182. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/icones.qrc +0 -0
  183. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/inspect.png +0 -0
  184. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/logo.gif +0 -0
  185. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/logo.png +0 -0
  186. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/open.png +0 -0
  187. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/play.png +0 -0
  188. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/readme.txt +0 -0
  189. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/search.png +0 -0
  190. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/transfer.png +0 -0
  191. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/resources/view_result.png +0 -0
  192. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/utils/__init__.py +0 -0
  193. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/utils/fill_treectrl.py +0 -0
  194. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_apps/utils/window.py +0 -0
  195. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/__init__.py +0 -0
  196. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/test/__init__.py +0 -0
  197. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/test/test_board_widget.py +0 -0
  198. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/__init__.py +0 -0
  199. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/activation_inspector.py +0 -0
  200. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/attributed_process_widget.py +0 -0
  201. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/links_debugger.py +0 -0
  202. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/pipeline_developper_view.py +0 -0
  203. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/pipeline_file_warning_widget.py +0 -0
  204. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/pipeline_user_view.py +0 -0
  205. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/settings_editor.py +0 -0
  206. {capsul-2.3.2 → capsul-2.6.0}/capsul/qt_gui/widgets/viewer_widget.py +0 -0
  207. {capsul-2.3.2 → capsul-2.6.0}/capsul/run.py +0 -0
  208. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/capsul_pipeline_view.py +0 -0
  209. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/capsul_sphinx_layout.py +0 -0
  210. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/capsul_usecases_rst.py +0 -0
  211. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/layoutdocgen.py +0 -0
  212. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/load_pilots.py +0 -0
  213. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/pipelinedocgen.py +0 -0
  214. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/test/__init__.py +0 -0
  215. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/test/test_process_pipeline_doc.py +0 -0
  216. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/test/test_usercases_doc.py +0 -0
  217. {capsul-2.3.2 → capsul-2.6.0}/capsul/sphinxext/usecasesdocgen.py +0 -0
  218. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/__init__.py +0 -0
  219. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/__init__.py +0 -0
  220. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/afni_config.py +0 -0
  221. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/ants_config.py +0 -0
  222. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/brainvisa_config.py +0 -0
  223. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/fom_config.py +0 -0
  224. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/fsl_config.py +0 -0
  225. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/matlab_config.py +0 -0
  226. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/nipype_config.py +0 -0
  227. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_modules/smartcaching_config.py +0 -0
  228. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/config_utils.py +0 -0
  229. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/run.py +0 -0
  230. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/test/__init__.py +0 -0
  231. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/test/test_fsl_config.py +0 -0
  232. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/test/test_memory.py +0 -0
  233. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/test/test_run_in_study_config.py +0 -0
  234. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/test/test_run_process.py +0 -0
  235. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/test/test_soma_workflow.py +0 -0
  236. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/test/test_soma_workflow_with_kw.py +0 -0
  237. {capsul-2.3.2 → capsul-2.6.0}/capsul/study_config/test/test_study_config_fom.py +0 -0
  238. {capsul-2.3.2 → capsul-2.6.0}/capsul/subprocess/__init__.py +0 -0
  239. {capsul-2.3.2 → capsul-2.6.0}/capsul/subprocess/afni.py +0 -0
  240. {capsul-2.3.2 → capsul-2.6.0}/capsul/subprocess/ants.py +0 -0
  241. {capsul-2.3.2 → capsul-2.6.0}/capsul/subprocess/spm.py +0 -0
  242. {capsul-2.3.2 → capsul-2.6.0}/capsul/test/__init__.py +0 -0
  243. {capsul-2.3.2 → capsul-2.6.0}/capsul/test/__main__.py +0 -0
  244. {capsul-2.3.2 → capsul-2.6.0}/capsul/test/coverage.py +0 -0
  245. {capsul-2.3.2 → capsul-2.6.0}/capsul/test/test_capsul_modules_import.py +0 -0
  246. {capsul-2.3.2 → capsul-2.6.0}/capsul/test/test_capsul_notebooks.py +0 -0
  247. {capsul-2.3.2 → capsul-2.6.0}/capsul/utils/__init__.py +0 -0
  248. {capsul-2.3.2 → capsul-2.6.0}/capsul/utils/finder.py +0 -0
  249. {capsul-2.3.2 → capsul-2.6.0}/capsul/utils/test/__init__.py +0 -0
  250. {capsul-2.3.2 → capsul-2.6.0}/capsul/utils/test/test_utils.py +0 -0
  251. {capsul-2.3.2 → capsul-2.6.0}/capsul/utils/version_utils.py +0 -0
  252. {capsul-2.3.2 → capsul-2.6.0}/capsul.egg-info/dependency_links.txt +0 -0
  253. {capsul-2.3.2 → capsul-2.6.0}/capsul.egg-info/top_level.txt +0 -0
  254. {capsul-2.3.2 → capsul-2.6.0}/doc/Makefile +0 -0
  255. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/capsul_logo.svg +0 -0
  256. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/css/bootstrap-responsive.css +0 -0
  257. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/css/bootstrap-responsive.min.css +0 -0
  258. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/css/bootstrap.css +0 -0
  259. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/css/bootstrap.min.css +0 -0
  260. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/custom.css +0 -0
  261. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/find_read.png +0 -0
  262. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/js/bootstrap.js +0 -0
  263. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/js/bootstrap.min.js +0 -0
  264. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/pipeline_switch.png +0 -0
  265. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_static/workflow_switch.svg +0 -0
  266. {capsul-2.3.2 → capsul-2.6.0}/doc/source/_templates/layout.html +0 -0
  267. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/api.rst +0 -0
  268. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/attributes.rst +0 -0
  269. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/engine.rst +0 -0
  270. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/in_context.rst +0 -0
  271. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/index.rst +0 -0
  272. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/info.rst +0 -0
  273. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/pipeline.rst +0 -0
  274. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/plugins.rst +0 -0
  275. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/process.rst +0 -0
  276. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/qt_apps.rst +0 -0
  277. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/qt_gui.rst +0 -0
  278. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/sphinxext.rst +0 -0
  279. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/study_config.rst +0 -0
  280. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/subprocess.rst +0 -0
  281. {capsul-2.3.2 → capsul-2.6.0}/doc/source/api/utils.rst +0 -0
  282. {capsul-2.3.2 → capsul-2.6.0}/doc/source/conf.py +0 -0
  283. {capsul-2.3.2 → capsul-2.6.0}/doc/source/documentation.rst +0 -0
  284. {capsul-2.3.2 → capsul-2.6.0}/doc/source/index.rst +0 -0
  285. {capsul-2.3.2 → capsul-2.6.0}/doc/source/installation.rst +0 -0
  286. {capsul-2.3.2 → capsul-2.6.0}/doc/source/sphinxext/LICENSE.txt +0 -0
  287. {capsul-2.3.2 → capsul-2.6.0}/doc/source/sphinxext/MANIFEST.in +0 -0
  288. {capsul-2.3.2 → capsul-2.6.0}/doc/source/sphinxext/README.txt +0 -0
  289. {capsul-2.3.2 → capsul-2.6.0}/doc/source/sphinxext/numpy_ext/__init__.py +0 -0
  290. {capsul-2.3.2 → capsul-2.6.0}/doc/source/sphinxext/numpy_ext/docscrape.py +0 -0
  291. {capsul-2.3.2 → capsul-2.6.0}/doc/source/sphinxext/numpy_ext/docscrape_sphinx.py +0 -0
  292. {capsul-2.3.2 → capsul-2.6.0}/doc/source/sphinxext/numpy_ext/numpydoc.py +0 -0
  293. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_controller1.jpg +0 -0
  294. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_fom1.jpg +0 -0
  295. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_fom1_compl.jpg +0 -0
  296. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_fom1_controller.jpg +0 -0
  297. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_fom2.jpg +0 -0
  298. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_fom2_compl.jpg +0 -0
  299. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_iter1.jpg +0 -0
  300. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline1.jpg +0 -0
  301. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline2.jpg +0 -0
  302. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline3.jpg +0 -0
  303. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline5.jpg +0 -0
  304. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline6.jpg +0 -0
  305. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline6b.jpg +0 -0
  306. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline7.jpg +0 -0
  307. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline_xml1.jpg +0 -0
  308. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline_xml1_controller.jpg +0 -0
  309. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline_xml2.jpg +0 -0
  310. {capsul-2.3.2 → capsul-2.6.0}/doc/source/tutorial/images/capsul_pipeline_xml2_controller.jpg +0 -0
  311. {capsul-2.3.2 → capsul-2.6.0}/doc/source/user_guide_tree/advanced_usage.rst +0 -0
  312. {capsul-2.3.2 → capsul-2.6.0}/doc/source/user_guide_tree/index.rst +0 -0
  313. {capsul-2.3.2 → capsul-2.6.0}/setup.cfg +0 -0
  314. {capsul-2.3.2 → capsul-2.6.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: capsul
3
- Version: 2.3.2
3
+ Version: 2.6.0
4
4
  Summary: CAPSUL
5
5
  Home-page: https://github.com/populse/capsul
6
6
  Author: Populse team
@@ -15,23 +15,34 @@ Classifier: Programming Language :: Python
15
15
  Classifier: Topic :: Scientific/Engineering
16
16
  Classifier: Topic :: Utilities
17
17
  License-File: LICENSE
18
- Requires-Dist: traits>=4.0
19
- Requires-Dist: soma-base>=4.6.1
20
- Requires-Dist: soma-workflow>=2.9.0
21
- Requires-Dist: populse-db>=1.1.1
18
+ Requires-Dist: traits>=4.6
19
+ Requires-Dist: soma-base>=5.0
20
+ Requires-Dist: soma-workflow>=3.2
21
+ Requires-Dist: populse-db<3.0,>=2.2
22
22
  Requires-Dist: six>=1.13
23
23
  Requires-Dist: PyYAML
24
24
  Provides-Extra: doc
25
25
  Requires-Dist: sphinx>=1.0; extra == "doc"
26
- Requires-Dist: numpy>=1.3; extra == "doc"
26
+ Requires-Dist: numpy>=1.17; extra == "doc"
27
27
  Provides-Extra: database
28
28
  Requires-Dist: populse_db; extra == "database"
29
29
  Provides-Extra: nipype
30
- Requires-Dist: numpy>=1.3; extra == "nipype"
31
- Requires-Dist: scipy>=0.7; extra == "nipype"
30
+ Requires-Dist: numpy>=1.17; extra == "nipype"
31
+ Requires-Dist: scipy>=1.5; extra == "nipype"
32
32
  Requires-Dist: nibabel>=1.0; extra == "nipype"
33
33
  Requires-Dist: networkx>=1.0; extra == "nipype"
34
- Requires-Dist: nipype==0.10.0; extra == "nipype"
34
+ Requires-Dist: nipype>=1.8; extra == "nipype"
35
+ Dynamic: author
36
+ Dynamic: author-email
37
+ Dynamic: classifier
38
+ Dynamic: description
39
+ Dynamic: home-page
40
+ Dynamic: license
41
+ Dynamic: license-file
42
+ Dynamic: platform
43
+ Dynamic: provides-extra
44
+ Dynamic: requires-dist
45
+ Dynamic: summary
35
46
 
36
47
 
37
48
  ========
@@ -0,0 +1,32 @@
1
+ ======
2
+ CAPSUL
3
+ ======
4
+ .. image:: https://github.com/populse/capsul/actions/workflows/doc.yml/badge.svg?branch=master
5
+ :target: https://github.com/populse/capsul/actions/workflows/doc.yml
6
+ :alt: Tests
7
+
8
+ .. image:: https://img.shields.io/badge/license-CeCILL--B-informational
9
+ :target: https://github.com/populse/capsul/blob/master/LICENSE
10
+ :alt: License
11
+
12
+ .. image:: https://img.shields.io/badge/python-3.9%2C%203.10%2C%203.11-informational
13
+ :target: http://github.com/populse/capsul
14
+ :alt: Python
15
+
16
+ .. image:: https://img.shields.io/badge/platform-Linux%2C%20OSX%2C%20Windows-informational
17
+ :target: http://github.com/populse/capsul
18
+ :alt: Platforms
19
+
20
+ Documentation
21
+ =============
22
+
23
+ Visit CAPSUL (http://populse.github.io/capsul) main page for the docs of the git master branch.
24
+
25
+ See the BrianVISA website (http://brainvisa.info/capsul/) for the docs of the released versions.
26
+
27
+ Download
28
+ ========
29
+
30
+ CAPSUL is available on `pypi <https://pypi.org/project/capsul/>`_ to download:,
31
+
32
+ or via the `BrainVISA distribution <http://brainvisa.info/web/download.html>`_.
@@ -540,7 +540,7 @@ def capsul_engine(database_location=None, require=None):
540
540
  Configuration is read from a dictionary stored in two database entries.
541
541
  The first entry has the key 'global_config' (i.e.
542
542
  database.json_value('global_config')), it contains the configuration
543
- values that are shared by all processings engines. The secon entry is
543
+ values that are shared by all processing engines. The second entry is
544
544
  computing_config`. It contains a dictionary with one item per computing
545
545
  resource where the key is the resource name and the value is configuration
546
546
  values that are specific to this computing resource.
@@ -4,4 +4,5 @@ default_modules = ['afni',
4
4
  'ants',
5
5
  'fsl',
6
6
  'matlab',
7
+ 'mrtrix',
7
8
  'spm']
@@ -4,18 +4,11 @@ Attributes completion config module
4
4
 
5
5
  '''
6
6
 
7
- from __future__ import absolute_import
8
-
9
- import os
10
- import six
11
7
  from capsul.attributes.attributes_factory import AttributesFactory
12
8
  from capsul.attributes.attributes_schema import AttributesSchema, \
13
9
  ProcessAttributes
14
10
  from capsul.attributes.completion_engine \
15
11
  import ProcessCompletionEngineFactory, PathCompletionEngineFactory
16
- from capsul.engine import settings
17
- import capsul.engine
18
- import os.path as osp
19
12
  from functools import partial
20
13
  import weakref
21
14
 
@@ -143,7 +136,7 @@ def edition_widget(engine, environment, config_id='attributes'):
143
136
  traits.List(traits.Str(), desc='attributes shchemas modules names'))
144
137
  controller.add_trait(
145
138
  'attributes_schemas',
146
- traits.DictStrStr(desc='attributes shchemas names'))
139
+ traits.Dict(str, str, desc='attributes shchemas names'))
147
140
  controller.add_trait(
148
141
  'process_completion',
149
142
  traits.Str(desc='process completion model name'))
@@ -0,0 +1,101 @@
1
+ # -*- coding: utf-8 -*-
2
+ from __future__ import absolute_import
3
+
4
+ import os
5
+ from capsul import engine
6
+ import six
7
+
8
+
9
+ def init_settings(capsul_engine):
10
+ with capsul_engine.settings as settings:
11
+ settings.ensure_module_fields('mrtrix',
12
+ [dict(name='directory',
13
+ type='string',
14
+ description='Directory where mrtrix is installed')
15
+ ])
16
+
17
+ # init a single config
18
+ config = settings.config('mrtrix', 'global')
19
+ if not config:
20
+ settings.new_config('mrtrix', 'global',
21
+ {capsul_engine.settings.config_id_field:
22
+ 'mrtrix'})
23
+
24
+
25
+ def check_notably_invalid_config(conf):
26
+ '''
27
+ Checks if the given module config is obviously invalid, for instance
28
+ if a mandatory path is not filled
29
+
30
+ Returns
31
+ -------
32
+ invalid: list
33
+ list of invalid config keys
34
+ '''
35
+ invalid = []
36
+ for k in ('directory', ):
37
+ if getattr(conf, k, None) is None:
38
+ invalid.append(k)
39
+ return invalid
40
+
41
+
42
+ def activate_configurations():
43
+ '''
44
+ Activate the mrtrix module (set env variables) from the global
45
+ configurations, in order to use them via
46
+ :mod:`capsul.in_context.mrtrix` functions
47
+ '''
48
+ conf = engine.configurations.get('capsul.engine.module.mrtrix', {})
49
+ mrtrix_dir = conf.get('directory')
50
+ if mrtrix_dir:
51
+ os.environ['MRTRIXPATH'] = six.ensure_str(mrtrix_dir)
52
+ elif 'MRTRIXPATH' in os.environ:
53
+ del os.environ['MRTRIXPATH']
54
+
55
+
56
+ def edition_widget(engine, environment, config_id='mrtrix'):
57
+ ''' Edition GUI for mrtrix config - see
58
+ :class:`~capsul.qt_gui.widgets.settings_editor.SettingsEditor`
59
+ '''
60
+ from soma.qt_gui.controller_widget import ScrollControllerWidget
61
+ from soma.controller import Controller
62
+ import types
63
+ import traits.api as traits
64
+
65
+ def validate_config(widget):
66
+ widget.update_controller()
67
+ controller = widget.controller_widget.controller
68
+ with widget.engine.settings as session:
69
+ conf = session.config(config_id, widget.environment)
70
+ values = {'config_id': config_id}
71
+ for k in ['directory']:
72
+ value = getattr(controller, k)
73
+ if value is traits.Undefined:
74
+ value = None
75
+ values[k] = value
76
+ if conf is None:
77
+ session.new_config(config_id, widget.environment, values)
78
+ else:
79
+ for k, value in values.items():
80
+ if k == 'config_id':
81
+ continue
82
+ setattr(conf, k, values[k])
83
+
84
+ controller = Controller()
85
+
86
+ controller.add_trait('directory',
87
+ traits.Directory(traits.Undefined,
88
+ desc='Directory where mrtrix is installed'))
89
+
90
+ conf = engine.settings.select_configurations(
91
+ environment, {'mrtrix': 'any'})
92
+ if conf:
93
+ fconf = conf.get('capsul.engine.module.mrtrix', {})
94
+ controller.directory = fconf.get('directory', traits.Undefined)
95
+
96
+ widget = ScrollControllerWidget(controller, live=True)
97
+ widget.engine = engine
98
+ widget.environment = environment
99
+ widget.accept = types.MethodType(validate_config, widget)
100
+
101
+ return widget
@@ -18,7 +18,7 @@ def ensure_config_exists(engine):
18
18
 
19
19
  def init_settings(capsul_engine):
20
20
  with capsul_engine.settings as settings:
21
- settings.ensure_module_fields('nipype',[])
21
+ settings.ensure_module_fields('nipype', [])
22
22
  pass
23
23
 
24
24
  ensure_config_exists(capsul_engine)
@@ -40,7 +40,7 @@ def activate_configurations():
40
40
  from capsul.in_context import nipype
41
41
 
42
42
  # activate optional dependencies first
43
- for module in ('spm', 'fsl', 'freesurfer', 'afni', 'ants'):
43
+ for module in ('spm', 'fsl', 'freesurfer', 'afni', 'ants', 'mrtrix'):
44
44
  module_name = Settings.module_name(module)
45
45
  mod_conf = engine.configurations.get(module_name)
46
46
  if mod_conf:
@@ -1,11 +1,8 @@
1
1
  # -*- coding: utf-8 -*-
2
- from __future__ import absolute_import
3
2
 
4
3
  from capsul import engine
5
4
  import traits.api as traits
6
5
  from traits.api import Undefined
7
- import os
8
- import six
9
6
 
10
7
 
11
8
  def init_settings(capsul_engine):
@@ -135,8 +132,8 @@ def edition_widget(engine, environment, config_id='any'):
135
132
  controller.add_trait('path_translations',
136
133
  traits.Dict(
137
134
  key_trait=traits.Directory,
138
- value_trait=traits.ListStr(['', ''], minlen=2,
139
- maxlen=2),
135
+ value_trait=traits.List(str)(['', ''], minlen=2,
136
+ maxlen=2),
140
137
  value={}, output=False,
141
138
  desc=''))
142
139
 
@@ -169,9 +169,11 @@ def check_notably_invalid_config(conf):
169
169
  list of invalid config keys
170
170
  '''
171
171
  invalid = []
172
- for k in ('directory', 'version'):
173
- if getattr(conf, k, None) is None:
174
- invalid.append(k)
172
+ #for k in ('directory', 'version'):
173
+ # if getattr(conf, k, None) is None:
174
+ # invalid.append(k)
175
+ if getattr(conf, 'directory', None) is None:
176
+ invalid.append('directory')
175
177
  return invalid
176
178
 
177
179
 
@@ -330,7 +330,9 @@ def dispose(engine, execution_id, conditional=False):
330
330
  '''
331
331
  keep = False
332
332
  if conditional:
333
- if not engine.study_config.somaworkflow_keep_succeeded_workflows:
333
+ if engine.study_config.somaworkflow_keep_succeeded_workflows:
334
+ keep = True
335
+ else:
334
336
  keep = False
335
337
  if engine.study_config.somaworkflow_keep_failed_workflows:
336
338
  # must see it it failed or not
@@ -12,7 +12,7 @@ This module provides classes to store CapsulEngine settings for several executio
12
12
 
13
13
  To implement all these features, it was necessary to have a settings storage system providing a query language to express requirements such as ``spm.version >= 12``. Populse_db was thus chosen as the storage and query system for settings. Some of the settings API choices have been influenced by populse_db API.
14
14
 
15
- CapsulEngine settings are organized in modules. Each module defines and documents the schema of values that can be set for its configuration. Typically, a module is dedicated to a software. For instance the module for SPM accepts confiurations containing a version (a string), an install directory (a string), a standalone/matlab flag (a boolean), etc. This schema is used to record configuration documents for the module. There can be several configuration documents per module. Each document corresponds to a full configuration of the module (for instance a document for SPM 8 configuration and another for SPM 12, or one for SPM 12 standalone and another for SPM 12 with matlab).
15
+ CapsulEngine settings are organized in modules. Each module defines and documents the schema of values that can be set for its configuration. Typically, a module is dedicated to a software. For instance the module for SPM accepts configurations containing a version (a string), an install directory (a string), a standalone/matlab flag (a boolean), etc. This schema is used to record configuration documents for the module. There can be several configuration documents per module. Each document corresponds to a full configuration of the module (for instance a document for SPM 8 configuration and another for SPM 12, or one for SPM 12 standalone and another for SPM 12 with matlab).
16
16
 
17
17
  Settings cannot be used directly to configure the execution of a software. It is necessary to first select a single configuration document for each module. This configurations selection step is done by the :meth:`Settings.select_configurations` method.
18
18
 
@@ -413,7 +413,7 @@ class SettingsSession:
413
413
  def remove_config(self, module, environment, config_id):
414
414
  '''
415
415
  Removes a configuration (document in the database) for a given module /
416
- environment, idenfified by its `Settings.config_id_field` value.
416
+ environment, identified by its `Settings.config_id_field` value.
417
417
  '''
418
418
  collection = self.collection_name(module)
419
419
  id = '%s-%s' % (config_id, environment)
@@ -450,7 +450,7 @@ class SettingsSession:
450
450
 
451
451
  def config(self, module, environment, selection=None, any=True):
452
452
  '''
453
- Selects configurations (like in :meth:`congigs`) and ensures at most
453
+ Selects configurations (like in :meth:`configs`) and ensures at most
454
454
  one one is selected
455
455
 
456
456
  Parameters
@@ -504,7 +504,7 @@ class SettingsSession:
504
504
  environments.update([r[0] for r in res])
505
505
  return environments
506
506
 
507
- class SettingsConfig(object):
507
+ class SettingsConfig:
508
508
  def __init__(self, populse_session, collection, id, environment,
509
509
  notifiers=[]):
510
510
  super(SettingsConfig, self).__setattr__('_dbs', populse_session)
@@ -1,6 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
- from __future__ import print_function
3
- from __future__ import absolute_import
4
2
 
5
3
  import gc
6
4
  import unittest
@@ -19,11 +17,7 @@ from soma_workflow import configuration as swconfig
19
17
  from traits.api import File
20
18
 
21
19
 
22
- which = getattr(shutil, 'which', None)
23
- if which is None:
24
- # python2 doesn't have shutil.which
25
- import distutils.spawn
26
- which = distutils.spawn.find_executable
20
+ which = shutil.which
27
21
 
28
22
 
29
23
  def setUpModule():
@@ -97,24 +91,34 @@ def tearDownModule():
97
91
 
98
92
  def check_nipype_spm():
99
93
  # look for hardcoded paths, I have no other way at hand...
100
- spm_standalone_paths = ['/usr/local/spm12-standalone',
101
- '/volatile/local/spm12-standalone',
102
- '/drf/local/spm12-standalone',
103
- '/i2bm/local/spm12-standalone']
94
+ spm_standalone_paths = []
95
+ mcr_path = None
96
+ spm_exe = which('spm12')
97
+ if spm_exe:
98
+ # installed as in neurospin
99
+ with open(spm_exe) as f:
100
+ for l in f.readlines():
101
+ if l.startswith('SPM_HOME='):
102
+ spm_path = l.split('=', 1)[1].strip()
103
+ spm_path = os.path.expandvars(spm_path).strip()
104
+ spm_standalone_paths.append(spm_path)
105
+ elif l.startswith('MCR_HOME='):
106
+ mcr_path = l.split('=', 1)[1].strip()
107
+ mcr_path = os.path.expandvars(mcr_path).strip()
108
+ if not spm_standalone_paths and 'CONDA_PREFIX' in os.environ:
109
+ spm_standalone_paths.append(
110
+ os.path.join(os.getenv('CONDA_PREFIX'), 'share/spm12-standalone'))
111
+
112
+ spm_standalone_paths += ['/usr/local/spm12-standalone',
113
+ '/volatile/local/spm12-standalone',
114
+ '/drf/local/spm12-standalone',
115
+ '/i2bm/local/spm12-standalone']
104
116
  spm_standalone_path = [p for p in spm_standalone_paths if os.path.isdir(p)]
105
117
  if not spm_standalone_path:
106
118
  return None
107
119
  spm_standalone_path = spm_standalone_path[0]
108
- mcr_path = None
109
120
  mcr = glob.glob(osp.join(spm_standalone_path, 'mcr', 'v*'))
110
121
  if not mcr or len(mcr) != 1:
111
- spm_exe = which('spm12')
112
- if spm_exe:
113
- # installed as in neurospin
114
- with open(spm_exe) as f:
115
- for l in f.readlines():
116
- if l.startswith('MCR_HOME='):
117
- mcr_path = l.split('=', 1)[1]
118
122
  if not mcr_path:
119
123
  mcr_paths = ['/usr/local/matlab/MATLAB_Runtime',
120
124
  '/volatile/local/spm12-standalone/mcr',
@@ -184,6 +188,14 @@ class TestCapsulEngine(unittest.TestCase):
184
188
  settings.new_config('ants', 'global', {'directory': '/there',
185
189
  cif: '235'})
186
190
 
191
+ # Create a global mrtrix configuration
192
+ config = settings.config('mrtrix', 'global')
193
+ if config:
194
+ settings.remove_config('mrtrix', 'global',
195
+ getattr(config, cif))
196
+ settings.new_config('mrtrix', 'global', {'directory': '/there',
197
+ cif: '400'})
198
+
187
199
  # Create two global SPM configurations
188
200
  settings.new_config('spm', 'global', {'version': '8',
189
201
  'standalone': True,
@@ -202,7 +214,8 @@ class TestCapsulEngine(unittest.TestCase):
202
214
  'capsul.engine.module.matlab': 'ALL',
203
215
  'capsul.engine.module.spm': 'ALL',
204
216
  'capsul.engine.module.afni': 'ALL',
205
- 'capsul.engine.module.ants': 'ALL'}},
217
+ 'capsul.engine.module.ants': 'ALL',
218
+ 'capsul.engine.module.mrtrix': 'ALL'}},
206
219
  'capsul.engine.module.fsl': {'config_environment': 'global',
207
220
  'directory': '/there',
208
221
  cif: '5'},
@@ -212,6 +225,9 @@ class TestCapsulEngine(unittest.TestCase):
212
225
  'capsul.engine.module.ants': {
213
226
  'config_environment': 'global', 'directory': '/there',
214
227
  cif: '235'},
228
+ 'capsul.engine.module.mrtrix': {
229
+ 'config_environment': 'global', 'directory': '/there',
230
+ cif: '400'},
215
231
  'capsul.engine.module.spm': {'config_environment': 'my_machine',
216
232
  'version': '20',
217
233
  'standalone': True,
@@ -246,6 +262,15 @@ class TestCapsulEngine(unittest.TestCase):
246
262
  'capsul_engine':
247
263
  {'uses': {'capsul.engine.module.ants': 'any'}}})
248
264
 
265
+ self.assertEqual(
266
+ self.ce.settings.select_configurations('global',
267
+ uses={'mrtrix': 'any'}),
268
+ {'capsul.engine.module.mrtrix':
269
+ {'config_environment': 'global', 'directory': '/there',
270
+ cif: '400'},
271
+ 'capsul_engine':
272
+ {'uses': {'capsul.engine.module.mrtrix': 'any'}}})
273
+
249
274
  self.assertEqual(
250
275
  self.ce.settings.select_configurations('global',
251
276
  uses={'spm': 'any'}),
@@ -0,0 +1,143 @@
1
+ # -*- coding: utf-8 -*-
2
+ '''
3
+ Specific subprocess-like functions to call Freesurfer taking into account
4
+ configuration stored in the activated configuration.
5
+ '''
6
+
7
+ from __future__ import absolute_import
8
+
9
+ import os
10
+ import os.path as osp
11
+ import soma.subprocess
12
+ from soma.utils.env import parse_env_lines
13
+ from capsul import engine
14
+ import pipes
15
+ import six
16
+
17
+ '''
18
+ If this variable is set, it contains FS runtime env variables,
19
+ allowing to run directly freesurfer commands from this process.
20
+ '''
21
+ freesurfer_runtime_env = None
22
+
23
+
24
+ def freesurfer_command_with_environment(command, use_runtime_env=True):
25
+ '''
26
+ Given a Freesurfer command where first element is a command name without
27
+ any path or prefix (e.g. "recon-all"). Returns the appropriate command to
28
+ call taking into account the Freesurfer configuration stored in the
29
+ activated configuration.
30
+
31
+ Using :func`freesurfer_env` is an alternative to this.
32
+ '''
33
+
34
+ if use_runtime_env and freesurfer_runtime_env:
35
+ c0 = list(osp.split(command[0]))
36
+ c0 = osp.join(*c0)
37
+ cmd = [c0] + command[1:]
38
+ return cmd
39
+
40
+ fconf = engine.configurations.get('capsul.engine.module.freesurfer')
41
+
42
+ if fconf:
43
+ freesurfer_script = fconf.get('setup')
44
+
45
+ if freesurfer_script is not None and os.path.isfile(freesurfer_script):
46
+ freesurfer_dir = os.path.dirname(freesurfer_script)
47
+
48
+ else:
49
+ freesurfer_dir = None
50
+
51
+ else:
52
+ freesurfer_dir = os.environ.get('FREESURFER_HOME')
53
+
54
+ if freesurfer_dir is not None:
55
+ freesurfer_script = os.path.join(freesurfer_dir,
56
+ 'SetUpFreeSurfer.sh')
57
+
58
+ if not os.path.isfile(freesurfer_script):
59
+ freesurfer_script = None
60
+
61
+ else:
62
+ freesurfer_script = None
63
+
64
+ if freesurfer_dir is not None and freesurfer_script is not None:
65
+ shell = os.environ.get('SHELL', '/bin/sh')
66
+
67
+ if shell.endswith('csh'):
68
+ cmd = [shell, '-c',
69
+ 'setenv FREESURFER_HOME "{0}"; source {1}; exec {2} '.format(
70
+ freesurfer_dir, freesurfer_script, command[0]) + \
71
+ ' '.join("'%s'" % i.replace("'", "\\'") for i in command[1:])]
72
+
73
+ else:
74
+ cmd = [shell, '-c',
75
+ 'export FREESURFER_HOME="{0}"; source {1}; exec {2} '.format(
76
+ freesurfer_dir, freesurfer_script, command[0]) + \
77
+ ' '.join("'%s'" % i.replace("'", "\\'") for i in command[1:])]
78
+
79
+ return cmd
80
+
81
+
82
+ def freesurfer_env():
83
+ '''
84
+ get Freesurfer env variables by running the setup script in a separate bash
85
+ process
86
+ '''
87
+ global freesurfer_runtime_env
88
+
89
+ if freesurfer_runtime_env is not None:
90
+ return freesurfer_runtime_env
91
+
92
+ kwargs = {}
93
+ cmd = freesurfer_command_with_environment(['env'], use_runtime_env=False)
94
+ new_env = soma.subprocess.check_output(cmd, **kwargs).decode(
95
+ 'utf-8').strip()
96
+ new_env = parse_env_lines(new_env)
97
+ env = {}
98
+
99
+ for l in new_env:
100
+ name, val = l.strip().split('=', 1)
101
+ name = six.ensure_str(name)
102
+ val = six.ensure_str(val)
103
+
104
+ if name not in ('_', 'SHLVL') and (name not in os.environ
105
+ or os.environ[name] != val):
106
+ env[name] = val
107
+
108
+ # cache dict
109
+ freesurfer_runtime_env = env
110
+ return env
111
+
112
+
113
+ class FreesurferPopen(soma.subprocess.Popen):
114
+ '''
115
+ Equivalent to Python subprocess.Popen for Freesurfer commands
116
+ '''
117
+ def __init__(self, command, **kwargs):
118
+ cmd = freesurfer_command_with_environment(command)
119
+ super(FreesurferPopen, self).__init__(cmd, **kwargs)
120
+
121
+
122
+ def freesurfer_call(command, **kwargs):
123
+ '''
124
+ Equivalent to Python subprocess.call for Freesurfer commands
125
+ '''
126
+ cmd = freesurfer_command_with_environment(command)
127
+ return soma.subprocess.call(cmd, **kwargs)
128
+
129
+
130
+ def freesurfer_check_call(command, **kwargs):
131
+ '''
132
+ Equivalent to Python subprocess.check_call for Freesurfer commands
133
+ '''
134
+ cmd = freesurfer_command_with_environment(command)
135
+ return soma.subprocess.call(cmd, **kwargs)
136
+
137
+
138
+ def freesurfer_check_output(command, **kwargs):
139
+ '''
140
+ Equivalent to Python subprocess.check_output for Freesurfer commands
141
+ '''
142
+ cmd = freesurfer_command_with_environment(command)
143
+ return soma.subprocess.check_output(cmd, **kwargs)
@@ -12,7 +12,7 @@ with statement). For instance::
12
12
  with ce:
13
13
  fsl_check_call(['bet', '/somewhere/myimage.nii'])
14
14
 
15
- For calling FSL command with this module, the first arguent of
15
+ For calling FSL command with this module, the first argument of
16
16
  command line must be the FSL executable without any path nor prefix.
17
17
  Prefix are used in Neurodebian install. For instance on Ubuntu 16.04
18
18
  Neurodebian FSL commands are prefixed with "fsl5.0-".