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.
- pyworkflow/config.py +131 -67
- pyworkflow/constants.py +2 -1
- pyworkflow/plugin.py +93 -44
- pyworkflow/resources/showj/arrowDown.png +0 -0
- pyworkflow/resources/showj/arrowUp.png +0 -0
- pyworkflow/resources/showj/background_section.png +0 -0
- pyworkflow/resources/showj/colRowModeOff.png +0 -0
- pyworkflow/resources/showj/colRowModeOn.png +0 -0
- pyworkflow/resources/showj/delete.png +0 -0
- pyworkflow/resources/showj/doc_icon.png +0 -0
- pyworkflow/resources/showj/download_icon.png +0 -0
- pyworkflow/resources/showj/enabled_gallery.png +0 -0
- pyworkflow/resources/showj/galleryViewOff.png +0 -0
- pyworkflow/resources/showj/galleryViewOn.png +0 -0
- pyworkflow/resources/showj/goto.png +0 -0
- pyworkflow/resources/showj/menu.png +0 -0
- pyworkflow/resources/showj/separator.png +0 -0
- pyworkflow/resources/showj/tableViewOff.png +0 -0
- pyworkflow/resources/showj/tableViewOn.png +0 -0
- pyworkflow/resources/showj/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- pyworkflow/resources/showj/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- pyworkflow/resources/showj/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- pyworkflow/resources/showj/volumeOff.png +0 -0
- pyworkflow/resources/showj/volumeOn.png +0 -0
- pyworkflow/viewer.py +23 -1
- pyworkflowtests/protocols.py +1 -3
- {scipion_pyworkflow-3.10.6.dist-info → scipion_pyworkflow-3.11.0.dist-info}/METADATA +13 -27
- scipion_pyworkflow-3.11.0.dist-info/RECORD +71 -0
- {scipion_pyworkflow-3.10.6.dist-info → scipion_pyworkflow-3.11.0.dist-info}/WHEEL +1 -1
- pyworkflow/apps/__init__.py +0 -29
- pyworkflow/apps/pw_manager.py +0 -37
- pyworkflow/apps/pw_plot.py +0 -51
- pyworkflow/apps/pw_project.py +0 -113
- pyworkflow/apps/pw_protocol_list.py +0 -143
- pyworkflow/apps/pw_protocol_run.py +0 -51
- pyworkflow/apps/pw_run_tests.py +0 -267
- pyworkflow/apps/pw_schedule_run.py +0 -322
- pyworkflow/apps/pw_sleep.py +0 -37
- pyworkflow/apps/pw_sync_data.py +0 -439
- pyworkflow/apps/pw_viewer.py +0 -78
- pyworkflow/gui/__init__.py +0 -36
- pyworkflow/gui/browser.py +0 -726
- pyworkflow/gui/canvas.py +0 -1190
- pyworkflow/gui/dialog.py +0 -977
- pyworkflow/gui/form.py +0 -2637
- pyworkflow/gui/graph.py +0 -247
- pyworkflow/gui/graph_layout.py +0 -271
- pyworkflow/gui/gui.py +0 -566
- pyworkflow/gui/matplotlib_image.py +0 -233
- pyworkflow/gui/plotter.py +0 -247
- pyworkflow/gui/project/__init__.py +0 -25
- pyworkflow/gui/project/base.py +0 -192
- pyworkflow/gui/project/constants.py +0 -139
- pyworkflow/gui/project/labels.py +0 -205
- pyworkflow/gui/project/project.py +0 -492
- pyworkflow/gui/project/searchprotocol.py +0 -154
- pyworkflow/gui/project/searchrun.py +0 -181
- pyworkflow/gui/project/steps.py +0 -171
- pyworkflow/gui/project/utils.py +0 -332
- pyworkflow/gui/project/variables.py +0 -179
- pyworkflow/gui/project/viewdata.py +0 -472
- pyworkflow/gui/project/viewprojects.py +0 -510
- pyworkflow/gui/project/viewprotocols.py +0 -2093
- pyworkflow/gui/project/viewprotocols_extra.py +0 -559
- pyworkflow/gui/text.py +0 -771
- pyworkflow/gui/tooltip.py +0 -185
- pyworkflow/gui/tree.py +0 -684
- pyworkflow/gui/widgets.py +0 -307
- pyworkflow/mapper/__init__.py +0 -26
- pyworkflow/mapper/mapper.py +0 -222
- pyworkflow/mapper/sqlite.py +0 -1581
- pyworkflow/mapper/sqlite_db.py +0 -145
- pyworkflow/project/__init__.py +0 -31
- pyworkflow/project/config.py +0 -454
- pyworkflow/project/manager.py +0 -180
- pyworkflow/project/project.py +0 -2007
- pyworkflow/protocol/__init__.py +0 -38
- pyworkflow/protocol/bibtex.py +0 -48
- pyworkflow/protocol/constants.py +0 -87
- pyworkflow/protocol/executor.py +0 -471
- pyworkflow/protocol/hosts.py +0 -314
- pyworkflow/protocol/launch.py +0 -270
- pyworkflow/protocol/package.py +0 -42
- pyworkflow/protocol/params.py +0 -741
- pyworkflow/protocol/protocol.py +0 -2641
- pyworkflow/tests/__init__.py +0 -29
- pyworkflow/tests/test_utils.py +0 -25
- pyworkflow/tests/tests.py +0 -341
- pyworkflow/utils/__init__.py +0 -38
- pyworkflow/utils/dataset.py +0 -414
- pyworkflow/utils/echo.py +0 -104
- pyworkflow/utils/graph.py +0 -169
- pyworkflow/utils/log.py +0 -284
- pyworkflow/utils/path.py +0 -528
- pyworkflow/utils/process.py +0 -153
- pyworkflow/utils/profiler.py +0 -92
- pyworkflow/utils/progressbar.py +0 -154
- pyworkflow/utils/properties.py +0 -631
- pyworkflow/utils/reflection.py +0 -129
- pyworkflow/utils/utils.py +0 -879
- pyworkflow/utils/which.py +0 -229
- pyworkflow/webservices/__init__.py +0 -8
- pyworkflow/webservices/config.py +0 -11
- pyworkflow/webservices/notifier.py +0 -162
- pyworkflow/webservices/repository.py +0 -59
- pyworkflow/webservices/workflowhub.py +0 -74
- pyworkflowtests/tests/__init__.py +0 -0
- pyworkflowtests/tests/test_canvas.py +0 -72
- pyworkflowtests/tests/test_domain.py +0 -45
- pyworkflowtests/tests/test_logs.py +0 -74
- pyworkflowtests/tests/test_mappers.py +0 -392
- pyworkflowtests/tests/test_object.py +0 -507
- pyworkflowtests/tests/test_project.py +0 -42
- pyworkflowtests/tests/test_protocol_execution.py +0 -142
- pyworkflowtests/tests/test_protocol_export.py +0 -78
- pyworkflowtests/tests/test_protocol_output.py +0 -158
- pyworkflowtests/tests/test_streaming.py +0 -47
- pyworkflowtests/tests/test_utils.py +0 -210
- scipion_pyworkflow-3.10.6.dist-info/RECORD +0 -140
- scipion_pyworkflow-3.10.6.dist-info/dependency_links.txt +0 -1
- {scipion_pyworkflow-3.10.6.dist-info → scipion_pyworkflow-3.11.0.dist-info}/entry_points.txt +0 -0
- {scipion_pyworkflow-3.10.6.dist-info → scipion_pyworkflow-3.11.0.dist-info}/licenses/LICENSE.txt +0 -0
- {scipion_pyworkflow-3.10.6.dist-info → scipion_pyworkflow-3.11.0.dist-info}/top_level.txt +0 -0
pyworkflow/utils/properties.py
DELETED
@@ -1,631 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
# **************************************************************************
|
3
|
-
# *
|
4
|
-
# * Authors: Jose Gutierrez (jose.gutierrez@cnb.csic.es)
|
5
|
-
# * Adrian Quintana (aquintana@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
|
-
This module defines the text used in the application.
|
30
|
-
"""
|
31
|
-
# NOTE: DO NOT REMOVE UNTIL plugin manager uses Config.SCIPION_MAIN_COLOR and is released
|
32
|
-
from pyworkflow.constants import Color, DOCSITEURLS
|
33
|
-
from PIL import Image
|
34
|
-
|
35
|
-
class Message:
|
36
|
-
# Example Usage:
|
37
|
-
# MyMessage = Message()
|
38
|
-
# print MyMessage.label
|
39
|
-
|
40
|
-
# Header List
|
41
|
-
VIEW_PROJECTS = 'Projects'
|
42
|
-
VIEW_PROTOCOLS = 'Protocols'
|
43
|
-
VIEW_DATA = 'Data'
|
44
|
-
VIEW_UPLOAD = 'Upload'
|
45
|
-
|
46
|
-
# Projects Template
|
47
|
-
LABEL_PROJECTS = 'Projects'
|
48
|
-
LABEL_CREATE_PROJECT = 'Create Project'
|
49
|
-
LABEL_IMPORT_PROJECT = 'Import project'
|
50
|
-
TITLE_CREATE_PROJECT = 'Enter the project name'
|
51
|
-
TITLE_CREATE_PROJECT_NAME = 'Project Name: '
|
52
|
-
TITLE_EDIT_OBJECT = 'Edit Object properties'
|
53
|
-
MESSAGE_DELETE_PROJECT = 'This will *delete* the project and all its *data*. Are you sure?'
|
54
|
-
LABEL_DELETE_PROJECT = '[Delete]'
|
55
|
-
TITLE_DELETE_PROJECT = 'Confirm project deletion'
|
56
|
-
LABEL_RENAME_PROJECT = '[Rename]'
|
57
|
-
TITLE_RENAME_PROJECT = 'Confirm project renaming'
|
58
|
-
LABEL_CREATED = 'Created: '
|
59
|
-
LABEL_MODIFIED = 'Modified: '
|
60
|
-
|
61
|
-
# Project Content Template
|
62
|
-
LABEL_PROJECT = 'Project '
|
63
|
-
|
64
|
-
# -- Protocol Treeview --
|
65
|
-
LABEL_WORKFLOW = 'Workflow View: '
|
66
|
-
LABEL_PROTTREE_NONE = 'None'
|
67
|
-
|
68
|
-
# -- Toolbar --
|
69
|
-
LABEL_NEW = 'Add'
|
70
|
-
LABEL_EDIT = 'Edit'
|
71
|
-
LABEL_RENAME = 'Rename '
|
72
|
-
LABEL_COPY = 'Copy'
|
73
|
-
LABEL_PASTE = 'Paste'
|
74
|
-
LABEL_DUPLICATE = 'Duplicate'
|
75
|
-
LABEL_DELETE = 'Delete'
|
76
|
-
LABEL_STEPS = 'Steps'
|
77
|
-
LABEL_BROWSE = 'Browse'
|
78
|
-
LABEL_DB = 'Db'
|
79
|
-
LABEL_STOP = 'Stop'
|
80
|
-
LABEL_ANALYZE = 'Analyze results'
|
81
|
-
LABEL_TREE = 'Tree'
|
82
|
-
LABEL_SMALLTREE = 'Small Tree'
|
83
|
-
LABEL_REFRESH = 'Refresh'
|
84
|
-
LABEL_DEFAULT = 'Default'
|
85
|
-
LABEL_CONTINUE = 'Continue'
|
86
|
-
LABEL_EXPORT = 'Export'
|
87
|
-
LABEL_EXPORT_UPLOAD = 'Export & upload'
|
88
|
-
LABEL_RESTART_WORKFLOW = 'Restart all'
|
89
|
-
LABEL_CONTINUE_WORKFLOW = 'Continue all'
|
90
|
-
LABEL_STOP_WORKFLOW = 'Stop from'
|
91
|
-
LABEL_RESET_WORKFLOW = 'Reset from'
|
92
|
-
|
93
|
-
# -- Tabs --
|
94
|
-
LABEL_DATA = 'Data'
|
95
|
-
LABEL_SUMMARY = 'Summary'
|
96
|
-
LABEL_INPUT = 'Input'
|
97
|
-
LABEL_OUTPUT = 'Output'
|
98
|
-
LABEL_COMMENT = 'Comments'
|
99
|
-
|
100
|
-
LABEL_OBJSUMMARY = 'Object Summary'
|
101
|
-
LABEL_OBJINFO = 'Info'
|
102
|
-
LABEL_OBJCREATED = 'Created'
|
103
|
-
LABEL_OBJLABEL = 'Label'
|
104
|
-
|
105
|
-
LABEL_METHODS = 'Methods'
|
106
|
-
LABEL_BIB_BTN = 'Export references'
|
107
|
-
LABEL_LOGS = 'Output Logs'
|
108
|
-
LABEL_LOGS_OUTPUT = 'Output Log'
|
109
|
-
LABEL_LOGS_ERROR = 'Error Log'
|
110
|
-
LABEL_LOGS_SCIPION = 'Project Log'
|
111
|
-
|
112
|
-
NO_INFO_SUMMARY = 'No summary information.'
|
113
|
-
NO_INFO_METHODS = 'No methods information.'
|
114
|
-
NO_INFO_LOGS = 'No logs information.'
|
115
|
-
NO_SAVE_SETTINGS = 'Error trying to save settings.'
|
116
|
-
|
117
|
-
# ------- Protocol Form messages ----------
|
118
|
-
LABEL_CITE = 'Cite'
|
119
|
-
LABEL_HELP = 'Help'
|
120
|
-
TEXT_HELP = 'The file selected will be uploaded to the project folder. If the file was uploaded before, it will be replaced.'
|
121
|
-
LABEL_RUNNAME = 'Run name'
|
122
|
-
LABEL_EXECUTION = 'Run mode'
|
123
|
-
LABEL_RUNMODE = 'Mode'
|
124
|
-
LABEL_PARALLEL = 'Parallel'
|
125
|
-
LABEL_HOST = 'Host'
|
126
|
-
LABEL_THREADS = 'Threads'
|
127
|
-
LABEL_SCIPION_THREADS = 'Scipion threads'
|
128
|
-
LABEL_MPI = 'MPI'
|
129
|
-
LABEL_QUEUE = 'Use a queue engine?'
|
130
|
-
|
131
|
-
LABEL_WAIT_FOR = 'Wait for'
|
132
|
-
|
133
|
-
LABEL_EXPERT = 'Expert Level'
|
134
|
-
LABEL_EXPERT_NORMAL = 'Normal'
|
135
|
-
LABEL_EXPERT_ADVANCE = 'Advanced'
|
136
|
-
LABEL_EXPERT_EXPERT = 'Expert'
|
137
|
-
|
138
|
-
HELP_RUNMODE = """
|
139
|
-
Normally, each protocol is composed of several atomic steps.
|
140
|
-
Each step could be computationally intensive, that's why
|
141
|
-
the *Continue* execution mode will try to continue from the
|
142
|
-
last completed step. On the other hand, the *Restart* mode
|
143
|
-
will clean the whole run directory and start from scratch.
|
144
|
-
"""
|
145
|
-
|
146
|
-
HELP_PARALLEL_HEADER = 'Define the number of processors to be used in the execution.\nCheck %s for more detailed info.\n\n' % DOCSITEURLS.THREADS_MPIS_AND_GPUS
|
147
|
-
HELP_PARALLEL_MPI = ("*MPI*:\nThis is a number of independent processes"
|
148
|
-
" that communicate through message passing "
|
149
|
-
"over the network (or the same computer).\n")
|
150
|
-
HELP_PARALLEL_THREADS = ("*Threads*:\nThis refers to different execution threads in the same process that "
|
151
|
-
"can share memory. They run in the same computer. This value is an argument"
|
152
|
-
" passed to the program integrated")
|
153
|
-
|
154
|
-
HELP_SCIPION_THREADS = ("*Scipion threads*:\n threads created by Scipion to run the steps."
|
155
|
-
" 1 thread is always used by the master/main process. Then extra threads will allow"
|
156
|
-
" this protocol to run several steps at the same time, taking always into account "
|
157
|
-
"restrictions to previous steps and 'theoretical GPU availability'")
|
158
|
-
|
159
|
-
HELP_USEQUEUE = """
|
160
|
-
Click Yes if you want to send this execution to a queue engine like Slurm, Torque, ...
|
161
|
-
The queue commands to launch and stop jobs should be configured at
|
162
|
-
_%s_ file.
|
163
|
-
|
164
|
-
See %s for more information.
|
165
|
-
"""
|
166
|
-
HELP_USEQUEUEPERJOB = """
|
167
|
-
Click *Yes* if you want to submit the multiple jobs per protocol to a Queue system.
|
168
|
-
The queue commands for launch and stop jobs should be configured
|
169
|
-
for the current host in the _hosts.conf_ file.
|
170
|
-
"""
|
171
|
-
|
172
|
-
HELP_WAIT_FOR = """
|
173
|
-
Specify a comma separated list of protocol IDs if you want
|
174
|
-
to *schedule* this protocol and wait for those protocols to finish before
|
175
|
-
starting this one.
|
176
|
-
|
177
|
-
This function will allow you to "schedule" many
|
178
|
-
runs that will be executed after each other.
|
179
|
-
|
180
|
-
See %s for more information.
|
181
|
-
"""
|
182
|
-
|
183
|
-
TITLE_NAME_RUN = ' Protocol Run: '
|
184
|
-
TITLE_RUN = 'Run'
|
185
|
-
TITLE_LABEL = 'Label'
|
186
|
-
LABEL_OPT_COMMENT = 'Describe your run here...'
|
187
|
-
TITLE_COMMENT = 'Comment'
|
188
|
-
LABEL_RUN_MODE_RESUME = 'resume'
|
189
|
-
LABEL_RUN_MODE_RESTART = 'restart'
|
190
|
-
TITLE_EXEC = 'Execution'
|
191
|
-
TITLE_BROWSE_DATA = 'Protocol data'
|
192
|
-
LABEL_QUEUE_YES = 'Yes'
|
193
|
-
LABEL_QUEUE_NO = 'No'
|
194
|
-
LABEL_PARAM_YES = 'Yes'
|
195
|
-
LABEL_PARAM_NO = 'No'
|
196
|
-
LABEL_BUTTON_CLOSE = 'Close'
|
197
|
-
LABEL_BUTTON_SAVE = 'Save'
|
198
|
-
LABEL_BUTTON_EXEC = 'Execute'
|
199
|
-
LABEL_BUTTON_VIS = 'Visualize'
|
200
|
-
LABEL_BUTTON_WIZ = 'Wizard'
|
201
|
-
LABEL_BUTTON_HELP = 'Help'
|
202
|
-
LABEL_BUTTON_RETURN = 'Save'
|
203
|
-
# VARS
|
204
|
-
VAR_EXEC_HOST = 'hostName'
|
205
|
-
VAR_EXPERT = 'expertLevel'
|
206
|
-
VAR_MPI = 'numberOfMpi'
|
207
|
-
VAR_QUEUE = '_useQueue'
|
208
|
-
VAR_RUN_NAME = 'runName'
|
209
|
-
VAR_COMMENT = 'comment'
|
210
|
-
VAR_RUN_MODE = 'runMode'
|
211
|
-
VAR_THREADS = 'numberOfThreads'
|
212
|
-
|
213
|
-
LABEL_PATTERN = 'Pattern'
|
214
|
-
TEXT_PATTERN = """\
|
215
|
-
Pattern (that can include wildcards) of the files to import.
|
216
|
-
For example:
|
217
|
-
*data/particles/***.spi*
|
218
|
-
*~/Micrographs/mic/***.mrc*"""
|
219
|
-
ERROR_PATTERN_EMPTY = 'The *pattern* cannot be empty.'
|
220
|
-
ERROR_PATTERN_FILES = 'There are no files matching the *pattern*'
|
221
|
-
LABEL_CHECKSTACK = 'Check stack files?'
|
222
|
-
LABEL_COPYFILES = 'Copy files?'
|
223
|
-
LABEL_VOLTAGE = 'Microscope voltage (kV)'
|
224
|
-
TEXT_VOLTAGE = "Microscope voltage"
|
225
|
-
LABEL_SPH_ABERRATION = 'Spherical aberration (mm)'
|
226
|
-
TEXT_SPH_ABERRATION = """\
|
227
|
-
Optical effect due to the increased refraction of light rays when they
|
228
|
-
strike the lens near its edge, in comparison with those that strike near
|
229
|
-
the center."""
|
230
|
-
LABEL_AMPLITUDE = 'Amplitude Contrast'
|
231
|
-
TEXT_AMPLITUDE = """\
|
232
|
-
Produced by the loss of amplitude (i.e. electrons) from the beam.
|
233
|
-
|
234
|
-
For a weak phase and weak amplitude object, the amplitude contrast ratio Qo
|
235
|
-
is automatically computed. It should be a positive number, typically between
|
236
|
-
0.05 and 0.3."""
|
237
|
-
LABEL_PATTERNU = 'Pattern untilted'
|
238
|
-
LABEL_PATTERNT = 'Pattern tilted'
|
239
|
-
|
240
|
-
LABEL_SAMP_MODE = 'Sampling rate mode'
|
241
|
-
TEXT_SAMP_MODE = """\
|
242
|
-
You can specify the sampling rate (pixel size) directly from the image
|
243
|
-
(A/pixel, Ts) or by specifying the magnification rate (M) and the scanner
|
244
|
-
pixel size (microns/pixel, Tm).
|
245
|
-
|
246
|
-
They are related by Ts = Tm / M"""
|
247
|
-
LABEL_SAMP_MODE_1 = 'From image'
|
248
|
-
LABEL_SAMP_MODE_2 = 'From scanner'
|
249
|
-
LABEL_SAMP_RATE = 'Pixel size (sampling rate) Å/px'
|
250
|
-
TEXT_SAMP_RATE = "Pixel size"
|
251
|
-
LABEL_MAGNI_RATE = 'Magnification rate'
|
252
|
-
TEXT_MAGNI_RATE = """\
|
253
|
-
Electron optical magnification (M). It can be used to compute the Image Pixel
|
254
|
-
Size ("Sampling Rate") (Ts) using the Scanner Pixel Size (Tm), Ts = Tm / M."""
|
255
|
-
LABEL_SCANNED = 'Scanned pixel size (microns/px)'
|
256
|
-
|
257
|
-
ERROR_IMPORT_VOL = 'importVolumes: There are no filePaths matching the pattern'
|
258
|
-
|
259
|
-
LABEL_CTF_ESTI = 'CTF Estimation'
|
260
|
-
LABEL_INPUT_MIC = 'Input Micrographs'
|
261
|
-
LABEL_INPUT_PART = 'Input Particles'
|
262
|
-
LABEL_INPUT_VOLS = 'Input Volumes'
|
263
|
-
LABEL_INPUT_MOVS = 'Input Movies'
|
264
|
-
LABEL_ALIG_PART = 'Write aligned particles?'
|
265
|
-
TEXT_ALIG_PART = 'If set to *Yes*, the alignment will be applied to \n'+'input particles and a new aligned set will be created.'
|
266
|
-
|
267
|
-
TEXT_NO_INPUT_MIC = 'No *Input Micrographs* selected.'
|
268
|
-
TEXT_NO_CTF_READY = 'CTF of *Input Micrographs* not ready yet.'
|
269
|
-
TEXT_NO_OUTPUT_CO = 'Output coordinates not ready yet.'
|
270
|
-
ERROR_NO_EST_CTF = '_estimateCTF should be implemented'
|
271
|
-
TEXT_NO_OUTPUT_FILES = 'No output file produced'
|
272
|
-
|
273
|
-
TITLE_LAUNCHED = 'Success'
|
274
|
-
LABEL_LAUNCHED = 'The protocol was launched successfully.'
|
275
|
-
LABEL_FOUND_ERROR = 'Errors found'
|
276
|
-
TITLE_SAVED_FORM = 'Success'
|
277
|
-
LABEL_SAVED_FORM = 'The protocol was saved successfully.'
|
278
|
-
TITLE_DELETE_FORM = 'Confirm DELETE'
|
279
|
-
TITLE_RESTART_FORM = 'Confirm RESTART'
|
280
|
-
TITLE_CONTINUE_FORM = 'Confirm CONTINUE'
|
281
|
-
LABEL_DELETE_FORM = """
|
282
|
-
You are going to *DELETE* the run(s):
|
283
|
-
- %s
|
284
|
-
*ALL DATA* related will be permanently removed.
|
285
|
-
|
286
|
-
Do you really want to continue?'
|
287
|
-
"""
|
288
|
-
MESSAGE_RESTART_FORM = """
|
289
|
-
You are going to *RESTART* the run:
|
290
|
-
%s
|
291
|
-
|
292
|
-
Do you really want to restart it?
|
293
|
-
"""
|
294
|
-
MESSAGE_CONTINUE_FORM = """
|
295
|
-
You are going to *CONTINUE* the run:
|
296
|
-
%s
|
297
|
-
|
298
|
-
Do you really want to continue it?
|
299
|
-
"""
|
300
|
-
|
301
|
-
MESSAGE_RESTART_WORKFLOW_WITH_RESULTS = """
|
302
|
-
All previous results of the following protocols will be deleted:
|
303
|
-
%s
|
304
|
-
|
305
|
-
Do you really want to *RESTART* the workflow?'
|
306
|
-
"""
|
307
|
-
|
308
|
-
MESSAGE_CONTINUE_WORKFLOW_WITH_RESULTS = """
|
309
|
-
All previous results of the following protocols will be affected:
|
310
|
-
%s
|
311
|
-
|
312
|
-
Do you really want to *CONTINUE* the workflow?
|
313
|
-
"""
|
314
|
-
|
315
|
-
MESSAGE_ASK_SINGLE_ALL = """
|
316
|
-
What do you want to do?
|
317
|
-
|
318
|
-
*Single* : Just this protocol.
|
319
|
-
*All*: All above listed protocols will be launched.
|
320
|
-
"""
|
321
|
-
|
322
|
-
|
323
|
-
TITLE_STOP_FORM = 'Confirm STOP'
|
324
|
-
LABEL_STOP_FORM = 'Do you really want to *STOP* this run?'
|
325
|
-
|
326
|
-
NO_VIEWER_FOUND = 'There is no viewer for protocol:'
|
327
|
-
|
328
|
-
TITLE_SAVE_OUTPUT = 'Save protocol output'
|
329
|
-
LABEL_SAVE_OUTPUT = 'Do you wish to save protocol output?'
|
330
|
-
|
331
|
-
TITLE_RESTART_WORKFLOW_FORM = 'Confirm RESTART workflow'
|
332
|
-
TITLE_CONTINUE_WORKFLOW_FORM = 'Confirm CONTINUE workflow'
|
333
|
-
TITLE_STOP_WORKFLOW_FORM = 'Confirm STOP'
|
334
|
-
TITLE_RESET_WORKFLOW_FORM = 'Confirm RESET'
|
335
|
-
MESSAGE_RESTART_WORKFLOW = 'Do you really want to *RESTART* this workflow?'
|
336
|
-
MESSAGE_CONTINUE_WORKFLOW = 'Do you really want to *CONTINUE* this workflow?'
|
337
|
-
TITLE_STOP_WORKFLOW = 'Do you really want to *STOP* this Workflow?'
|
338
|
-
TITLE_RESET_WORKFLOW = 'Do you really want to *RESET* this Workflow?'
|
339
|
-
TITLE_LAUNCHED_WORKFLOW_FAILED_FORM = 'Error while launching the workflow'
|
340
|
-
TITLE_STOPPED_WORKFLOW_FAILED = 'Error while stopping the workflow'
|
341
|
-
TITLE_RESETED_WORKFLOW_FAILED = 'Error while resetting the workflow'
|
342
|
-
TITLE_LAUNCHED_WORKFLOW_FAILED = 'The workflow can not be relaunched from this protocol.\n'
|
343
|
-
TITLE_ACTIVE_PROTOCOLS = 'The following protocols are active:'
|
344
|
-
|
345
|
-
# SHOWJ_WEB
|
346
|
-
SHOWJ_TITLE = 'Showj'
|
347
|
-
|
348
|
-
LABEL_RESLICE = 'Reslice'
|
349
|
-
RESLICE_Z_NEGATIVE = 'Z Negative (Front)'
|
350
|
-
RESLICE_Y_NEGATIVE = 'Y Negative (Top)'
|
351
|
-
RESLICE_Y_POSITIVE = 'Y Positive (Bottom)'
|
352
|
-
RESLICE_X_NEGATIVE = 'X Negative (Left)'
|
353
|
-
RESLICE_X_POSITIVE = 'X Positive (Right)'
|
354
|
-
|
355
|
-
LABEL_COLS = 'Cols'
|
356
|
-
LABEL_ROWS = 'Rows'
|
357
|
-
|
358
|
-
LABEL_MIRRORY = 'Invert Y Axis'
|
359
|
-
LABEL_APPLY_TRANSFORM = 'Apply Transform Matrix'
|
360
|
-
LABEL_ONLY_SHIFTS = 'Only Shifts'
|
361
|
-
LABEL_WRAP = 'Wrap'
|
362
|
-
|
363
|
-
LABEL_BLOCK_SELECTION = 'Select Block'
|
364
|
-
LABEL_LABEL_SELECTION = 'Select Label'
|
365
|
-
LABEL_VOLUME_SELECTION = 'Select Volume'
|
366
|
-
|
367
|
-
LABEL_ENABLE = 'Enable'
|
368
|
-
LABEL_DISABLE = 'Disable'
|
369
|
-
LABEL_SELECT_ALL = 'Select all'
|
370
|
-
LABEL_SELECT_FROM = 'Select from'
|
371
|
-
LABEL_SELECT_TO = 'Select to'
|
372
|
-
|
373
|
-
LABEL_DISPLAY_TABLE_CONFIG = 'Display Table Configuration'
|
374
|
-
|
375
|
-
LABEL_LABEL = 'Label'
|
376
|
-
LABEL_VISIBLE = 'Visible'
|
377
|
-
LABEL_RENDER = 'Render'
|
378
|
-
|
379
|
-
LABEL_BUTTON_OK = 'Ok'
|
380
|
-
LABEL_BUTTON_CANCEL = 'Cancel'
|
381
|
-
|
382
|
-
LABEL_THRESHOLD = 'Threshold:'
|
383
|
-
|
384
|
-
ERROR_DIMENSIONS = 'Incorrect table width or height: '
|
385
|
-
ERROR_WEBGL = 'Your web browser does not support or is not configured for WebGL. See [[http://get.webgl.org/][WebGL Support]] for more information.'
|
386
|
-
|
387
|
-
TOOLTIP_SEARCH = 'Search for a given world in the text. '
|
388
|
-
TOOLTIP_SEARCH_NEXT = 'Move to the next highlighted item. Also, press <Down> or <F3>'
|
389
|
-
TOOLTIP_SEARCH_PREVIOUS = 'Move to the previous highlighted item. Also, press <Up> or <Shift-F3>'
|
390
|
-
TOOLTIP_REFRESH = 'Reload the content of the files in the viewer. '
|
391
|
-
TOOLTIP_EXTERNAL = 'Open the viewer in an external window. '
|
392
|
-
|
393
|
-
TITLE_PICK_GAUSS = 'Automatic gaussian picking'
|
394
|
-
LABEL_PICK_GAUSS = 'Do you wish to perform an automatic gaussian picking for the remaining micrographs?'
|
395
|
-
|
396
|
-
TITLE_INSPECTOR = 'Objects inspector'
|
397
|
-
LABEL_INSPECTOR = 'Objects inspector will inspect the whole project. ' \
|
398
|
-
'Thus, it can take a while depending on the size of the project.\n' \
|
399
|
-
'Do you want to continue?'
|
400
|
-
EXECUTE_PLUGINS_MANAGER_OPERATION = 'Execute all selected operations'
|
401
|
-
CANCEL_SELECTED_OPERATION = 'Cancel a selected operation'
|
402
|
-
|
403
|
-
|
404
|
-
# PLUGIN/BINARY STATES
|
405
|
-
class PluginStates:
|
406
|
-
PLUGIN = 'plugin'
|
407
|
-
BINARY = 'binary'
|
408
|
-
UNCHECKED = 'unchecked'
|
409
|
-
CHECKED = 'checked'
|
410
|
-
INSTALL = 'install'
|
411
|
-
UNINSTALL = 'uninstall'
|
412
|
-
TO_INSTALL = 'to_install'
|
413
|
-
INSTALLED = 'installed'
|
414
|
-
PRECESSING = 'processing'
|
415
|
-
FAILURE = 'failure'
|
416
|
-
AVAILABLE_RELEASE = 'available_release'
|
417
|
-
TO_UPDATE = 'to_update'
|
418
|
-
SUCCESS = 'success'
|
419
|
-
ERRORS = 'errors'
|
420
|
-
WAITING = 'waiting'
|
421
|
-
|
422
|
-
|
423
|
-
class PluginInformation:
|
424
|
-
PLUGIN_URL = 'pluginURL'
|
425
|
-
PLUGIN_NAME = 'pluginName'
|
426
|
-
PLUGIN_VERSION = 'pluginVersion'
|
427
|
-
PLUGIN_RELEASE_DATE = 'pluginUploadedDate'
|
428
|
-
PLUGIN_DESCRIPTION = 'pluginDescription'
|
429
|
-
PLUGIN_AUTHORS = 'pluginAuthor'
|
430
|
-
|
431
|
-
class SpriteImage:
|
432
|
-
def __init__(self, top, left, name, bottom=None, right=None):
|
433
|
-
self.top = top
|
434
|
-
self.left = left
|
435
|
-
self.bottom = bottom if bottom else top+16
|
436
|
-
self.right = right if right else left+16
|
437
|
-
self.name = name
|
438
|
-
def __str__(self):
|
439
|
-
return self.name
|
440
|
-
def __len__(self):
|
441
|
-
return len(self.name)
|
442
|
-
|
443
|
-
class Sprite:
|
444
|
-
_image=None
|
445
|
-
# Default width of the sprite to calculate the ratio. For other sprites make sprite file n times bigger
|
446
|
-
DEFAULT_WIDTH = 320
|
447
|
-
RATIO = None
|
448
|
-
"Ratio of the sprite file of the SpriteImage definitions"
|
449
|
-
|
450
|
-
@classmethod
|
451
|
-
def getSpritesFile(cls):
|
452
|
-
from pyworkflow import Config
|
453
|
-
return Config.getSpritesFile()
|
454
|
-
@classmethod
|
455
|
-
def loadSprites(cls):
|
456
|
-
""" Loads the image of the sprite"""
|
457
|
-
if not cls._image:
|
458
|
-
cls._image = Image.open(cls.getSpritesFile())
|
459
|
-
|
460
|
-
from pyworkflow import Config
|
461
|
-
# If any zoom to apply
|
462
|
-
if Config.SCIPION_ICON_ZOOM != 100:
|
463
|
-
factor = Config.SCIPION_ICON_ZOOM/100
|
464
|
-
size = cls._image.size
|
465
|
-
newSize=size[0] * factor, size[1]* factor
|
466
|
-
cls.image = cls._image.thumbnail(newSize)
|
467
|
-
width = cls._image.width
|
468
|
-
cls.RATIO = width/cls.DEFAULT_WIDTH
|
469
|
-
return cls._image
|
470
|
-
|
471
|
-
@classmethod
|
472
|
-
def getImage(cls, sprite:SpriteImage):
|
473
|
-
""" Returns the image cut put from the stripe file at the locations define by SpriteImage"""
|
474
|
-
sprites = cls.loadSprites()
|
475
|
-
return sprites.crop((sprite.left*cls.RATIO, sprite.top*cls.RATIO, sprite.right*cls.RATIO, sprite.bottom*cls.RATIO))
|
476
|
-
|
477
|
-
|
478
|
-
# To get font awesome icons into png use: http://fa2png.io/
|
479
|
-
class Icon:
|
480
|
-
# Protocols status
|
481
|
-
PROT_DISABLED = SpriteImage(16,32,'prot_disabled.png',bottom=32,right=64)
|
482
|
-
BETA = SpriteImage(0,0,'beta.png',bottom=16,right=32)
|
483
|
-
NEW = SpriteImage(32,0,'new.png',bottom=48,right=32)
|
484
|
-
PRODUCTION = SpriteImage(32,32,'production.png',bottom=48,right=64)
|
485
|
-
UPDATED = SpriteImage(16,0,'updated.png',bottom=32,right=32)
|
486
|
-
|
487
|
-
GROUP = SpriteImage(80, 224,'class_obj.png')
|
488
|
-
FAVORITE = SpriteImage(80,256,'bookmark.png')
|
489
|
-
DEBUG = SpriteImage(64,288,'debug.png')
|
490
|
-
DOWNLOAD = SpriteImage(48,272,'fa-download.png')
|
491
|
-
FIND = SpriteImage(80,272,'binoculares.png')
|
492
|
-
SELECT_ALL = SpriteImage(0,32,'workflow.png')
|
493
|
-
|
494
|
-
# Project window icons
|
495
|
-
RUNS_TREE = SpriteImage(16,272,'fa-sitemap.png')
|
496
|
-
ACTION_NEW = SpriteImage(80,304,'fa-plus-circle.png')
|
497
|
-
ACTION_EDIT = SpriteImage(32,272,'fa-pencil.png')
|
498
|
-
ACTION_SELECT_FROM = SpriteImage(64,272,'fa-arrow-down.png')
|
499
|
-
ACTION_SELECT_TO = SpriteImage(64,256,'fa-arrow-up.png')
|
500
|
-
ACTION_COPY = SpriteImage(80,208,'clipboard-regular.png')
|
501
|
-
ACTION_PASTE = SpriteImage(0,64,'paste-solid.png')
|
502
|
-
ACTION_DUPLICATE = SpriteImage(48,208,'fa-files-o.png')
|
503
|
-
ACTION_DELETE = SpriteImage(16,176,'fa-trash-o.png')
|
504
|
-
ACTION_REFRESH = SpriteImage(32,144, 'fa-refresh.png')
|
505
|
-
ACTION_RENAME = SpriteImage(0,48,'rename.png')
|
506
|
-
ACTION_BROWSE = SpriteImage(32,304,'fa-folder-open.png')
|
507
|
-
ACTION_DB = SpriteImage(48,288,'fa-database.png')
|
508
|
-
ACTION_STOP = SpriteImage(16,256,'fa-stop.png')
|
509
|
-
ACTION_CONTINUE = SpriteImage(32,256,'fa-play-circle-o.png')
|
510
|
-
ACTION_STOP_WORKFLOW = SpriteImage(16,240,'fa-stop-workflow.png')
|
511
|
-
ACTION_RESULTS = SpriteImage(48,240,'fa-eye.png')
|
512
|
-
ACTION_SAVE = SpriteImage(32,112, 'fa-save.png')
|
513
|
-
ACTION_VISUALIZE = ACTION_RESULTS
|
514
|
-
ACTION_WIZ = SpriteImage(32,288,'fa-magic.png')
|
515
|
-
ACTION_HELP = SpriteImage(32,160,'fa-question-circle.png')
|
516
|
-
ACTION_REFERENCES = SpriteImage(48,256,'link')
|
517
|
-
ACTION_EXPORT = ACTION_REFERENCES
|
518
|
-
ACTION_EXPORT_UPLOAD = SpriteImage(16,96, 'fa-upload.png')
|
519
|
-
ACTION_SEARCH = SpriteImage(32,96, 'fa-search.png')
|
520
|
-
SETTINGS = SpriteImage(48,304,'fa-cogs.png')
|
521
|
-
ACTION_EXECUTE = SETTINGS
|
522
|
-
ACTION_IN = SpriteImage(16,304,'fa-sign-in.png')
|
523
|
-
ACTION_OUT = SpriteImage(16,288,'fa-sign-out.png')
|
524
|
-
ACTION_FIND_NEXT = SpriteImage(32,208,'fa-next.png')
|
525
|
-
ACTION_FIND_PREVIOUS = SpriteImage(32,192,'fa-previous.png')
|
526
|
-
ACTION_COLLAPSE = SpriteImage(32,240,'fa-minus-square.png')
|
527
|
-
ACTION_EXPAND = SpriteImage(32,224,'fa-plus-square.png')
|
528
|
-
ACTION_CIRCLE = SpriteImage(48,192,'circle.png')
|
529
|
-
ACTION_PICKING = SpriteImage(64, 192, 'picking.png')
|
530
|
-
ACTION_STATS = SpriteImage(80, 192, 'stats.png')
|
531
|
-
ACTION_ZOOM = SpriteImage(64, 176, 'zoom.png')
|
532
|
-
ACTION_HAND = SpriteImage(80, 176, 'hand.png')
|
533
|
-
ACTION_FILAMENT_PICKING = SpriteImage(48, 176, 'filament.png')
|
534
|
-
ACTION_GRID = SpriteImage(64, 160, 'grid.png')
|
535
|
-
ACTION_CONTRAST = SpriteImage(80, 160, 'contrast.png')
|
536
|
-
|
537
|
-
|
538
|
-
# Host template
|
539
|
-
BUTTON_SELECT = SpriteImage(64,224,'fa-check.png')
|
540
|
-
BUTTON_CANCEL = SpriteImage(64,240,'fa-ban.png')
|
541
|
-
ACTION_CLOSE = BUTTON_CANCEL
|
542
|
-
BUTTON_CLOSE = ACTION_CLOSE
|
543
|
-
BUTTON_SAVE = ACTION_SAVE
|
544
|
-
|
545
|
-
ARROW_UP = ACTION_SELECT_TO
|
546
|
-
TAGS = SpriteImage(16,224,'fa-tags.png')
|
547
|
-
HOME = SpriteImage(0,304,'fa-home.png')
|
548
|
-
LIGHTBULB = SpriteImage(32,80,'fa-lightbulb-o.png')
|
549
|
-
ROCKET = SpriteImage(32,128, 'fa-rocket.png')
|
550
|
-
|
551
|
-
# File browser icons
|
552
|
-
FOLDER_OPEN = ACTION_BROWSE
|
553
|
-
DB = SpriteImage(0,144,'file_sqlite.png')
|
554
|
-
TXT_FILE = SpriteImage(0,96,'file_text.png')
|
555
|
-
FILE_VOL = SpriteImage(0,80,'file_vol.png')
|
556
|
-
FILE_STACK = SpriteImage(0,112,'file_stack.png')
|
557
|
-
FILE_STACK_LINK = SpriteImage(0,128, 'file_stack_link.png')
|
558
|
-
PYTHON_FILE = SpriteImage(0,160,'file_python.png')
|
559
|
-
FILE_METADATA = SpriteImage(0,176,'file_md.png')
|
560
|
-
FILE_METADATA_LINK = SpriteImage(0,192, 'file_md_link.png')
|
561
|
-
FILE_IMAGE = SpriteImage(0,208, 'file_image.png')
|
562
|
-
FILE_IMAGE_LINK = SpriteImage(0,224, 'file_image_link.png')
|
563
|
-
FILE = SpriteImage(0,240, 'file_generic.png')
|
564
|
-
FILE_LINK = SpriteImage(0,256, 'file_generic_link.png')
|
565
|
-
FOLDER = SpriteImage(0,272, 'file_folder.png')
|
566
|
-
FOLDER_LINK = SpriteImage(0,288, 'file_folder_link.png')
|
567
|
-
|
568
|
-
BROOM = SpriteImage(80,240,'broom-solid.png')
|
569
|
-
BACKWARD = SpriteImage(80,288,'backward-solid.png')
|
570
|
-
CODE_BRANCH = SpriteImage(64,304,'code-branch-solid.png')
|
571
|
-
|
572
|
-
# Dialog icons
|
573
|
-
ERROR = 'fa-times-circle_alert.png'
|
574
|
-
INFO = 'fa-info-circle_alert.png'
|
575
|
-
ALERT = 'fa-exclamation-triangle_alert.png'
|
576
|
-
NO_IMAGE_128 = 'no-image128.png'
|
577
|
-
|
578
|
-
SCIPION_ICON = 'scipion_icon.png'
|
579
|
-
SCIPION_ICON_PROJ = 'scipion_icon_proj.png'
|
580
|
-
SCIPION_ICON_PROJS = 'scipion_icon_projs.png'
|
581
|
-
SCIPION_ICON_PROT = 'scipion_icon_prot.png'
|
582
|
-
SCIPION_LOGO_SMALL = 'scipion_logo_small.png'
|
583
|
-
|
584
|
-
# EXTERNAL PROGRAMS
|
585
|
-
CHIMERA = 'chimera.png'
|
586
|
-
|
587
|
-
# PLUGIN MANAGER ICONS
|
588
|
-
CHECKED = SpriteImage(64,208,'fa-checked.png')
|
589
|
-
UNCHECKED = SpriteImage(16,160,'fa-unchecked.png')
|
590
|
-
INSTALL = SpriteImage(32,64,'fa-install.png')
|
591
|
-
UNINSTALL = ACTION_CLOSE
|
592
|
-
TO_INSTALL = SpriteImage(32,256,'fa-to_install.png')
|
593
|
-
INSTALLED = SpriteImage(16, 64,'fa-installed.png')
|
594
|
-
PROCESSING = SpriteImage(32, 176, 'fa-processing.png',48,192)
|
595
|
-
FAILURE = SpriteImage(48,224,'fa-failure.png')
|
596
|
-
DELETE_OPERATION = ACTION_DELETE
|
597
|
-
TO_UPDATE = SpriteImage(32,144,'fa-update.png')
|
598
|
-
WAITING = 'wait.gif'
|
599
|
-
ACTION_UNDO = SpriteImage(16,144,'fa-undo.png')
|
600
|
-
|
601
|
-
PLUGIN_AUTHORS = SpriteImage(16,80,'users.png')
|
602
|
-
PLUGIN_DESCRIPTION = FILE_STACK
|
603
|
-
PLUGIN_RELEASE_DATE = ACTION_EXPORT_UPLOAD
|
604
|
-
PLUGIN_VERSION = FILE_VOL
|
605
|
-
PLUGIN_PACKAGE = FOLDER
|
606
|
-
|
607
|
-
|
608
|
-
class colorText:
|
609
|
-
"""printing in colors, bold, etc,
|
610
|
-
example: print colorText.BOLD + 'Hello World !' + color.END
|
611
|
-
"""
|
612
|
-
PURPLE = '\033[95m'
|
613
|
-
CYAN = '\033[96m'
|
614
|
-
DARKCYAN = '\033[36m'
|
615
|
-
BLUE = '\033[94m'
|
616
|
-
GREEN = '\033[92m'
|
617
|
-
YELLOW = '\033[93m'
|
618
|
-
RED = '\033[91m'
|
619
|
-
BOLD = '\033[1m'
|
620
|
-
UNDERLINE = '\033[4m'
|
621
|
-
END = '\033[0m'
|
622
|
-
|
623
|
-
|
624
|
-
class KEYSYM:
|
625
|
-
""" Keysym values for evaluating key pressed within events
|
626
|
-
as reported at http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/key-names.html
|
627
|
-
"""
|
628
|
-
DELETE = 'Delete'
|
629
|
-
RETURN = 'Return'
|
630
|
-
SHIFT = 'Shift'
|
631
|
-
CONTROL = 'Control'
|