scipion-pyworkflow 3.5.0__tar.gz → 3.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 (167) hide show
  1. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/PKG-INFO +1 -1
  2. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/config.py +178 -151
  3. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/constants.py +2 -2
  4. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/browser.py +12 -6
  5. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/canvas.py +2 -2
  6. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/dialog.py +45 -59
  7. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/graph_layout.py +29 -37
  8. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/gui.py +20 -20
  9. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/base.py +4 -1
  10. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/labels.py +4 -2
  11. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/project.py +7 -16
  12. scipion_pyworkflow-3.6.0/pyworkflow/gui/project/variables.py +179 -0
  13. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/viewprojects.py +3 -5
  14. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/viewprotocols_extra.py +1 -2
  15. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/mapper.py +1 -2
  16. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/sqlite.py +48 -13
  17. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/object.py +3 -3
  18. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/plugin.py +14 -5
  19. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/protocol.py +10 -1
  20. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/template.py +8 -16
  21. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/path.py +26 -0
  22. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/progressbar.py +14 -3
  23. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/properties.py +2 -1
  24. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/utils.py +15 -1
  25. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_mappers.py +22 -0
  26. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_object.py +6 -3
  27. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/PKG-INFO +1 -1
  28. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/SOURCES.txt +1 -0
  29. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/LICENSE.txt +0 -0
  30. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/MANIFEST.in +0 -0
  31. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/README.rst +0 -0
  32. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/__init__.py +0 -0
  33. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/__init__.py +0 -0
  34. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_manager.py +0 -0
  35. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_plot.py +0 -0
  36. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_project.py +0 -0
  37. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_protocol_list.py +0 -0
  38. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_protocol_run.py +0 -0
  39. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_run_tests.py +0 -0
  40. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_schedule_run.py +0 -0
  41. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_sleep.py +0 -0
  42. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_sync_data.py +0 -0
  43. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/apps/pw_viewer.py +0 -0
  44. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/exceptions.py +0 -0
  45. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/__init__.py +0 -0
  46. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/form.py +0 -0
  47. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/graph.py +0 -0
  48. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/matplotlib_image.py +0 -0
  49. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/plotter.py +0 -0
  50. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/__init__.py +0 -0
  51. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/constants.py +0 -0
  52. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/searchprotocol.py +0 -0
  53. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/searchrun.py +0 -0
  54. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/steps.py +0 -0
  55. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/utils.py +0 -0
  56. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/viewdata.py +0 -0
  57. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/project/viewprotocols.py +0 -0
  58. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/text.py +0 -0
  59. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/tooltip.py +0 -0
  60. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/tree.py +0 -0
  61. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/gui/widgets.py +0 -0
  62. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/__init__.py +0 -0
  63. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/sqlite_db.py +0 -0
  64. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/mapper/xmlmapper.py +0 -0
  65. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/__init__.py +0 -0
  66. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/config.py +0 -0
  67. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/manager.py +0 -0
  68. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/project.py +0 -0
  69. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/clean_projects.py +0 -0
  70. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/config.py +0 -0
  71. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/create.py +0 -0
  72. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/edit_workflow.py +0 -0
  73. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/fix_links.py +0 -0
  74. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/load.py +0 -0
  75. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/refresh.py +0 -0
  76. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/schedule.py +0 -0
  77. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/stack2volume.py +0 -0
  78. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/project/scripts/stop.py +0 -0
  79. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/__init__.py +0 -0
  80. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/bibtex.py +0 -0
  81. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/constants.py +0 -0
  82. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/executor.py +0 -0
  83. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/hosts.py +0 -0
  84. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/launch.py +0 -0
  85. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/package.py +0 -0
  86. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/protocol/params.py +0 -0
  87. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/Imagej.png +0 -0
  88. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/chimera.png +0 -0
  89. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/fa-exclamation-triangle_alert.png +0 -0
  90. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/fa-info-circle_alert.png +0 -0
  91. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/fa-search.png +0 -0
  92. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/fa-times-circle_alert.png +0 -0
  93. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/file_vol.png +0 -0
  94. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/loading.gif +0 -0
  95. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/no-image128.png +0 -0
  96. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_bn.png +0 -0
  97. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon.png +0 -0
  98. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon.svg +0 -0
  99. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon_proj.png +0 -0
  100. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon_projs.png +0 -0
  101. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_icon_prot.png +0 -0
  102. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_logo.png +0 -0
  103. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_logo_normal.png +0 -0
  104. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/scipion_logo_small.png +0 -0
  105. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/arrowDown.png +0 -0
  106. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/arrowUp.png +0 -0
  107. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/background_section.png +0 -0
  108. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/colRowModeOff.png +0 -0
  109. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/colRowModeOn.png +0 -0
  110. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/delete.png +0 -0
  111. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/doc_icon.png +0 -0
  112. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/download_icon.png +0 -0
  113. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/enabled_gallery.png +0 -0
  114. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/galleryViewOff.png +0 -0
  115. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/galleryViewOn.png +0 -0
  116. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/goto.png +0 -0
  117. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/menu.png +0 -0
  118. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/separator.png +0 -0
  119. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/tableViewOff.png +0 -0
  120. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/tableViewOn.png +0 -0
  121. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  122. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  123. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  124. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/volumeOff.png +0 -0
  125. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/showj/volumeOn.png +0 -0
  126. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/sprites.png +0 -0
  127. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/sprites.xcf +0 -0
  128. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/resources/wait.gif +0 -0
  129. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/tests/__init__.py +0 -0
  130. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/tests/test_utils.py +0 -0
  131. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/tests/tests.py +0 -0
  132. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/__init__.py +0 -0
  133. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/dataset.py +0 -0
  134. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/echo.py +0 -0
  135. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/graph.py +0 -0
  136. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/log.py +0 -0
  137. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/process.py +0 -0
  138. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/profiler.py +0 -0
  139. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/reflection.py +0 -0
  140. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/utils/which.py +0 -0
  141. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/viewer.py +0 -0
  142. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/webservices/__init__.py +0 -0
  143. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/webservices/config.py +0 -0
  144. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/webservices/notifier.py +0 -0
  145. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/webservices/repository.py +0 -0
  146. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflow/wizard.py +0 -0
  147. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/__init__.py +0 -0
  148. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/bibtex.py +0 -0
  149. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/objects.py +0 -0
  150. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/protocols.py +0 -0
  151. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/__init__.py +0 -0
  152. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_canvas.py +0 -0
  153. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_domain.py +0 -0
  154. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_logs.py +0 -0
  155. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_project.py +0 -0
  156. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_protocol_execution.py +0 -0
  157. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_protocol_export.py +0 -0
  158. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_protocol_output.py +0 -0
  159. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_streaming.py +0 -0
  160. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/pyworkflowtests/tests/test_utils.py +0 -0
  161. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/requirements.txt +0 -0
  162. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/dependency_links.txt +0 -0
  163. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/entry_points.txt +0 -0
  164. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/requires.txt +0 -0
  165. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/scipion_pyworkflow.egg-info/top_level.txt +0 -0
  166. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/setup.cfg +0 -0
  167. {scipion-pyworkflow-3.5.0 → scipion_pyworkflow-3.6.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scipion-pyworkflow
3
- Version: 3.5.0
3
+ Version: 3.6.0
4
4
  Summary: Simple workflow platform used in scientific applications, initially developed within the Scipion framework for image processing in Electron Microscopy.
5
5
  Home-page: https://github.com/scipion-em/scipion-pyworkflow
6
6
  Author: J.M. De la Rosa Trevin, Roberto Marabini, Grigory Sharov, Josue Gomez Blanco, Pablo Conesa, Yunior Fonseca Reyna
@@ -1,10 +1,9 @@
1
- import enum
2
1
  import logging
2
+
3
3
  logger = logging.getLogger(__file__)
4
4
  import ast
5
5
  import importlib
6
6
  import inspect
7
- import json
8
7
  import os
9
8
  import shutil
10
9
  import sys
@@ -65,49 +64,72 @@ def getModuleFolder(moduleName):
65
64
  spec = importlib.util.find_spec(moduleName)
66
65
  return os.path.dirname(spec.origin)
67
66
 
68
- class VarTypes(enum.Enum):
69
- STRING = 1
70
- INTEGER = 2
71
- BOOLEAN = 3
72
- PATH = 4
73
67
 
74
- class Variable(object):
75
- """ Class for variables of the Config class."""
76
- def __init__(self, value, varType:VarTypes=VarTypes.STRING):
77
- """
78
- :param value: Value of the variable
79
- :param type: Type of the variable"""
80
- super().__init__()
68
+ def validColor(colorname):
69
+ """ If it can be converted to rgb is a valid color"""
70
+ from matplotlib.colors import to_rgb
71
+ to_rgb(colorname)
72
+ return colorname
73
+
74
+ class VarTypes(Enum):
75
+ STRING = 0
76
+ BOOLEAN = 1
77
+ PATH = 2 # Any Path: Folder or file
78
+ INTEGER = 3
79
+ DECIMAL = 4
80
+ FILENAME = 5 # Just the base name of a file
81
+ FOLDER = 6 # A folder
82
+
83
+ class Variable:
84
+ def __init__(self, name, description, source, value, default, var_type: VarTypes = VarTypes.STRING, isDefault=None):
85
+ self.name = name
86
+ self.description = description
87
+ self.source = source
81
88
  self.value = value
82
- self.varType = varType
83
- def __bool__(self):
84
- return bool(self.value)
85
-
86
- def __int__(self):
87
- return int(self.value)
88
- def __str__(self):
89
- return str(self.value)
89
+ self.default = default
90
+ self.var_type = var_type
91
+ self.isDefault = isDefault if isDefault is not None else value==default
92
+ def setToDefault(self):
93
+ self.isDefault=True
94
+ self.value=self.default
95
+
96
+ class VariablesRegistry:
97
+ _variables={}
98
+
99
+ def __init__(self):
100
+ raise RuntimeError("Variables class doesn't need to be instantiated.")
101
+ @classmethod
102
+ def register(cls, variable: Variable):
103
+ cls._variables[variable.name] = variable
90
104
 
91
- def __eq__(self, other):
92
- return other == self.value
105
+ @classmethod
106
+ def variables(cls):
107
+ return cls._variables
93
108
 
94
- def __repr__(self):
95
- return self.__str__()
109
+ @classmethod
110
+ def __iter__(cls):
111
+ """ Iterate alphabetically"""
112
+ for key in sorted(cls._variables):
113
+ yield cls._variables[key]
96
114
 
97
- def __fspath__(self):
98
- return self.__str__()
115
+ @classmethod
116
+ def save(cls, path):
117
+ """ Saves the variables in the path specified """
118
+ from pyworkflow.utils import backup
119
+ backup(path)
99
120
 
100
- " We migth need to imlement more like this--> https://docs.python.org/3.3/reference/datamodel.html#object.__truediv__"
101
- def __truediv__(self, other):
102
- return float(self.value)/other
121
+ with open(path,"w") as fh:
122
+ # Save the section as in any python config file format.
123
+ fh.write("[PYWORKFLOW]\n")
124
+ for var in cls.__iter__():
125
+ if var.source == "pyworkflow" and not var.isDefault:
126
+ fh.write("%s=%s\n" % (var.name, var.value))
103
127
 
104
- def __rtruediv__(self, other):
105
- return other / float(self.value)
128
+ fh.write("\n[PLUGINS]\n")
129
+ for var in cls._variables.values():
130
+ if var.source != "pyworkflow" and not var.isDefault:
131
+ fh.write("%s=%s\n" % (var.name, var.value))
106
132
 
107
- def __add__(self, other):
108
- return self.value+other
109
- def __radd__(self, other):
110
- return other+self.value
111
133
 
112
134
  class Config:
113
135
  """ Main Config for pyworkflow. It contains the main Scipion configuration variables
@@ -115,17 +137,34 @@ class Config:
115
137
  Necessary value is SCIPION_HOME and has to be present in the environment"""
116
138
 
117
139
  @staticmethod
118
- def __get(key, default):
119
- value = os.environ.get(key, default)
140
+ def __get(key, default, description=None, caster=None, var_type:VarTypes=VarTypes.STRING, source="pyworkflow"):
120
141
 
142
+ if key in os.environ:
143
+ value = os.environ.get(key)
144
+ isDefault = (value==default)
145
+ else:
146
+ isDefault = True
147
+ value = default
148
+
149
+ # If the caster is passed do the casting, if fails go back to default
150
+ if caster:
151
+ try:
152
+ value=caster(value)
153
+ except:
154
+ logger.warning("Variable %s has this value %s that can't be casted to the right type (%s). Using %s (default value)" %
155
+ (key,value, caster, default))
156
+ value = default
121
157
  # If empty use default value
122
158
  if value == "" != default:
123
159
  logger.warning("%s variable is empty, falling back to default value (%s)" % (key, default))
124
160
  value = default
161
+
125
162
  # Expand user and variables if string value
126
163
  if isinstance(value, str):
127
164
  value = os.path.expandvars(os.path.expanduser(value))
128
165
 
166
+ # Register the variable
167
+ VariablesRegistry.register(Variable(key,description, source, value, default, var_type=var_type, isDefault=isDefault))
129
168
  return value
130
169
 
131
170
  class Root:
@@ -143,12 +182,11 @@ class Config:
143
182
 
144
183
  # Home for scipion
145
184
  _get = __get.__func__
146
- SCIPION_HOME = os.path.abspath(_get(SCIPION_HOME_VAR, ''))
147
- "Path where Scipion is installed. Other paths are based on this like SCIPION_SOFTWARE, SCIPION_TESTS,... unless specified"
185
+ SCIPION_HOME = os.path.abspath(_get(SCIPION_HOME_VAR, '',
186
+ "Path where Scipion is installed. Other paths are based on this like SCIPION_SOFTWARE, SCIPION_TESTS,... unless specified"))
148
187
 
149
- # Actual SCIPION_HOME
150
- SCIPION_HOME_DEFINED = _get(SCIPION_HOME_VAR, False)
151
- "False if SCIPION_HOME is not found in the environment"
188
+ # False if SCIPION_HOME is not found in the environment. To distinguish API documentation generation execution.
189
+ SCIPION_HOME_DEFINED = SCIPION_HOME != ''
152
190
 
153
191
  _root = Root(str(SCIPION_HOME))
154
192
  _join = _root.join
@@ -156,133 +194,133 @@ class Config:
156
194
  # Internal cached variables, use __ so they are not returned in getVars
157
195
  __activeColor = None
158
196
 
159
- CONDA_ACTIVATION_CMD = _get(CONDA_ACTIVATION_CMD_VAR,'')
160
- "str: Command to activate/initialize conda itself. Do not confuse it with 'conda activate'. It should be defined at installation time. It looks like this: eval \"$(/extra/miniconda3/bin/conda shell.bash hook)\""
197
+ CONDA_ACTIVATION_CMD = _get(CONDA_ACTIVATION_CMD_VAR,'',
198
+ "str: Command to activate/initialize conda itself. Do not confuse it with 'conda activate'. It should be defined at installation time. It looks like this: eval \"$(/extra/miniconda3/bin/conda shell.bash hook)\"")
161
199
 
162
200
  # SCIPION PATHS
163
- SCIPION_SOFTWARE = _join(_get('SCIPION_SOFTWARE', 'software'))
164
- "Path where Scipion will install the software. Defaults to SCIPION_HOME/software."
201
+ SCIPION_SOFTWARE = _get('SCIPION_SOFTWARE', _join('software'),
202
+ "Path where Scipion will install the software. Defaults to SCIPION_HOME/software.", var_type=VarTypes.FOLDER)
165
203
 
166
- SCIPION_TESTS = _join(_get('SCIPION_TESTS', os.path.join('data', 'tests')))
167
- "Path where to find/download test data. Defaults to SCIPION_HOME/data/tests."
204
+ SCIPION_TESTS = _get('SCIPION_TESTS', _join('data', 'tests'),
205
+ "Path where to find/download test data. Defaults to SCIPION_HOME/data/tests.", var_type=VarTypes.FOLDER)
168
206
 
169
207
  # User dependent paths
170
- SCIPION_USER_DATA = _get('SCIPION_USER_DATA', '~/ScipionUserData')
171
- "Path where Scipion projects are or will be created. Defaults to ~/ScipionUserData"
172
-
173
- SCIPION_TMP = _get('SCIPION_TMP', _join(SCIPION_USER_DATA, 'tmp'))
174
- "General purpose scipion tmp folder. Defaults to SCIPION_USER_DATA/tmp"
208
+ SCIPION_USER_DATA = _get('SCIPION_USER_DATA', '~/ScipionUserData',
209
+ "Path where Scipion projects are or will be created. Defaults to ~/ScipionUserData", var_type=VarTypes.FOLDER)
175
210
 
176
211
  # LOGGING variables
177
- SCIPION_LOGS = _get('SCIPION_LOGS', _join(SCIPION_USER_DATA, 'logs'))
178
- "Path for Scipion logs folder used by the GUI. Defaults to SCIPION_USER_DATA/logs."
212
+ SCIPION_LOGS = _get('SCIPION_LOGS', _join(SCIPION_USER_DATA, 'logs'),
213
+ "Folder for Scipion logs used by the GUI. Defaults to SCIPION_USER_DATA/logs.", var_type=VarTypes.FOLDER)
179
214
 
180
- SCIPION_LOG_CONFIG = _get('SCIPION_LOG_CONFIG', None)
181
- "Optional. Path to a python logging configuration file fine tune the logging."
215
+ SCIPION_LOG_CONFIG = _get('SCIPION_LOG_CONFIG', None,
216
+ "Optional. Path to a python logging configuration file to fine tune the logging.", var_type=VarTypes.PATH)
182
217
 
183
- SCIPION_LOG = _join(SCIPION_LOGS, 'scipion.log')
184
- "Path to the file where scipion will write GUI logging messages. Defaults to SCIPION_LOGS/scipion.log"
218
+ SCIPION_LOG = _get('SCIPION_LOG', _join(SCIPION_LOGS, 'scipion.log'),
219
+ "Path to the file where scipion will write GUI logging messages. Defaults to SCIPION_LOGS/scipion.log", var_type=VarTypes.PATH)
185
220
 
186
- SCIPION_LOG_FORMAT = _get('SCIPION_LOG_FORMAT', "%(message)s")
187
- "str: Format for all the log lines, defaults to %(message)s. To compose the format see https://docs.python.org/3/library/logging.html#logrecord-attributes"
221
+ SCIPION_LOG_FORMAT = _get('SCIPION_LOG_FORMAT', "%(message)s",
222
+ "str: Format for all the log lines, defaults to %(message)s. To compose the format see https://docs.python.org/3/library/logging.html#logrecord-attributes")
188
223
 
189
- SCIPION_LOG_LEVEL = _get(SCIPION_LOG_LEVEL, 'INFO')
190
- "Default logging level. String among CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET. Default value is INFO."
224
+ SCIPION_LOG_LEVEL = _get(SCIPION_LOG_LEVEL, 'INFO',
225
+ "Default logging level. String among CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET. Default value is INFO.")
191
226
 
192
- NO_COLOR = _get('NO_COLOR', '')
193
- "str: Comply with https://no-color.org/ initiative. Set it to something different than '' to deactivate colors in the output."
227
+ NO_COLOR = _get('NO_COLOR', '',
228
+ "str: Comply with https://no-color.org/ initiative. Set it to something different than '' to deactivate colors in the output.")
194
229
 
195
- SCIPION_SCRATCH = _get(SCIPION_SCRATCH, None)
196
- "Optional. Path to a location mounted in a scratch drive (SSD,...)"
230
+ SCIPION_SCRATCH = _get(SCIPION_SCRATCH, None,
231
+ "Optional. Path to a location mounted in a scratch drive (SSD,...)")
197
232
 
198
- SCIPION_TESTS_OUTPUT = _get('SCIPION_TESTS_OUTPUT', _join(SCIPION_USER_DATA, 'Tests'))
199
- "Path to a folder Where the output of the tests will be written. Defaults to SCIPION_USER_DATA/Tests."
233
+ SCIPION_TESTS_OUTPUT = _get('SCIPION_TESTS_OUTPUT', _join(SCIPION_USER_DATA, 'Tests'),
234
+ "Path to a folder where the output of the tests will be written. Defaults to SCIPION_USER_DATA/Tests.", var_type=VarTypes.FOLDER)
200
235
 
201
- SCIPION_TEST_NOSYNC = _get('SCIPION_TEST_NOSYNC', FALSE_STR) != FALSE_STR
202
- "Set it to 1, True, Yes or y to cancel test dataset synchronization. Needed when updating files in a dataset."
236
+ SCIPION_TEST_NOSYNC = _get('SCIPION_TEST_NOSYNC', FALSE_STR,
237
+ "Set it to 1, True, Yes or y to cancel test dataset synchronization. Needed when updating files in a dataset.") != FALSE_STR
203
238
 
204
- SCIPION_SUPPORT_EMAIL = _get('SCIPION_SUPPORT_EMAIL', 'scipion@cnb.csic.es')
239
+ SCIPION_SUPPORT_EMAIL = 'scipion@cnb.csic.es'
205
240
 
206
241
  # Config variables
207
- SCIPION_CONFIG = _get('SCIPION_CONFIG', 'scipion.conf')
208
- "Path to the scipion configuration file where all this variables could be defined."
242
+ SCIPION_CONFIG = _get('SCIPION_CONFIG', _join('config','scipion.conf'),
243
+ "Path to the scipion configuration file where all this variables could be defined.", var_type=VarTypes.PATH)
209
244
 
210
- SCIPION_LOCAL_CONFIG = _get('SCIPION_LOCAL_CONFIG', SCIPION_CONFIG)
211
- "Path to an optional/extra/user configuration file meant to overwrite default variables."
245
+ SCIPION_LOCAL_CONFIG = _get('SCIPION_LOCAL_CONFIG', SCIPION_CONFIG,
246
+ "Path to an optional/extra/user configuration file meant to overwrite default variables.", var_type=VarTypes.PATH)
212
247
 
213
- SCIPION_HOSTS = _get('SCIPION_HOSTS', 'hosts.conf')
214
- "Path to the host.cof file to allow scipion to use queue engines and run in HPC environments."
248
+ SCIPION_HOSTS = _get('SCIPION_HOSTS', _join('config','hosts.conf'),
249
+ "Path to the host.cof file to allow scipion to use queue engines and run in HPC environments.")
215
250
 
216
- SCIPION_PROTOCOLS = _get('SCIPION_PROTOCOLS', 'protocols.conf')
217
- ""
251
+ SCIPION_PROTOCOLS = _get('SCIPION_PROTOCOLS', _join('config','protocols.conf'),
252
+ "Custom conf file to extend the protocols tree view panel (panel on the left)")
218
253
 
219
- SCIPION_PLUGIN_JSON = _get('SCIPION_PLUGIN_JSON', None)
220
- "Optional. Path to get the json file with all the plugins available for Scipion."
254
+ SCIPION_PLUGIN_JSON = _get('SCIPION_PLUGIN_JSON', None,
255
+ "Optional. Path to get the json file with all the plugins available for Scipion.")
221
256
 
222
257
  SCIPION_PLUGIN_REPO_URL = _get('SCIPION_PLUGIN_REPO_URL',
223
- 'http://scipion.i2pc.es/getplugins/')
224
- "Url from where to get the list of plugins."
258
+ 'https://scipion.i2pc.es/getplugins/',
259
+ "Url from where to get the list of plugins.")
225
260
 
226
261
  # REMOTE Section
227
- SCIPION_URL = _get('SCIPION_URL', 'http://scipion.cnb.csic.es/downloads/scipion')
228
- SCIPION_URL_SOFTWARE = _get('SCIPION_URL_SOFTWARE', SCIPION_URL + '/software')
229
- SCIPION_URL_TESTDATA = _get('SCIPION_URL_TESTDATA', SCIPION_URL + '/data/tests')
262
+ SCIPION_URL = 'https://scipion.cnb.csic.es/downloads/scipion'
263
+ SCIPION_URL_SOFTWARE = SCIPION_URL + '/software'
264
+ SCIPION_URL_TESTDATA = SCIPION_URL + '/data/tests'
230
265
 
231
266
  # Scipion Notes
232
- SCIPION_NOTES_FILE = _get(SCIPION_NOTES_FILE, 'notes.txt')
233
- "Name of the file where to write per project notes."
267
+ SCIPION_NOTES_FILE = _get(SCIPION_NOTES_FILE, 'notes.txt',
268
+ "Name of the file where to write per project notes.")
234
269
 
235
- SCIPION_NOTES_PROGRAM = _get(SCIPION_NOTES_PROGRAM, None)
236
- "Command or program to use to open the notes file. Otherwise system will extension association will take place."
270
+ SCIPION_NOTES_PROGRAM = _get(SCIPION_NOTES_PROGRAM, None,
271
+ "Command or program to use to open the notes file. Otherwise system will extension association will take place.")
237
272
 
238
273
  SCIPION_NOTES_ARGS = _get(SCIPION_NOTES_ARGS, None)
239
274
 
240
275
  # Aspect
241
- SCIPION_FONT_NAME = _get('SCIPION_FONT_NAME', "Helvetica")
242
- "Name of the font to use in Scipion GUI. Defaults to Helvetica."
276
+ SCIPION_FONT_NAME = _get('SCIPION_FONT_NAME', "Helvetica",
277
+ "Name of the font to use in Scipion GUI. Defaults to Helvetica.")
243
278
 
244
- SCIPION_FONT_SIZE = int(_get('SCIPION_FONT_SIZE', SCIPION_DEFAULT_FONT_SIZE))
245
- "Size of the 'normal' font to be used in Scipion GUI. Defaults to 10."
279
+ SCIPION_FONT_SIZE = _get('SCIPION_FONT_SIZE', SCIPION_DEFAULT_FONT_SIZE,
280
+ "Size of the 'normal' font to be used in Scipion GUI. Defaults to 10.", caster=int)
246
281
 
247
- SCIPION_MAIN_COLOR = _get('SCIPION_MAIN_COLOR', Color.MAIN_COLOR)
248
- "str: Main color of the GUI. Background will be white, so for better contrast choose a dark color. Probably any name here will work: https://matplotlib.org/stable/gallery/color/named_colors.html"
282
+ SCIPION_MAIN_COLOR = _get('SCIPION_MAIN_COLOR', Color.MAIN_COLOR,
283
+ "str: Main color of the GUI. Background will be white, so for better contrast choose a dark color. Probably any name here will work: https://matplotlib.org/stable/gallery/color/named_colors.html",
284
+ caster=validColor)
249
285
 
250
- SCIPION_BG_COLOR = _get('SCIPION_BG_COLOR', Color.BG_COLOR)
251
- "str: Main background color of the GUI. Default is white, chose a light one. Probably any name here will work: https://matplotlib.org/stable/gallery/color/named_colors.html"
286
+ SCIPION_BG_COLOR = _get('SCIPION_BG_COLOR', Color.BG_COLOR,
287
+ "str: Main background color of the GUI. Default is white, chose a light one. Probably any name here will work: https://matplotlib.org/stable/gallery/color/named_colors.html",
288
+ validColor)
252
289
 
253
- WIZARD_MASK_COLOR = _get('WIZARD_MASK_COLOR', '[0.125, 0.909, 0.972]')
254
- "Color to use in some wizards."
290
+ SCIPION_CONTRAST_COLOR = _get('SCIPION_CONTRAST_COLOR', 'cyan',
291
+ "Color used to highlight features over grayscaled images.", caster=validColor)
255
292
 
256
- SCIPION_SPRITES_FILE = _get('SCIPION_SPRITES_FILE', _join(getResourcesPath(),'sprites.png'))
257
- "File (png) with the icons in a collage. Default is found at pyworkflow/resources/sprites.png. And a GIMP file could be found at the same folder in the github repo."
293
+ SCIPION_SPRITES_FILE = _get('SCIPION_SPRITES_FILE', _join(getResourcesPath(),'sprites.png'),
294
+ "File (png) with the icons in a collage. Default is found at pyworkflow/resources/sprites.png. And a GIMP file could be found at the same folder in the github repo.")
258
295
 
259
- SCIPION_SHOW_TEXT_IN_TOOLBAR = _get('SCIPION_SHOW_TEXT_IN_TOOLBAR', TRUE_STR) == TRUE_STR
260
- "Define it to anything else except False to show the label of the icons. It will take more space."
296
+ SCIPION_SHOW_TEXT_IN_TOOLBAR = _get('SCIPION_SHOW_TEXT_IN_TOOLBAR', TRUE_STR,
297
+ "Define it to anything else except False to show the label of the icons. It will take more space.") == TRUE_STR
261
298
 
262
- SCIPION_ICON_ZOOM = int(_get('SCIPION_ICON_ZOOM', 50))
263
- "Define it to anything else except False to show the label of the icons. It will take more space."
299
+ SCIPION_ICON_ZOOM = _get('SCIPION_ICON_ZOOM', 50,
300
+ "Define it to anything else except False to show the label of the icons. It will take more space.", var_type=VarTypes.INTEGER, caster=int)
264
301
 
265
302
  # Notification
266
- SCIPION_NOTIFY = _get('SCIPION_NOTIFY', TRUE_STR) == TRUE_STR
267
- "If set to False, Scipion developers will know almost nothing about Scipion usage and will have less information to improve it."
303
+ SCIPION_NOTIFY = _get('SCIPION_NOTIFY', TRUE_STR,
304
+ "If set to False, Scipion developers will know almost nothing about Scipion usage and will have less information to improve it.") == TRUE_STR
268
305
 
269
306
  # *** Execution variables ***
270
- SCIPION_CWD = _get('SCIPION_CWD', os.path.abspath(os.getcwd()))
271
- "Directory when scipion was launched"
307
+ SCIPION_CWD = _get('SCIPION_CWD', os.path.abspath(os.getcwd()),
308
+ "Directory when scipion was launched")
272
309
 
273
- SCIPION_GUI_REFRESH_IN_THREAD = _get('SCIPION_GUI_REFRESH_IN_THREAD', FALSE_STR) != FALSE_STR
274
- "True to refresh the runs graph with a thread. Unstable."
310
+ SCIPION_GUI_REFRESH_IN_THREAD = _get('SCIPION_GUI_REFRESH_IN_THREAD', FALSE_STR,
311
+ "True to refresh the runs graph with a thread. Unstable.") != FALSE_STR
275
312
 
276
- SCIPION_GUI_REFRESH_INITIAL_WAIT = int(_get("SCIPION_GUI_REFRESH_INITIAL_WAIT", 5))
277
- "Seconds to wait after a manual refresh"
313
+ SCIPION_GUI_REFRESH_INITIAL_WAIT = _get("SCIPION_GUI_REFRESH_INITIAL_WAIT", 5,
314
+ "Seconds to wait after a manual refresh", caster=int)
278
315
 
279
- SCIPION_GUI_CANCEL_AUTO_REFRESH = _get("SCIPION_GUI_CANCEL_AUTO_REFRESH",FALSE_STR) != FALSE_STR
280
- "Set it to True to cancel automatic refresh of the runs."
316
+ SCIPION_GUI_CANCEL_AUTO_REFRESH = _get("SCIPION_GUI_CANCEL_AUTO_REFRESH",FALSE_STR,
317
+ "Set it to True to cancel automatic refresh of the runs.") != FALSE_STR
281
318
 
282
319
  # Cancel shutil fast copy. In GPFS, shutil.copy does fail when trying a fastcopy and does not
283
- # fallback on the slow copy. For legacy reasons None is also False.
284
- SCIPION_CANCEL_FASTCOPY = _get('SCIPION_CANCEL_FASTCOPY', FALSE_STR) not in [NONE_STR, FALSE_STR]
320
+ # fall back on the slow copy. For legacy reasons None is also False.
321
+ SCIPION_CANCEL_FASTCOPY = _get('SCIPION_CANCEL_FASTCOPY', FALSE_STR,
285
322
  "Cancel fast copy done by shutil (copying files) when it fails. Has happened in GPFS environments. Defaults to False. None is also False otherwise fastcopy is cancelled."
323
+ ) not in [NONE_STR, FALSE_STR]
286
324
 
287
325
  # Priority package list: This variable is used in the view protocols in
288
326
  # order to load first the plugins that contains the main protocols.conf
@@ -290,32 +328,32 @@ class Config:
290
328
  # duplicating all the sections in all plugins. Scipion app is currently defining it for em tomo and chem
291
329
  SCIPION_PRIORITY_PACKAGE_LIST = _get('SCIPION_PRIORITY_PACKAGE_LIST', EMPTY_STR)
292
330
 
293
- SCIPION_STEPS_CHECK_SEC = int(_get('SCIPION_STEPS_CHECK_SEC', 5))
294
- "Number of seconds to wait before checking if new input is available in streamified protocols."
331
+ SCIPION_STEPS_CHECK_SEC = _get('SCIPION_STEPS_CHECK_SEC', 5,
332
+ "Number of seconds to wait before checking if new input is available in streamified protocols.", caster=int)
295
333
 
296
- SCIPION_UPDATE_SET_ATTEMPTS = int(_get('SCIPION_UPDATE_SET_ATTEMPTS', 3))
297
- "Number of attempts to modify the protocol output before failing. The default value is 3"
334
+ SCIPION_UPDATE_SET_ATTEMPTS = _get('SCIPION_UPDATE_SET_ATTEMPTS', 3,
335
+ "Number of attempts to modify the protocol output before failing. The default value is 3", caster=int)
298
336
 
299
- SCIPION_UPDATE_SET_ATTEMPT_WAIT = int(_get('SCIPION_UPDATE_SET_ATTEMPT_WAIT', 2))
300
- "Time in seconds to wait until the next attempt when checking new outputs. The default value is 2 seconds"
337
+ SCIPION_UPDATE_SET_ATTEMPT_WAIT = _get('SCIPION_UPDATE_SET_ATTEMPT_WAIT', 2,
338
+ "Time in seconds to wait until the next attempt when checking new outputs. The default value is 2 seconds", caster=int)
301
339
 
302
- SCIPION_USE_QUEUE = _get("SCIPION_USE_QUEUE", FALSE_STR) != FALSE_STR
303
- "Default value for using the queue. By default is False. ANY value will be True except and empty value. \"False\" or \"0\" will be True too."
340
+ SCIPION_USE_QUEUE = _get("SCIPION_USE_QUEUE", FALSE_STR,
341
+ "Default value for using the queue. By default is False. ANY value will be True except and empty value. \"False\" or \"0\" will be True too.")!= FALSE_STR
304
342
 
305
- SCIPION_DEFAULT_EXECUTION_ACTION = int(_get('SCIPION_DEFAULT_EXECUTION_ACTION', DEFAULT_EXECUTION_ACTION_ASK))
343
+ SCIPION_DEFAULT_EXECUTION_ACTION = _get('SCIPION_DEFAULT_EXECUTION_ACTION', DEFAULT_EXECUTION_ACTION_ASK,
306
344
  """Ask if you want to launch a single protocol or a sub-workflow. The default value is 1
307
345
  1: Scipion always ask
308
346
  2: Run a single protocol
309
- 3: Run a sub-workflow """
347
+ 3: Run a sub-workflow """, caster=int)
310
348
 
311
349
  try:
312
- VIEWERS = ast.literal_eval(_get('VIEWERS', "{}"))
350
+ VIEWERS = ast.literal_eval(_get('VIEWERS', "{}", "Json string to define which viewer are the default ones per output type."))
313
351
  except Exception as e:
314
352
  VIEWERS = {}
315
353
  logger.error("ERROR loading preferred viewers, VIEWERS variable will be ignored", exc_info=e)
316
354
 
317
- SCIPION_DOMAIN = _get(SCIPION_DOMAIN, None)
318
- SCIPION_TESTS_CMD = _get(SCIPION_TESTS_CMD, getTestsScript())
355
+ SCIPION_DOMAIN = _get(SCIPION_DOMAIN, None, "Domain base class. Ignore.")
356
+ SCIPION_TESTS_CMD = _get(SCIPION_TESTS_CMD, getTestsScript(), "Command to run tests")
319
357
 
320
358
  # ---- Getters ---- #
321
359
  # Getters are alternatives to offer a variable, but preventing it to be stored in the config
@@ -359,16 +397,10 @@ class Config:
359
397
  for name, value in vars(baseCls).items():
360
398
  # Skip methods and internal attributes starting with __
361
399
  # (e.g __doc__, __module__, etc)
362
- if isinstance(value, (str, int, Variable)) and not name.startswith('__'):
400
+ if isinstance(value, (str, int)) and not name.startswith('__'):
363
401
  configVars[name] = str(value)
364
402
  return configVars
365
403
 
366
- @classmethod
367
- def printVars(cls):
368
- """ Print the variables' dict, mostly for debugging. """
369
- from .utils import prettyDict
370
- prettyDict(cls.getVars())
371
-
372
404
  @classmethod
373
405
  def getDomain(cls):
374
406
  """ Import domain module from path or name defined in SCIPION_DOMAIN.
@@ -431,7 +463,9 @@ class Config:
431
463
 
432
464
  @classmethod
433
465
  def getWizardMaskColor(cls):
434
- return json.loads(cls.WIZARD_MASK_COLOR)
466
+ """ Color is a name"""
467
+ from matplotlib.colors import to_rgb
468
+ return list(to_rgb(cls.SCIPION_CONTRAST_COLOR))
435
469
 
436
470
  @classmethod
437
471
  def getPriorityPackageList(cls):
@@ -463,16 +497,9 @@ class Config:
463
497
  """ Returns a color lighter than the SCIPION_MAIN_COLOR"""
464
498
 
465
499
  if cls.__activeColor is None:
466
- import matplotlib.colors
467
500
  from pyworkflow.utils import lighter, rgb_to_hex
468
- try:
469
- rgb_main = matplotlib.colors.to_rgb(cls.SCIPION_MAIN_COLOR)
470
- except Exception:
471
- logger.error("Cannot convert SCIPION_MAIN_COLOR (%s) string to a color to compute the lighter color."
472
- " Falling back to %s" % (Config.SCIPION_MAIN_COLOR, Color.MAIN_COLOR))
473
- cls.SCIPION_MAIN_COLOR = Color.MAIN_COLOR
474
- rgb_main = matplotlib.colors.to_rgb(cls.SCIPION_MAIN_COLOR)
475
-
501
+ from matplotlib.colors import to_rgb
502
+ rgb_main = to_rgb(cls.SCIPION_MAIN_COLOR)
476
503
  rgb_main = (rgb_main[0] * 255, rgb_main[1] * 255, rgb_main[2] * 255)
477
504
  rgb_active = lighter(rgb_main, 0.3)
478
505
  cls.__activeColor = rgb_to_hex(rgb_active)
@@ -42,7 +42,7 @@ VERSION_1 = '1.0.0'
42
42
  VERSION_1_1 = '1.1.0'
43
43
  VERSION_1_2 = '1.2.0'
44
44
  VERSION_2_0 = '2.0.0'
45
- VERSION_3_0 = '3.5.0'
45
+ VERSION_3_0 = '3.6.0'
46
46
 
47
47
  # For a new release, define a new constant and assign it to LAST_VERSION
48
48
  # The existing one has to be added to OLD_VERSIONS list.
@@ -182,7 +182,7 @@ class DOCSITEURLS:
182
182
  DOCS = HOME + 'docs/'
183
183
  CONFIG = DOCS + 'scipion-modes/scipion-configuration.html'
184
184
  CONFIG_SECTION = CONFIG + '#%s'
185
- CONTACTUS = 'http://scipion.i2pc.es/contact'
185
+ CONTACTUS = 'https://scipion.i2pc.es/contact'
186
186
  USER = DOCS + 'user/'
187
187
  GUI = USER + 'scipion-gui.html'
188
188
  WAIT_FOR = GUI + '#waiting-for-other-protocols'
@@ -332,7 +332,7 @@ class FileTreeProvider(TreeProvider):
332
332
  # All ok...add item.
333
333
  fileInfoList.append(FileInfo(self._currentDir, f))
334
334
  except Exception as e:
335
- logger.error("Can't list files at " + self._currentDir, e)
335
+ logger.info("Can't list files at " + self._currentDir, e)
336
336
 
337
337
  # Sort objects
338
338
  fileInfoList.sort(key=self.fileKey, reverse=not self.isSortingAscending())
@@ -361,7 +361,7 @@ SELECT_PATH = 3 # Can be either file or folder
361
361
 
362
362
 
363
363
  class FileBrowser(ObjectBrowser):
364
- """ The FileBrowser is a particular class of ObjectBrowser
364
+ """ The FileBrowser is a particular class of ObjectBrowser (Tk.Frame)
365
365
  where the "objects" are just files and directories.
366
366
  """
367
367
 
@@ -417,13 +417,13 @@ class FileBrowser(ObjectBrowser):
417
417
  # focuses on the browser in order to allow to move with the keyboard
418
418
  self._goDir(os.path.abspath(initialDir))
419
419
 
420
- if selectionType == SELECT_NONE:
421
- selectButton = None
422
-
423
420
  buttonsFrame = tk.Frame(self)
424
421
  self._fillButtonsFrame(buttonsFrame)
425
422
  buttonsFrame.grid(row=1, column=0)
426
423
 
424
+ # Callback to be called "on Select" button key press
425
+ self.onSelect=None
426
+
427
427
  def _showInfo(self, msg):
428
428
  """ Default way (logger.info to console) to show a message with a given info.
429
429
  """
@@ -635,7 +635,10 @@ class FileBrowser(ObjectBrowser):
635
635
  self._lastSelected = self.getSelected()
636
636
 
637
637
  if self._lastSelected is not None:
638
- self.onSelect(self._lastSelected)
638
+ if self.onSelect:
639
+ self.onSelect(self._lastSelected)
640
+ else:
641
+ self.onClose()
639
642
  else:
640
643
  self.showInfo('Select a valid file/folder')
641
644
 
@@ -687,6 +690,7 @@ def isStandardImage(filename):
687
690
  class FileBrowserWindow(BrowserWindow):
688
691
  """ Windows to hold a file browser frame inside. """
689
692
 
693
+ lastValue=None
690
694
  def __init__(self, title, master=None, path=None,
691
695
  onSelect=None, shortCuts=None, **kwargs):
692
696
  BrowserWindow.__init__(self, title, master, **kwargs)
@@ -707,6 +711,8 @@ class FileBrowserWindow(BrowserWindow):
707
711
  def getEntryValue(self):
708
712
  return self.browser.getEntryValue()
709
713
 
714
+ def getLastSelection(self):
715
+ return self.browser._lastSelected.getPath()
710
716
  def getCurrentDir(self):
711
717
  return self.browser.getCurrentDir()
712
718
 
@@ -35,12 +35,12 @@ import tkinter as tk
35
35
  import operator
36
36
 
37
37
  from pyworkflow import Config
38
- from pyworkflow.gui import gui, getDefaultFont, cfgFontSize
38
+ from pyworkflow.gui import gui, getDefaultFont
39
39
  from pyworkflow.gui.widgets import Scrollable
40
40
 
41
41
  DEFAULT_ZOOM = 100
42
42
 
43
- DEFAULT_FONT_SIZE = cfgFontSize
43
+ DEFAULT_FONT_SIZE = Config.SCIPION_FONT_SIZE
44
44
 
45
45
  DEFAULT_CONNECTOR_FILL = "blue"
46
46
  DEFAULT_CONNECTOR_OUTLINE = "black"