scipion-pyworkflow 3.10.6__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 (123) hide show
  1. pyworkflow/config.py +131 -67
  2. pyworkflow/constants.py +2 -1
  3. pyworkflow/plugin.py +93 -44
  4. pyworkflow/resources/showj/arrowDown.png +0 -0
  5. pyworkflow/resources/showj/arrowUp.png +0 -0
  6. pyworkflow/resources/showj/background_section.png +0 -0
  7. pyworkflow/resources/showj/colRowModeOff.png +0 -0
  8. pyworkflow/resources/showj/colRowModeOn.png +0 -0
  9. pyworkflow/resources/showj/delete.png +0 -0
  10. pyworkflow/resources/showj/doc_icon.png +0 -0
  11. pyworkflow/resources/showj/download_icon.png +0 -0
  12. pyworkflow/resources/showj/enabled_gallery.png +0 -0
  13. pyworkflow/resources/showj/galleryViewOff.png +0 -0
  14. pyworkflow/resources/showj/galleryViewOn.png +0 -0
  15. pyworkflow/resources/showj/goto.png +0 -0
  16. pyworkflow/resources/showj/menu.png +0 -0
  17. pyworkflow/resources/showj/separator.png +0 -0
  18. pyworkflow/resources/showj/tableViewOff.png +0 -0
  19. pyworkflow/resources/showj/tableViewOn.png +0 -0
  20. pyworkflow/resources/showj/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  21. pyworkflow/resources/showj/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  22. pyworkflow/resources/showj/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  23. pyworkflow/resources/showj/volumeOff.png +0 -0
  24. pyworkflow/resources/showj/volumeOn.png +0 -0
  25. pyworkflow/viewer.py +23 -1
  26. pyworkflowtests/protocols.py +1 -3
  27. {scipion_pyworkflow-3.10.6.dist-info → scipion_pyworkflow-3.11.0.dist-info}/METADATA +13 -27
  28. scipion_pyworkflow-3.11.0.dist-info/RECORD +71 -0
  29. {scipion_pyworkflow-3.10.6.dist-info → scipion_pyworkflow-3.11.0.dist-info}/WHEEL +1 -1
  30. pyworkflow/apps/__init__.py +0 -29
  31. pyworkflow/apps/pw_manager.py +0 -37
  32. pyworkflow/apps/pw_plot.py +0 -51
  33. pyworkflow/apps/pw_project.py +0 -113
  34. pyworkflow/apps/pw_protocol_list.py +0 -143
  35. pyworkflow/apps/pw_protocol_run.py +0 -51
  36. pyworkflow/apps/pw_run_tests.py +0 -267
  37. pyworkflow/apps/pw_schedule_run.py +0 -322
  38. pyworkflow/apps/pw_sleep.py +0 -37
  39. pyworkflow/apps/pw_sync_data.py +0 -439
  40. pyworkflow/apps/pw_viewer.py +0 -78
  41. pyworkflow/gui/__init__.py +0 -36
  42. pyworkflow/gui/browser.py +0 -726
  43. pyworkflow/gui/canvas.py +0 -1190
  44. pyworkflow/gui/dialog.py +0 -977
  45. pyworkflow/gui/form.py +0 -2637
  46. pyworkflow/gui/graph.py +0 -247
  47. pyworkflow/gui/graph_layout.py +0 -271
  48. pyworkflow/gui/gui.py +0 -566
  49. pyworkflow/gui/matplotlib_image.py +0 -233
  50. pyworkflow/gui/plotter.py +0 -247
  51. pyworkflow/gui/project/__init__.py +0 -25
  52. pyworkflow/gui/project/base.py +0 -192
  53. pyworkflow/gui/project/constants.py +0 -139
  54. pyworkflow/gui/project/labels.py +0 -205
  55. pyworkflow/gui/project/project.py +0 -492
  56. pyworkflow/gui/project/searchprotocol.py +0 -154
  57. pyworkflow/gui/project/searchrun.py +0 -181
  58. pyworkflow/gui/project/steps.py +0 -171
  59. pyworkflow/gui/project/utils.py +0 -332
  60. pyworkflow/gui/project/variables.py +0 -179
  61. pyworkflow/gui/project/viewdata.py +0 -472
  62. pyworkflow/gui/project/viewprojects.py +0 -510
  63. pyworkflow/gui/project/viewprotocols.py +0 -2093
  64. pyworkflow/gui/project/viewprotocols_extra.py +0 -559
  65. pyworkflow/gui/text.py +0 -771
  66. pyworkflow/gui/tooltip.py +0 -185
  67. pyworkflow/gui/tree.py +0 -684
  68. pyworkflow/gui/widgets.py +0 -307
  69. pyworkflow/mapper/__init__.py +0 -26
  70. pyworkflow/mapper/mapper.py +0 -222
  71. pyworkflow/mapper/sqlite.py +0 -1581
  72. pyworkflow/mapper/sqlite_db.py +0 -145
  73. pyworkflow/project/__init__.py +0 -31
  74. pyworkflow/project/config.py +0 -454
  75. pyworkflow/project/manager.py +0 -180
  76. pyworkflow/project/project.py +0 -2007
  77. pyworkflow/protocol/__init__.py +0 -38
  78. pyworkflow/protocol/bibtex.py +0 -48
  79. pyworkflow/protocol/constants.py +0 -87
  80. pyworkflow/protocol/executor.py +0 -471
  81. pyworkflow/protocol/hosts.py +0 -314
  82. pyworkflow/protocol/launch.py +0 -270
  83. pyworkflow/protocol/package.py +0 -42
  84. pyworkflow/protocol/params.py +0 -741
  85. pyworkflow/protocol/protocol.py +0 -2641
  86. pyworkflow/tests/__init__.py +0 -29
  87. pyworkflow/tests/test_utils.py +0 -25
  88. pyworkflow/tests/tests.py +0 -341
  89. pyworkflow/utils/__init__.py +0 -38
  90. pyworkflow/utils/dataset.py +0 -414
  91. pyworkflow/utils/echo.py +0 -104
  92. pyworkflow/utils/graph.py +0 -169
  93. pyworkflow/utils/log.py +0 -284
  94. pyworkflow/utils/path.py +0 -528
  95. pyworkflow/utils/process.py +0 -153
  96. pyworkflow/utils/profiler.py +0 -92
  97. pyworkflow/utils/progressbar.py +0 -154
  98. pyworkflow/utils/properties.py +0 -631
  99. pyworkflow/utils/reflection.py +0 -129
  100. pyworkflow/utils/utils.py +0 -879
  101. pyworkflow/utils/which.py +0 -229
  102. pyworkflow/webservices/__init__.py +0 -8
  103. pyworkflow/webservices/config.py +0 -11
  104. pyworkflow/webservices/notifier.py +0 -162
  105. pyworkflow/webservices/repository.py +0 -59
  106. pyworkflow/webservices/workflowhub.py +0 -74
  107. pyworkflowtests/tests/__init__.py +0 -0
  108. pyworkflowtests/tests/test_canvas.py +0 -72
  109. pyworkflowtests/tests/test_domain.py +0 -45
  110. pyworkflowtests/tests/test_logs.py +0 -74
  111. pyworkflowtests/tests/test_mappers.py +0 -392
  112. pyworkflowtests/tests/test_object.py +0 -507
  113. pyworkflowtests/tests/test_project.py +0 -42
  114. pyworkflowtests/tests/test_protocol_execution.py +0 -142
  115. pyworkflowtests/tests/test_protocol_export.py +0 -78
  116. pyworkflowtests/tests/test_protocol_output.py +0 -158
  117. pyworkflowtests/tests/test_streaming.py +0 -47
  118. pyworkflowtests/tests/test_utils.py +0 -210
  119. scipion_pyworkflow-3.10.6.dist-info/RECORD +0 -140
  120. scipion_pyworkflow-3.10.6.dist-info/dependency_links.txt +0 -1
  121. {scipion_pyworkflow-3.10.6.dist-info → scipion_pyworkflow-3.11.0.dist-info}/entry_points.txt +0 -0
  122. {scipion_pyworkflow-3.10.6.dist-info → scipion_pyworkflow-3.11.0.dist-info}/licenses/LICENSE.txt +0 -0
  123. {scipion_pyworkflow-3.10.6.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
-