scipion-pyworkflow 3.11.0__tar.gz → 3.11.2__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 (173) hide show
  1. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/CHANGES.txt +19 -0
  2. {scipion_pyworkflow-3.11.0/scipion_pyworkflow.egg-info → scipion_pyworkflow-3.11.2}/PKG-INFO +2 -2
  3. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyproject.toml +5 -5
  4. scipion_pyworkflow-3.11.2/pyworkflow/apps/__init__.py +29 -0
  5. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_manager.py +37 -0
  6. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_plot.py +51 -0
  7. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_project.py +130 -0
  8. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_protocol_list.py +143 -0
  9. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_protocol_run.py +51 -0
  10. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_run_tests.py +268 -0
  11. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_schedule_run.py +322 -0
  12. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_sleep.py +37 -0
  13. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_sync_data.py +440 -0
  14. scipion_pyworkflow-3.11.2/pyworkflow/apps/pw_viewer.py +78 -0
  15. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/constants.py +1 -1
  16. scipion_pyworkflow-3.11.2/pyworkflow/gui/__init__.py +36 -0
  17. scipion_pyworkflow-3.11.2/pyworkflow/gui/browser.py +768 -0
  18. scipion_pyworkflow-3.11.2/pyworkflow/gui/canvas.py +1190 -0
  19. scipion_pyworkflow-3.11.2/pyworkflow/gui/dialog.py +981 -0
  20. scipion_pyworkflow-3.11.2/pyworkflow/gui/form.py +2727 -0
  21. scipion_pyworkflow-3.11.2/pyworkflow/gui/graph.py +247 -0
  22. scipion_pyworkflow-3.11.2/pyworkflow/gui/graph_layout.py +271 -0
  23. scipion_pyworkflow-3.11.2/pyworkflow/gui/gui.py +571 -0
  24. scipion_pyworkflow-3.11.2/pyworkflow/gui/matplotlib_image.py +233 -0
  25. scipion_pyworkflow-3.11.2/pyworkflow/gui/plotter.py +247 -0
  26. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/__init__.py +25 -0
  27. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/base.py +193 -0
  28. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/constants.py +139 -0
  29. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/labels.py +205 -0
  30. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/project.py +491 -0
  31. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/searchprotocol.py +240 -0
  32. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/searchrun.py +181 -0
  33. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/steps.py +171 -0
  34. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/utils.py +332 -0
  35. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/variables.py +179 -0
  36. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/viewdata.py +472 -0
  37. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/viewprojects.py +519 -0
  38. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/viewprotocols.py +2141 -0
  39. scipion_pyworkflow-3.11.2/pyworkflow/gui/project/viewprotocols_extra.py +562 -0
  40. scipion_pyworkflow-3.11.2/pyworkflow/gui/text.py +774 -0
  41. scipion_pyworkflow-3.11.2/pyworkflow/gui/tooltip.py +185 -0
  42. scipion_pyworkflow-3.11.2/pyworkflow/gui/tree.py +684 -0
  43. scipion_pyworkflow-3.11.2/pyworkflow/gui/widgets.py +307 -0
  44. scipion_pyworkflow-3.11.2/pyworkflow/mapper/__init__.py +26 -0
  45. scipion_pyworkflow-3.11.2/pyworkflow/mapper/mapper.py +226 -0
  46. scipion_pyworkflow-3.11.2/pyworkflow/mapper/sqlite.py +1583 -0
  47. scipion_pyworkflow-3.11.2/pyworkflow/mapper/sqlite_db.py +145 -0
  48. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/object.py +1 -0
  49. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/plugin.py +4 -4
  50. scipion_pyworkflow-3.11.2/pyworkflow/project/__init__.py +31 -0
  51. scipion_pyworkflow-3.11.2/pyworkflow/project/config.py +454 -0
  52. scipion_pyworkflow-3.11.2/pyworkflow/project/manager.py +180 -0
  53. scipion_pyworkflow-3.11.2/pyworkflow/project/project.py +2095 -0
  54. scipion_pyworkflow-3.11.2/pyworkflow/project/usage.py +165 -0
  55. scipion_pyworkflow-3.11.2/pyworkflow/protocol/__init__.py +38 -0
  56. scipion_pyworkflow-3.11.2/pyworkflow/protocol/bibtex.py +48 -0
  57. scipion_pyworkflow-3.11.2/pyworkflow/protocol/constants.py +87 -0
  58. scipion_pyworkflow-3.11.2/pyworkflow/protocol/executor.py +515 -0
  59. scipion_pyworkflow-3.11.2/pyworkflow/protocol/hosts.py +318 -0
  60. scipion_pyworkflow-3.11.2/pyworkflow/protocol/launch.py +277 -0
  61. scipion_pyworkflow-3.11.2/pyworkflow/protocol/package.py +42 -0
  62. scipion_pyworkflow-3.11.2/pyworkflow/protocol/params.py +781 -0
  63. scipion_pyworkflow-3.11.2/pyworkflow/protocol/protocol.py +2712 -0
  64. scipion_pyworkflow-3.11.2/pyworkflow/resources/protlabels.xcf +0 -0
  65. scipion_pyworkflow-3.11.2/pyworkflow/resources/sprites.png +0 -0
  66. scipion_pyworkflow-3.11.2/pyworkflow/resources/sprites.xcf +0 -0
  67. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/template.py +1 -1
  68. scipion_pyworkflow-3.11.2/pyworkflow/tests/__init__.py +29 -0
  69. scipion_pyworkflow-3.11.2/pyworkflow/tests/test_utils.py +25 -0
  70. scipion_pyworkflow-3.11.2/pyworkflow/tests/tests.py +342 -0
  71. scipion_pyworkflow-3.11.2/pyworkflow/utils/__init__.py +38 -0
  72. scipion_pyworkflow-3.11.2/pyworkflow/utils/dataset.py +414 -0
  73. scipion_pyworkflow-3.11.2/pyworkflow/utils/echo.py +104 -0
  74. scipion_pyworkflow-3.11.2/pyworkflow/utils/graph.py +169 -0
  75. scipion_pyworkflow-3.11.2/pyworkflow/utils/log.py +293 -0
  76. scipion_pyworkflow-3.11.2/pyworkflow/utils/path.py +528 -0
  77. scipion_pyworkflow-3.11.2/pyworkflow/utils/process.py +154 -0
  78. scipion_pyworkflow-3.11.2/pyworkflow/utils/profiler.py +92 -0
  79. scipion_pyworkflow-3.11.2/pyworkflow/utils/progressbar.py +154 -0
  80. scipion_pyworkflow-3.11.2/pyworkflow/utils/properties.py +618 -0
  81. scipion_pyworkflow-3.11.2/pyworkflow/utils/reflection.py +129 -0
  82. scipion_pyworkflow-3.11.2/pyworkflow/utils/utils.py +880 -0
  83. scipion_pyworkflow-3.11.2/pyworkflow/utils/which.py +229 -0
  84. scipion_pyworkflow-3.11.2/pyworkflow/webservices/__init__.py +8 -0
  85. scipion_pyworkflow-3.11.2/pyworkflow/webservices/config.py +8 -0
  86. scipion_pyworkflow-3.11.2/pyworkflow/webservices/notifier.py +152 -0
  87. scipion_pyworkflow-3.11.2/pyworkflow/webservices/repository.py +59 -0
  88. scipion_pyworkflow-3.11.2/pyworkflow/webservices/workflowhub.py +86 -0
  89. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/__init__.py +0 -0
  90. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_canvas.py +72 -0
  91. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_domain.py +45 -0
  92. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_logs.py +74 -0
  93. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_mappers.py +392 -0
  94. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_object.py +507 -0
  95. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_project.py +42 -0
  96. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_protocol_execution.py +146 -0
  97. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_protocol_export.py +78 -0
  98. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_protocol_output.py +158 -0
  99. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_streaming.py +47 -0
  100. scipion_pyworkflow-3.11.2/pyworkflowtests/tests/test_utils.py +210 -0
  101. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2/scipion_pyworkflow.egg-info}/PKG-INFO +2 -2
  102. scipion_pyworkflow-3.11.2/scipion_pyworkflow.egg-info/SOURCES.txt +168 -0
  103. scipion_pyworkflow-3.11.0/pyworkflow/resources/sprites.png +0 -0
  104. scipion_pyworkflow-3.11.0/pyworkflow/resources/sprites.xcf +0 -0
  105. scipion_pyworkflow-3.11.0/scipion_pyworkflow.egg-info/SOURCES.txt +0 -77
  106. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/LICENSE.txt +0 -0
  107. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/MANIFEST.in +0 -0
  108. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/README.rst +0 -0
  109. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/__init__.py +0 -0
  110. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/config.py +0 -0
  111. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/exceptions.py +0 -0
  112. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/clean_projects.py +0 -0
  113. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/config.py +0 -0
  114. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/create.py +0 -0
  115. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/edit_workflow.py +0 -0
  116. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/fix_links.py +0 -0
  117. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/load.py +0 -0
  118. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/refresh.py +0 -0
  119. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/schedule.py +0 -0
  120. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/stack2volume.py +0 -0
  121. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/project/scripts/stop.py +0 -0
  122. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/Imagej.png +0 -0
  123. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/chimera.png +0 -0
  124. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/fa-exclamation-triangle_alert.png +0 -0
  125. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/fa-info-circle_alert.png +0 -0
  126. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/fa-search.png +0 -0
  127. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/fa-times-circle_alert.png +0 -0
  128. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/file_vol.png +0 -0
  129. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/loading.gif +0 -0
  130. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/no-image128.png +0 -0
  131. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/scipion_bn.png +0 -0
  132. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/scipion_icon.png +0 -0
  133. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/scipion_icon.svg +0 -0
  134. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/scipion_icon_proj.png +0 -0
  135. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/scipion_icon_projs.png +0 -0
  136. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/scipion_icon_prot.png +0 -0
  137. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/scipion_logo.png +0 -0
  138. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/scipion_logo_normal.png +0 -0
  139. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/scipion_logo_small.png +0 -0
  140. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/arrowDown.png +0 -0
  141. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/arrowUp.png +0 -0
  142. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/background_section.png +0 -0
  143. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/colRowModeOff.png +0 -0
  144. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/colRowModeOn.png +0 -0
  145. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/delete.png +0 -0
  146. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/doc_icon.png +0 -0
  147. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/download_icon.png +0 -0
  148. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/enabled_gallery.png +0 -0
  149. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/galleryViewOff.png +0 -0
  150. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/galleryViewOn.png +0 -0
  151. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/goto.png +0 -0
  152. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/menu.png +0 -0
  153. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/separator.png +0 -0
  154. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/tableViewOff.png +0 -0
  155. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/tableViewOn.png +0 -0
  156. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  157. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  158. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  159. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/volumeOff.png +0 -0
  160. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/showj/volumeOn.png +0 -0
  161. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/resources/wait.gif +0 -0
  162. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/viewer.py +0 -0
  163. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflow/wizard.py +0 -0
  164. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflowtests/__init__.py +0 -0
  165. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflowtests/bibtex.py +0 -0
  166. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflowtests/objects.py +0 -0
  167. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/pyworkflowtests/protocols.py +0 -0
  168. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/requirements.txt +0 -0
  169. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/scipion_pyworkflow.egg-info/dependency_links.txt +0 -0
  170. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/scipion_pyworkflow.egg-info/entry_points.txt +0 -0
  171. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/scipion_pyworkflow.egg-info/requires.txt +0 -0
  172. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/scipion_pyworkflow.egg-info/top_level.txt +0 -0
  173. {scipion_pyworkflow-3.11.0 → scipion_pyworkflow-3.11.2}/setup.cfg +0 -0
@@ -1,3 +1,22 @@
1
+ V3.11.2
2
+ users:
3
+ Copy (Control-C) work in log viewers too
4
+ Pasting a copied workflow refreshes the graph
5
+ Bugfix: Protocol with very fast (almost notime) steps work instead of end up finished with pending steps.
6
+ templates can be fetched from urls having ".json" and not json.template only.
7
+ Double click in a protocol in "list mode" opens the protocol
8
+ Double click in a collapsed node, expands it.
9
+
10
+ developers:
11
+ new icon
12
+ Executor.getGpuListStr(): Returns the assigned gpus for the step as a string (accepts sep --> separator, defaults to " ")
13
+ Executor.setCudaVisibleDevices(): Sets the variable CUDA_VISIBLE_DEVICES with owned information.
14
+ Protocol.getExecutor: returns the executor. Useful to aske for gpu information inside a step
15
+ __debug__ allowed: By default Project load is with -O (optimized) so __debug__ is false.
16
+ asserts removed, swap to if + raise AssertionError
17
+ if optimized, shown in project window header
18
+
19
+ V3.11.1 fix packaging
1
20
  V3.11.0
2
21
  users:
3
22
  - New behaviour: Saving a protocol will unload the form and log the confirmation message. There will not be any pop up message.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scipion-pyworkflow
3
- Version: 3.11.0
4
- Summary: Workflow platform used in scientific applications, initially developed
3
+ Version: 3.11.2
4
+ Summary: Workflow platform used in scientific applications, initially developed within the Scipion framework for image processing in Electron Microscopy but generic by design to be applied to any domain.
5
5
  Author-email: Pablo Conesa <pconesa@cnb.csic.es>, Yunior Fonseca <cfonseca@cnb.csic.es>, "J.M. De la Rosa Trevin" <josemiguel.delarosatrevin@stjude.org>, Roberto Marabini <roberto@cnb.csic.es>, Grigory Sharov <sharov.grigory@gmail.com>, Josue Gomez Blanco <josue.gomez-blanco@mcgill.ca>
6
6
  License: GNU General Public License v3 (GPLv3)
7
7
  Project-URL: Homepage, https://scipion.i2pc.es
@@ -14,9 +14,7 @@ authors = [
14
14
  {name = "Grigory Sharov", email = "sharov.grigory@gmail.com"},
15
15
  {name = "Josue Gomez Blanco", email = "josue.gomez-blanco@mcgill.ca"},
16
16
  ]
17
- description = """Workflow platform used in scientific applications, initially developed
18
- within the Scipion framework for image processing in Electron Microscopy but
19
- generic by design to be applied to any domain."""
17
+ description = """Workflow platform used in scientific applications, initially developed within the Scipion framework for image processing in Electron Microscopy but generic by design to be applied to any domain."""
20
18
 
21
19
  readme = "README.rst"
22
20
  requires-python = ">=3.8"
@@ -28,8 +26,10 @@ Homepage = "https://scipion.i2pc.es"
28
26
  Repository = "https://github.com/scipion-em/scipion-pyworkflow"
29
27
  Issues = "https://github.com/scipion-em/scipion-pyworkflow/issues"
30
28
 
31
- [tool.setuptools]
32
- packages = ["pyworkflow", "pyworkflowtests"]
29
+ [tool.setuptools.packages.find]
30
+ where = ["."]
31
+ include = ["pyworkflow*"]
32
+ namespaces = false
33
33
 
34
34
  [tool.setuptools.package-data]
35
35
  "pyworkflow" = ["resources/*", "project/scripts/*"]
@@ -0,0 +1,29 @@
1
+ # **************************************************************************
2
+ # *
3
+ # * Authors: J.M. De la Rosa Trevin (jmdelarosa@cnb.csic.es)
4
+ # *
5
+ # * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6
+ # *
7
+ # * This program is free software; you can redistribute it and/or modify
8
+ # * it under the terms of the GNU General Public License as published by
9
+ # * the Free Software Foundation; either version 3 of the License, or
10
+ # * (at your option) any later version.
11
+ # *
12
+ # * This program is distributed in the hope that it will be useful,
13
+ # * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # * GNU General Public License for more details.
16
+ # *
17
+ # * You should have received a copy of the GNU General Public License
18
+ # * along with this program; if not, write to the Free Software
19
+ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20
+ # * 02111-1307 USA
21
+ # *
22
+ # * All comments concerning this program package may be sent to the
23
+ # * e-mail address 'scipion@cnb.csic.es'
24
+ # *
25
+ # **************************************************************************
26
+ """
27
+ Configuration sub-package
28
+ """
29
+
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env python
2
+
3
+ # **************************************************************************
4
+ # *
5
+ # * Authors: J.M. De la Rosa Trevin (jmdelarosa@cnb.csic.es)
6
+ # *
7
+ # * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
8
+ # *
9
+ # * This program is free software; you can redistribute it and/or modify
10
+ # * it under the terms of the GNU General Public License as published by
11
+ # * the Free Software Foundation; either version 3 of the License, or
12
+ # * (at your option) any later version.
13
+ # *
14
+ # * This program is distributed in the hope that it will be useful,
15
+ # * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ # * GNU General Public License for more details.
18
+ # *
19
+ # * You should have received a copy of the GNU General Public License
20
+ # * along with this program; if not, write to the Free Software
21
+ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22
+ # * 02111-1307 USA
23
+ # *
24
+ # * All comments concerning this program package may be sent to the
25
+ # * e-mail address 'scipion@cnb.csic.es'
26
+ # *
27
+ # **************************************************************************
28
+ """
29
+ Launch the windows with all Projects.
30
+ """
31
+
32
+ from pyworkflow.gui.project import ProjectManagerWindow
33
+
34
+
35
+ if __name__ == '__main__':
36
+
37
+ ProjectManagerWindow().show()
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env python
2
+
3
+
4
+ import argparse
5
+ from pwem.viewers import EmPlotter
6
+ from pyworkflow.gui.plotter import Plotter
7
+
8
+
9
+ def main():
10
+ parser = argparse.ArgumentParser(prog='Scipion Plot')
11
+ parser.add_argument('--file', help='File to visualize', required=True)
12
+ parser.add_argument('--block', help='Block to visualize')
13
+ parser.add_argument('--type', help='Plot type')
14
+ parser.add_argument('--columns', help='Columns to plot')
15
+ parser.add_argument('--xcolumn', help='X Column to plot')
16
+ parser.add_argument('--orderColumn', help='Column to order')
17
+ parser.add_argument('--orderDir', help='Order direction(ASC, DESC)')
18
+ parser.add_argument('--bins', help='If plot type is histogram, number of bins')
19
+ parser.add_argument('--colors', help='Colors to plot columns')
20
+ parser.add_argument('--styles', help='Styles to plot columns')
21
+ parser.add_argument('--markers', help='Markers to plot columns')
22
+ parser.add_argument('--title', help='Plot title', default='')
23
+ parser.add_argument('--ytitle', help='Y axis title', default='')
24
+ parser.add_argument('--xtitle', help='X axis title', default='')
25
+
26
+ args = parser.parse_args()
27
+ plotfile = args.file
28
+ block = args.block if args.block else ''
29
+ type = args.type
30
+ columns = args.columns
31
+ xcolumn = args.xcolumn
32
+ orderColumn = args.orderColumn
33
+ orderDir = args.orderDir
34
+
35
+ bins = args.bins
36
+ colors = args.colors
37
+ styles = args.styles
38
+ markers = args.markers
39
+ title = args.title
40
+ xtitle = args.xtitle
41
+ ytitle = args.ytitle
42
+
43
+ Plotter.setBackend('TkAgg')
44
+ plotter = EmPlotter.createFromFile(
45
+ plotfile, block, type, columns, colors, styles, markers, xcolumn,
46
+ ytitle, xtitle, title, bins, orderColumn, orderDir)
47
+ plotter.show(block=True)
48
+
49
+
50
+ if __name__ == '__main__':
51
+ main()
@@ -0,0 +1,130 @@
1
+ #!/usr/bin/env python
2
+ # **************************************************************************
3
+ # *
4
+ # * Authors: J.M. De la Rosa Trevin (jmdelarosa@cnb.csic.es)
5
+ # *
6
+ # * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
7
+ # *
8
+ # * This program is free software; you can redistribute it and/or modify
9
+ # * it under the terms of the GNU General Public License as published by
10
+ # * the Free Software Foundation; either version 3 of the License, or
11
+ # * (at your option) any later version.
12
+ # *
13
+ # * This program is distributed in the hope that it will be useful,
14
+ # * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # * GNU General Public License for more details.
17
+ # *
18
+ # * You should have received a copy of the GNU General Public License
19
+ # * along with this program; if not, write to the Free Software
20
+ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21
+ # * 02111-1307 USA
22
+ # *
23
+ # * All comments concerning this program package may be sent to the
24
+ # * e-mail address 'scipion@cnb.csic.es'
25
+ # *
26
+ # **************************************************************************
27
+ """
28
+ Launch main project window
29
+ """
30
+
31
+ import sys
32
+ import os
33
+ from subprocess import Popen
34
+
35
+ from pyworkflow import Config, PYTHON
36
+ from pyworkflow.project import Manager
37
+ from pyworkflow.gui.project import ProjectWindow
38
+ import pyworkflow.utils as pwutils
39
+
40
+ HERE = 'here'
41
+ LAST = 'last'
42
+ LIST = 'list'
43
+
44
+ def openProject(projectName):
45
+ """ Opens a scipion project:
46
+
47
+ :param projectName: Name of an existing project to open,
48
+ or "here" to create a project in the current working dir,
49
+ or "last" to open the most recent project
50
+
51
+ """
52
+ manager = Manager()
53
+ projName = os.path.basename(projectName)
54
+
55
+
56
+ if projName == LIST:
57
+ showProjectList(manager)
58
+ return
59
+ # Handle special name 'here' to create a project
60
+ # from the current directory
61
+ elif projName == HERE:
62
+ cwd = Config.SCIPION_CWD
63
+
64
+ if " " in cwd:
65
+ print("Projects can't have spaces in the name: %s" % cwd)
66
+ sys.exit(1)
67
+
68
+ print("\nYou are trying to create a project here:",
69
+ pwutils.cyan(cwd))
70
+
71
+ if os.listdir(cwd):
72
+ print(pwutils.red('\nWARNING: this folder is not empty!!!'))
73
+ key = input("\nDo you want to create a project here? [y/N]?")
74
+
75
+ if key.lower().strip() != 'y':
76
+ print("\nAborting...")
77
+ sys.exit(0)
78
+ else:
79
+ print("\nCreating project....")
80
+ projName = os.path.basename(cwd)
81
+ projDir = os.path.dirname(cwd)
82
+ manager.createProject(projName, location=projDir)
83
+
84
+ elif projName == LAST: # Get last project
85
+ projects = manager.listProjects()
86
+ if not projects:
87
+ sys.exit("No projects yet, cannot open the last one.")
88
+ projName = projects[0].projName
89
+
90
+ projPath = manager.getProjectPath(projName)
91
+
92
+ if os.path.exists(projPath):
93
+
94
+ # This opens the project in the same process as the launcher. This is good for directly debugging code
95
+ # but does not allow -O or not execution (usage of __debug__ flag).
96
+ # All we can do is to go straight to loading the project if debug is active or running optimized.
97
+ if Config.debugOn() or not __debug__:
98
+
99
+
100
+ # This may or may not be run Optimized (-O). It depends on the call to scipion last (launcher)
101
+ print("Launching project in debug or optimized...")
102
+ projWindow = ProjectWindow(projPath)
103
+ projWindow.show()
104
+ else:
105
+
106
+ # Run this same script optimized: Defined in scipion module under scipion-app: Circular definition. To fix! Bad design.
107
+ print("Launching project optimized...")
108
+ Popen([PYTHON, "-O", "-m","scipion", "project", projectName])
109
+
110
+
111
+ else:
112
+ print("Can't open project %s. It does not exist" % projPath)
113
+
114
+ # Show the list of projects
115
+ showProjectList(manager)
116
+
117
+ def showProjectList(manager):
118
+
119
+ projects = manager.listProjects()
120
+
121
+ print("\n******** LIST OF PROJECTS *******\n")
122
+ for project in projects:
123
+ print(project.projName)
124
+ print("\n")
125
+ if __name__ == '__main__':
126
+
127
+ if len(sys.argv) > 1:
128
+ openProject(sys.argv[1])
129
+ else:
130
+ print("usage: pw_project.py PROJECT_NAME or %s or %s or %s" % (HERE, LAST, LIST))
@@ -0,0 +1,143 @@
1
+ #!/usr/bin/env python
2
+ # **************************************************************************
3
+ # *
4
+ # * Authors: J.M. De la Rosa Trevin (jmdelarosa@cnb.csic.es)
5
+ # *
6
+ # * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
7
+ # *
8
+ # * This program is free software; you can redistribute it and/or modify
9
+ # * it under the terms of the GNU General Public License as published by
10
+ # * the Free Software Foundation; either version 3 of the License, or
11
+ # * (at your option) any later version.
12
+ # *
13
+ # * This program is distributed in the hope that it will be useful,
14
+ # * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # * GNU General Public License for more details.
17
+ # *
18
+ # * You should have received a copy of the GNU General Public License
19
+ # * along with this program; if not, write to the Free Software
20
+ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21
+ # * 02111-1307 USA
22
+ # *
23
+ # * All comments concerning this program package may be sent to the
24
+ # * e-mail address 'scipion@cnb.csic.es'
25
+ # *
26
+ # **************************************************************************
27
+ ###
28
+ """
29
+ List all existing protocols within Scipion
30
+ """
31
+
32
+ import sys
33
+
34
+ from pwem.protocols import (ProtImport, ProtMicrographs, ProtParticles, Prot2D,
35
+ Prot3D)
36
+ from pyworkflow import Config
37
+ from pyworkflow.viewer import Viewer
38
+ from pyworkflow.protocol.protocol import Protocol
39
+
40
+
41
+ def getFirstLine(doc):
42
+ """ Get the first non empty line from doc. """
43
+ if doc:
44
+ for lines in doc.split('\n'):
45
+ l = lines.strip()
46
+ if l:
47
+ return l
48
+ return ''
49
+
50
+
51
+ def hasDoubleInheritance(classRef):
52
+ # loop while class has single parent
53
+ numParents = len(classRef.__bases__)
54
+ while numParents == 1 and classRef is not Protocol:
55
+ classRef = classRef.__bases__[0]
56
+ numParents = len(classRef.__bases__)
57
+ if numParents > 1:
58
+ return True
59
+ else:
60
+ return False
61
+
62
+
63
+ if __name__ == '__main__':
64
+ count = 0
65
+ withDoc = '--with-doc' in sys.argv
66
+ extended = '--extended' in sys.argv
67
+ ai = '--ai' in sys.argv
68
+
69
+ emProtocolsDict = Config.getDomain().getProtocols()
70
+
71
+ protDict = {}
72
+
73
+ # Group protocols by package name
74
+ for k, v in emProtocolsDict.items():
75
+ packageName = v.getClassPackageName()
76
+
77
+ if packageName not in protDict:
78
+ protDict[packageName] = []
79
+
80
+ if not issubclass(v, Viewer) and not v.isBase():
81
+ if extended:
82
+ protTuple = (k, v, hasDoubleInheritance(v),
83
+ v().allowMpi, v().numberOfMpi,
84
+ v().allowThreads, v().numberOfThreads,
85
+ v().stepsExecutionMode)
86
+ else:
87
+ protTuple = (k, v)
88
+ protDict[packageName].append(protTuple)
89
+
90
+ def iterGroups(protDict):
91
+ groups = list(protDict.keys())
92
+ groups.sort(key=lambda x: 1000-len(protDict[x]))
93
+
94
+ for g in groups:
95
+ yield g, protDict[g]
96
+
97
+ def printProtocols(prots):
98
+ protList = [(p[0], p[1], p[1].getClassLabel()) for p in prots]
99
+ protList.sort(key=lambda x: x[2])
100
+
101
+ for k, v, l in protList:
102
+ doc = getFirstLine(v.__doc__) if withDoc else ''
103
+ print("* link:%s[%s]: %s" % (k, l, doc))
104
+
105
+
106
+ if withDoc:
107
+ for group, prots in iterGroups(protDict):
108
+ print("Package: ", group, "(%d protocols)" % len(prots))
109
+ for p in prots:
110
+ print(" %s ( %s ):" % (p[1].getClassLabel(), p[0]))
111
+ print(" ", p[1].__doc__)
112
+ print("-" * 100)
113
+
114
+ else:
115
+ if extended:
116
+ formatStr = "{:<15}\t{:<35}\t{:<35}" + "\t{:<20}" * 6
117
+ print(formatStr.format("PACKAGE", "PROTOCOL",
118
+ "LABEL", "DOUBLE_INHERITANCE",
119
+ "ALLOWS_MPI", "NUM_MPI",
120
+ "ALLOWS_THREADS", "NUM_THREADS",
121
+ "STEPS_EXEC_MODE"))
122
+ for group, prots in iterGroups(protDict):
123
+ for p in prots:
124
+ print(formatStr.format(group, p[0],
125
+ p[1].getClassLabel(), *p[2:]))
126
+ elif ai:
127
+ for group, prots in iterGroups(protDict):
128
+ for protClassName, protClass in prots:
129
+ print("\nThe protocol named \"%s\" can be found in the %s plugin." %(protClass._label, group))
130
+ print("\"%s\" protocol help is as follows:\n %s." % (protClass._label, protClass.__doc__))
131
+ instance = protClass()
132
+
133
+ for name, param in instance._definition.iterParams():
134
+ print("\"%s\" has a \"%s\" parameter that is explained as: %s" % (protClass._label, param.label, param.help))
135
+
136
+
137
+
138
+ else:
139
+ formatStr = "{:<15}\t{:<35}\t{:<35}"
140
+ print(formatStr.format("PACKAGE", "PROTOCOL", "LABEL"))
141
+ for group, prots in iterGroups(protDict):
142
+ for k, v in prots:
143
+ print(formatStr.format(group, k, v.getClassLabel()))
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env python
2
+ # **************************************************************************
3
+ # *
4
+ # * Authors: J.M. De la Rosa Trevin (jmdelarosa@cnb.csic.es)
5
+ # *
6
+ # * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
7
+ # *
8
+ # * This program is free software; you can redistribute it and/or modify
9
+ # * it under the terms of the GNU General Public License as published by
10
+ # * the Free Software Foundation; either version 3 of the License, or
11
+ # * (at your option) any later version.
12
+ # *
13
+ # * This program is distributed in the hope that it will be useful,
14
+ # * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # * GNU General Public License for more details.
17
+ # *
18
+ # * You should have received a copy of the GNU General Public License
19
+ # * along with this program; if not, write to the Free Software
20
+ # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21
+ # * 02111-1307 USA
22
+ # *
23
+ # * All comments concerning this program package may be sent to the
24
+ # * e-mail address 'scipion@cnb.csic.es'
25
+ # *
26
+ # **************************************************************************
27
+ """
28
+ This module is responsible for launching protocol executions.
29
+ """
30
+ import sys
31
+ from pyworkflow.utils import LoggingConfigurator
32
+
33
+ if __name__ == '__main__':
34
+
35
+ if len(sys.argv) == 6:
36
+ projPath = sys.argv[1]
37
+ dbPath = sys.argv[2]
38
+ protId = int(sys.argv[3])
39
+ stdOut = sys.argv[4]
40
+ stdErr = sys.argv[5]
41
+
42
+ LoggingConfigurator.setUpProtocolRunLogging(stdOut, stdErr)
43
+
44
+ from pyworkflow.protocol import runProtocolMain
45
+ runProtocolMain(projPath, dbPath, protId)
46
+
47
+ else:
48
+ from os.path import basename
49
+ print("usage: %s projPath dbPath protocolID pathToStdoutLog pathToStdErrLog." % basename(sys.argv[0]))
50
+ print("sys.argv: %s" % sys.argv)
51
+ sys.exit(1)