scipion-pyworkflow 3.10.5__py3-none-any.whl → 3.11.0__py3-none-any.whl

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 (127) hide show
  1. pyworkflow/config.py +131 -67
  2. pyworkflow/constants.py +12 -2
  3. pyworkflow/object.py +3 -2
  4. pyworkflow/plugin.py +93 -44
  5. pyworkflow/project/scripts/fix_links.py +4 -1
  6. pyworkflow/resources/showj/arrowDown.png +0 -0
  7. pyworkflow/resources/showj/arrowUp.png +0 -0
  8. pyworkflow/resources/showj/background_section.png +0 -0
  9. pyworkflow/resources/showj/colRowModeOff.png +0 -0
  10. pyworkflow/resources/showj/colRowModeOn.png +0 -0
  11. pyworkflow/resources/showj/delete.png +0 -0
  12. pyworkflow/resources/showj/doc_icon.png +0 -0
  13. pyworkflow/resources/showj/download_icon.png +0 -0
  14. pyworkflow/resources/showj/enabled_gallery.png +0 -0
  15. pyworkflow/resources/showj/galleryViewOff.png +0 -0
  16. pyworkflow/resources/showj/galleryViewOn.png +0 -0
  17. pyworkflow/resources/showj/goto.png +0 -0
  18. pyworkflow/resources/showj/menu.png +0 -0
  19. pyworkflow/resources/showj/separator.png +0 -0
  20. pyworkflow/resources/showj/tableViewOff.png +0 -0
  21. pyworkflow/resources/showj/tableViewOn.png +0 -0
  22. pyworkflow/resources/showj/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  23. pyworkflow/resources/showj/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  24. pyworkflow/resources/showj/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  25. pyworkflow/resources/showj/volumeOff.png +0 -0
  26. pyworkflow/resources/showj/volumeOn.png +0 -0
  27. pyworkflow/viewer.py +23 -1
  28. pyworkflowtests/objects.py +2 -2
  29. pyworkflowtests/protocols.py +1 -3
  30. {scipion_pyworkflow-3.10.5.dist-info → scipion_pyworkflow-3.11.0.dist-info}/METADATA +21 -25
  31. scipion_pyworkflow-3.11.0.dist-info/RECORD +71 -0
  32. {scipion_pyworkflow-3.10.5.dist-info → scipion_pyworkflow-3.11.0.dist-info}/WHEEL +1 -1
  33. scipion_pyworkflow-3.11.0.dist-info/entry_points.txt +2 -0
  34. pyworkflow/apps/__init__.py +0 -29
  35. pyworkflow/apps/pw_manager.py +0 -37
  36. pyworkflow/apps/pw_plot.py +0 -51
  37. pyworkflow/apps/pw_project.py +0 -113
  38. pyworkflow/apps/pw_protocol_list.py +0 -143
  39. pyworkflow/apps/pw_protocol_run.py +0 -51
  40. pyworkflow/apps/pw_run_tests.py +0 -267
  41. pyworkflow/apps/pw_schedule_run.py +0 -322
  42. pyworkflow/apps/pw_sleep.py +0 -37
  43. pyworkflow/apps/pw_sync_data.py +0 -439
  44. pyworkflow/apps/pw_viewer.py +0 -78
  45. pyworkflow/gui/__init__.py +0 -36
  46. pyworkflow/gui/browser.py +0 -726
  47. pyworkflow/gui/canvas.py +0 -1190
  48. pyworkflow/gui/dialog.py +0 -977
  49. pyworkflow/gui/form.py +0 -2637
  50. pyworkflow/gui/graph.py +0 -247
  51. pyworkflow/gui/graph_layout.py +0 -271
  52. pyworkflow/gui/gui.py +0 -566
  53. pyworkflow/gui/matplotlib_image.py +0 -233
  54. pyworkflow/gui/plotter.py +0 -247
  55. pyworkflow/gui/project/__init__.py +0 -25
  56. pyworkflow/gui/project/base.py +0 -192
  57. pyworkflow/gui/project/constants.py +0 -139
  58. pyworkflow/gui/project/labels.py +0 -205
  59. pyworkflow/gui/project/project.py +0 -492
  60. pyworkflow/gui/project/searchprotocol.py +0 -154
  61. pyworkflow/gui/project/searchrun.py +0 -181
  62. pyworkflow/gui/project/steps.py +0 -171
  63. pyworkflow/gui/project/utils.py +0 -332
  64. pyworkflow/gui/project/variables.py +0 -179
  65. pyworkflow/gui/project/viewdata.py +0 -472
  66. pyworkflow/gui/project/viewprojects.py +0 -510
  67. pyworkflow/gui/project/viewprotocols.py +0 -2093
  68. pyworkflow/gui/project/viewprotocols_extra.py +0 -560
  69. pyworkflow/gui/text.py +0 -771
  70. pyworkflow/gui/tooltip.py +0 -185
  71. pyworkflow/gui/tree.py +0 -684
  72. pyworkflow/gui/widgets.py +0 -307
  73. pyworkflow/mapper/__init__.py +0 -26
  74. pyworkflow/mapper/mapper.py +0 -222
  75. pyworkflow/mapper/sqlite.py +0 -1578
  76. pyworkflow/mapper/sqlite_db.py +0 -145
  77. pyworkflow/project/__init__.py +0 -31
  78. pyworkflow/project/config.py +0 -454
  79. pyworkflow/project/manager.py +0 -180
  80. pyworkflow/project/project.py +0 -2010
  81. pyworkflow/protocol/__init__.py +0 -38
  82. pyworkflow/protocol/bibtex.py +0 -48
  83. pyworkflow/protocol/constants.py +0 -87
  84. pyworkflow/protocol/executor.py +0 -455
  85. pyworkflow/protocol/hosts.py +0 -313
  86. pyworkflow/protocol/launch.py +0 -270
  87. pyworkflow/protocol/package.py +0 -42
  88. pyworkflow/protocol/params.py +0 -741
  89. pyworkflow/protocol/protocol.py +0 -2582
  90. pyworkflow/tests/__init__.py +0 -29
  91. pyworkflow/tests/test_utils.py +0 -25
  92. pyworkflow/tests/tests.py +0 -341
  93. pyworkflow/utils/__init__.py +0 -38
  94. pyworkflow/utils/dataset.py +0 -414
  95. pyworkflow/utils/echo.py +0 -104
  96. pyworkflow/utils/graph.py +0 -169
  97. pyworkflow/utils/log.py +0 -284
  98. pyworkflow/utils/path.py +0 -528
  99. pyworkflow/utils/process.py +0 -132
  100. pyworkflow/utils/profiler.py +0 -92
  101. pyworkflow/utils/progressbar.py +0 -154
  102. pyworkflow/utils/properties.py +0 -631
  103. pyworkflow/utils/reflection.py +0 -129
  104. pyworkflow/utils/utils.py +0 -879
  105. pyworkflow/utils/which.py +0 -229
  106. pyworkflow/webservices/__init__.py +0 -8
  107. pyworkflow/webservices/config.py +0 -11
  108. pyworkflow/webservices/notifier.py +0 -162
  109. pyworkflow/webservices/repository.py +0 -59
  110. pyworkflow/webservices/workflowhub.py +0 -74
  111. pyworkflowtests/tests/__init__.py +0 -0
  112. pyworkflowtests/tests/test_canvas.py +0 -72
  113. pyworkflowtests/tests/test_domain.py +0 -45
  114. pyworkflowtests/tests/test_logs.py +0 -74
  115. pyworkflowtests/tests/test_mappers.py +0 -392
  116. pyworkflowtests/tests/test_object.py +0 -507
  117. pyworkflowtests/tests/test_project.py +0 -42
  118. pyworkflowtests/tests/test_protocol_execution.py +0 -135
  119. pyworkflowtests/tests/test_protocol_export.py +0 -78
  120. pyworkflowtests/tests/test_protocol_output.py +0 -158
  121. pyworkflowtests/tests/test_streaming.py +0 -47
  122. pyworkflowtests/tests/test_utils.py +0 -210
  123. scipion_pyworkflow-3.10.5.dist-info/RECORD +0 -140
  124. scipion_pyworkflow-3.10.5.dist-info/dependency_links.txt +0 -1
  125. scipion_pyworkflow-3.10.5.dist-info/entry_points.txt +0 -5
  126. {scipion_pyworkflow-3.10.5.dist-info → scipion_pyworkflow-3.11.0.dist-info/licenses}/LICENSE.txt +0 -0
  127. {scipion_pyworkflow-3.10.5.dist-info → scipion_pyworkflow-3.11.0.dist-info}/top_level.txt +0 -0
pyworkflow/gui/tooltip.py DELETED
@@ -1,185 +0,0 @@
1
- # **************************************************************************
2
- # *
3
- # * Authors: J.M. De la Rosa Trevin (delarosatrevin@scilifelab.se) [1]
4
- # *
5
- # * [1] SciLifeLab, Stockholm University
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, see <https://www.gnu.org/licenses/>.
19
- # *
20
- # * All comments concerning this program package may be sent to the
21
- # * e-mail address 'scipion@cnb.csic.es'
22
- # *
23
- # **************************************************************************
24
- """
25
- Tooltip widget, taken from web.
26
- """
27
-
28
- import tkinter as tk
29
-
30
- '''Michael Lange <klappnase (at) freakmail (dot) de>
31
- The ToolTip class provides a flexible tooltip widget for Tkinter; it is based on IDLE's ToolTip
32
- module which unfortunately seems to be broken (at least the version I saw).
33
- INITIALIZATION OPTIONS:
34
- anchor : where the text should be positioned inside the widget, must be on of "n", "s", "e", "w", "nw" and so on;
35
- default is "center"
36
- bd : borderwidth of the widget; default is 1 (NOTE: don't use "borderwidth" here)
37
- bg : background color to use for the widget; default is "lightyellow" (NOTE: don't use "background")
38
- delay : time in ms that it takes for the widget to appear on the screen when the mouse pointer has
39
- entered the parent widget; default is 1500
40
- fg : foreground (i.e. text) color to use; default is "black" (NOTE: don't use "foreground")
41
- follow_mouse : if set to 1 the tooltip will follow the mouse pointer instead of being displayed
42
- outside of the parent widget; this may be useful if you want to use tooltips for
43
- large widgets like listboxes or canvases; default is 0
44
- font : font to use for the widget; default is system specific
45
- justify : how multiple lines of text will be aligned, must be "left", "right" or "center"; default is "left"
46
- padx : extra space added to the left and right within the widget; default is 4
47
- pady : extra space above and below the text; default is 2
48
- relief : one of "flat", "ridge", "groove", "raised", "sunken" or "solid"; default is "solid"
49
- state : must be "normal" or "disabled"; if set to "disabled" the tooltip will not appear; default is "normal"
50
- text : the text that is displayed inside the widget
51
- textvariable : if set to an instance of Tkinter.StringVar() the variable's value will be used as text for the widget
52
- width : width of the widget; the default is 0, which means that "wraplength" will be used to limit the widgets width
53
- wraplength : limits the number of characters in each line; default is 150
54
-
55
- WIDGET METHODS:
56
- configure(**opts) : change one or more of the widget's options as described above; the changes will take effect the
57
- next time the tooltip shows up; NOTE: follow_mouse cannot be changed after widget initialization
58
-
59
- Other widget methods that might be useful if you want to subclass ToolTip:
60
- enter() : callback when the mouse pointer enters the parent widget
61
- leave() : called when the mouse pointer leaves the parent widget
62
- motion() : is called when the mouse pointer moves inside the parent widget if follow_mouse is set to 1 and the
63
- tooltip has shown up to continually update the coordinates of the tooltip window
64
- coords() : calculates the screen coordinates of the tooltip window
65
- create_contents() : creates the contents of the tooltip window (by default a Tkinter.Label)
66
- '''
67
- # Ideas gleaned from PySol
68
-
69
-
70
- class ToolTip:
71
- def __init__(self, master, text='Your text here', delay=1500, **opts):
72
- self.master = master
73
- self._opts = {'anchor': 'center', 'bd': 1, 'bg': 'lightyellow', 'delay': delay, 'fg': 'black',
74
- 'follow_mouse': 0, 'font': None, 'justify': 'left', 'padx': 4, 'pady': 2,
75
- 'relief': 'solid', 'state': 'normal', 'text': text, 'textvariable': None,
76
- 'width': 0, 'wraplength': 150}
77
- self.configure(**opts)
78
- self._tipwindow = None
79
- self._id = None
80
- self._id1 = self.master.bind("<Enter>", self.enter, '+')
81
- self._id2 = self.master.bind("<Leave>", self.leave, '+')
82
- self._id3 = self.master.bind("<ButtonPress>", self.leave, '+')
83
- self._follow_mouse = 0
84
- if self._opts['follow_mouse']:
85
- self._id4 = self.master.bind("<Motion>", self.motion, '+')
86
- self._follow_mouse = 1
87
-
88
- def configure(self, **opts):
89
- for key in opts:
90
- if key in self._opts:
91
- self._opts[key] = opts[key]
92
- else:
93
- KeyError = 'KeyError: Unknown option: "%s"' % key
94
- raise KeyError
95
-
96
- # ----these methods handle the callbacks on "<Enter>", "<Leave>" and "<Motion>"-------------
97
- # ----events on the parent widget; override them if you want to change the widget's behavior
98
-
99
- def enter(self, event=None):
100
- self._schedule()
101
-
102
- def leave(self, event=None):
103
- self._unschedule()
104
- self._hide()
105
-
106
- def motion(self, event=None):
107
- if self._tipwindow and self._follow_mouse:
108
- x, y = self.coords()
109
- self._tipwindow.wm_geometry("+%d+%d" % (x, y))
110
-
111
- # ------the methods that do the work:---------------------------------------------------------##
112
-
113
- def _schedule(self):
114
- self._unschedule()
115
- if self._opts['state'] == 'disabled':
116
- return
117
- self._id = self.master.after(self._opts['delay'], self._show)
118
-
119
- def _unschedule(self):
120
- id = self._id
121
- self._id = None
122
- if id:
123
- self.master.after_cancel(id)
124
-
125
- def _show(self):
126
- if self._opts['state'] == 'disabled':
127
- self._unschedule()
128
- return
129
- if not self._tipwindow:
130
- self._tipwindow = tw = tk.Toplevel(self.master)
131
- # hide the window until we know the geometry
132
- tw.withdraw()
133
- tw.wm_overrideredirect(1)
134
-
135
- if tw.tk.call("tk", "windowingsystem") == 'aqua':
136
- tw.tk.call("::tk::unsupported::MacWindowStyle", "style", tw._w, "help", "none")
137
-
138
- self.create_contents()
139
- tw.update_idletasks()
140
- x, y = self.coords()
141
- tw.wm_geometry("+%d+%d" % (x, y))
142
- tw.deiconify()
143
-
144
- def _hide(self):
145
- tw = self._tipwindow
146
- self._tipwindow = None
147
- if tw:
148
- tw.destroy()
149
-
150
- ##----these methods might be overridden in derived classes:----------------------------------##
151
-
152
- def coords(self):
153
- # The tip window must be completely outside the master widget;
154
- # otherwise when the mouse enters the tip window we get
155
- # a leave event and it disappears, and then we get an enter
156
- # event and it reappears, and so on forever :-(
157
- # or we take care that the mouse pointer is always outside the tipwindow :-)
158
- tw = self._tipwindow
159
- twx, twy = tw.winfo_reqwidth(), tw.winfo_reqheight()
160
- w, h = tw.winfo_screenwidth(), tw.winfo_screenheight()
161
- # calculate the y coordinate:
162
- if self._follow_mouse:
163
- y = tw.winfo_pointery() + 20
164
- # make sure the tipwindow is never outside the screen:
165
- if y + twy > h:
166
- y = y - twy - 30
167
- else:
168
- y = self.master.winfo_rooty() + self.master.winfo_height() + 3
169
- if y + twy > h:
170
- y = self.master.winfo_rooty() - twy - 3
171
- # we can use the same x coord in both cases:
172
- x = tw.winfo_pointerx() - twx / 2
173
- if x < 0:
174
- x = 0
175
- elif x + twx > w:
176
- x = w - twx
177
- return x, y
178
-
179
- def create_contents(self):
180
- opts = self._opts.copy()
181
- for opt in ('delay', 'follow_mouse', 'state'):
182
- del opts[opt]
183
- label = tk.Label(self._tipwindow, **opts)
184
- label.pack()
185
-