scipion-pyworkflow 3.7.0__py3-none-any.whl → 3.8.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 +19 -0
- pyworkflow/constants.py +2 -1
- pyworkflow/object.py +11 -3
- pyworkflow/plugin.py +7 -3
- pyworkflow/protocol/protocol.py +21 -1
- {scipion_pyworkflow-3.7.0.dist-info → scipion_pyworkflow-3.8.0.dist-info}/METADATA +12 -12
- {scipion_pyworkflow-3.7.0.dist-info → scipion_pyworkflow-3.8.0.dist-info}/RECORD +12 -12
- {scipion_pyworkflow-3.7.0.dist-info → scipion_pyworkflow-3.8.0.dist-info}/WHEEL +1 -1
- {scipion_pyworkflow-3.7.0.dist-info → scipion_pyworkflow-3.8.0.dist-info}/LICENSE.txt +0 -0
- {scipion_pyworkflow-3.7.0.dist-info → scipion_pyworkflow-3.8.0.dist-info}/dependency_links.txt +0 -0
- {scipion_pyworkflow-3.7.0.dist-info → scipion_pyworkflow-3.8.0.dist-info}/entry_points.txt +0 -0
- {scipion_pyworkflow-3.7.0.dist-info → scipion_pyworkflow-3.8.0.dist-info}/top_level.txt +0 -0
pyworkflow/config.py
CHANGED
@@ -527,6 +527,25 @@ class Config:
|
|
527
527
|
like registering FileHandlers or other stuff not needed when just importing modules."""
|
528
528
|
return cls.SCIPION_HOME_DEFINED != False
|
529
529
|
|
530
|
+
@classmethod
|
531
|
+
def isCondaInstallation(cls):
|
532
|
+
""" Returns true if the scipion installation is done using conda"""
|
533
|
+
|
534
|
+
# Get the CONDA_PYTHON_EXE
|
535
|
+
# NOTE: This will not work when calling scipion python directly! But should works using the launcher.
|
536
|
+
envFolder = os.environ.get("CONDA_PREFIX", None)
|
537
|
+
|
538
|
+
# No conda variable... virtualenv installation!!
|
539
|
+
if envFolder is None:
|
540
|
+
return False
|
541
|
+
else:
|
542
|
+
from pyworkflow.utils import getPython
|
543
|
+
# Conda available.... let's check if it is active the same scipion env
|
544
|
+
condaExe = os.path.join(envFolder, "bin", "python")
|
545
|
+
return condaExe == getPython()
|
546
|
+
|
547
|
+
|
548
|
+
|
530
549
|
|
531
550
|
# Add bindings folder to sys.path
|
532
551
|
sys.path.append(Config.getBindingsFolder())
|
pyworkflow/constants.py
CHANGED
@@ -37,12 +37,13 @@ from enum import Enum
|
|
37
37
|
# will break existing plugins, this number needs to be incremented.
|
38
38
|
CORE_VERSION = '3.0.0'
|
39
39
|
|
40
|
+
# To be removed once consumers (app, some plugins) do not make use of them
|
40
41
|
# Versions
|
41
42
|
VERSION_1 = '1.0.0'
|
42
43
|
VERSION_1_1 = '1.1.0'
|
43
44
|
VERSION_1_2 = '1.2.0'
|
44
45
|
VERSION_2_0 = '2.0.0'
|
45
|
-
VERSION_3_0 = '3.
|
46
|
+
VERSION_3_0 = '3.8.0'
|
46
47
|
|
47
48
|
# For a new release, define a new constant and assign it to LAST_VERSION
|
48
49
|
# The existing one has to be added to OLD_VERSIONS list.
|
pyworkflow/object.py
CHANGED
@@ -366,10 +366,18 @@ class Object(object):
|
|
366
366
|
elif isinstance(attr, PointerList):
|
367
367
|
for pointer in otherAttr:
|
368
368
|
attr.append(pointer)
|
369
|
-
elif isinstance(attr, Scalar)
|
370
|
-
|
369
|
+
elif isinstance(attr, Scalar):
|
370
|
+
if otherAttr.hasPointer():
|
371
|
+
attr.copy(otherAttr)
|
372
|
+
else:
|
373
|
+
attr.set(otherAttr.get())
|
371
374
|
else:
|
372
|
-
|
375
|
+
# Necessary for the correct storage of complex attributes (such as Acquisition or Transform) in
|
376
|
+
# heterogeneous sets of sets, like the sets of tilt-series. Those sets imply append to the intermediate
|
377
|
+
# level + append to the upper level + update the upper level, passing in the previous method version
|
378
|
+
# through the line attr.set(otherAttr.get()), resulting in a None and copying the acquisition of the
|
379
|
+
# set to all the elements of the set and losing the transformation info
|
380
|
+
setattr(self, name, otherAttr.clone())
|
373
381
|
|
374
382
|
def __getObjDict(self, prefix, objDict, includeClass, includePointers=True):
|
375
383
|
if prefix:
|
pyworkflow/plugin.py
CHANGED
@@ -112,9 +112,13 @@ class Domain:
|
|
112
112
|
cls._plugins[name] = m # Register the name to as a plugin
|
113
113
|
|
114
114
|
# Catch any import exception, warn about it but continue.
|
115
|
-
except ModuleNotFoundError:
|
116
|
-
|
117
|
-
|
115
|
+
except ModuleNotFoundError as e:
|
116
|
+
if e.name == name:
|
117
|
+
# This is probably due to a priority package like pwchem not being installed
|
118
|
+
pass
|
119
|
+
else:
|
120
|
+
logger.warning("Plugin '%s' has import errors: %s. Maybe a missing dependency?. "
|
121
|
+
"Is it devel mode and need to be reinstalled?. Ignoring it and continuing." % (name, str(e)))
|
118
122
|
except Exception as e:
|
119
123
|
|
120
124
|
(pwutils.yellow("WARNING!!: Plugin containing module %s does not import properly. "
|
pyworkflow/protocol/protocol.py
CHANGED
@@ -328,7 +328,6 @@ class Protocol(Step):
|
|
328
328
|
"""
|
329
329
|
|
330
330
|
# Version where protocol appeared first time
|
331
|
-
_lastUpdateVersion = pw.VERSION_1
|
332
331
|
_stepsCheckSecs = pw.Config.getStepsCheckSeconds()
|
333
332
|
# Protocol develop status: PROD, BETA, NEW
|
334
333
|
_devStatus = pw.PROD
|
@@ -916,6 +915,27 @@ class Protocol(Step):
|
|
916
915
|
|
917
916
|
return s
|
918
917
|
|
918
|
+
def getOutputSuffix(self, outputPrefix):
|
919
|
+
""" Return the suffix to be used for a new output.
|
920
|
+
For example: output3DCoordinates7.
|
921
|
+
It should take into account previous outputs
|
922
|
+
and number with a higher value.
|
923
|
+
"""
|
924
|
+
maxCounter = -1
|
925
|
+
for attrName, _ in self.iterOutputAttributes():
|
926
|
+
suffix = attrName.replace(outputPrefix, '')
|
927
|
+
try:
|
928
|
+
counter = int(suffix)
|
929
|
+
except:
|
930
|
+
counter = 1 # when there is not number assume 1
|
931
|
+
maxCounter = max(counter, maxCounter)
|
932
|
+
|
933
|
+
return str(maxCounter + 1) if maxCounter > 0 else '' # empty if not output
|
934
|
+
|
935
|
+
def getNextOutputName(self, outputPrefix):
|
936
|
+
"""Return the name to be used for a new output."""
|
937
|
+
return outputPrefix + self.getOutputSuffix(outputPrefix)
|
938
|
+
|
919
939
|
def copyDefinitionAttributes(self, other):
|
920
940
|
""" Copy definition attributes to other protocol. """
|
921
941
|
for paramName, _ in self.iterDefinitionAttributes():
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: scipion-pyworkflow
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.8.0
|
4
4
|
Summary: Simple workflow platform used in scientific applications, initially developed within the Scipion framework for image processing in Electron Microscopy.
|
5
5
|
Home-page: https://github.com/scipion-em/scipion-pyworkflow
|
6
6
|
Author: J.M. De la Rosa Trevin, Roberto Marabini, Grigory Sharov, Josue Gomez Blanco, Pablo Conesa, Yunior Fonseca Reyna
|
@@ -18,18 +18,18 @@ Classifier: Programming Language :: Python :: 3.11
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
19
19
|
Classifier: Topic :: Scientific/Engineering
|
20
20
|
License-File: LICENSE.txt
|
21
|
-
Requires-Dist: bibtexparser
|
22
|
-
Requires-Dist: psutil
|
21
|
+
Requires-Dist: bibtexparser<=1.4.1
|
22
|
+
Requires-Dist: psutil<=5.9.6
|
23
23
|
Requires-Dist: tkcolorpicker
|
24
|
-
Requires-Dist: distro
|
25
|
-
Requires-Dist: importlib-metadata
|
26
|
-
Requires-Dist: matplotlib
|
27
|
-
Requires-Dist: numpy
|
28
|
-
Requires-Dist: configparser
|
29
|
-
Requires-Dist: pillow
|
30
|
-
Requires-Dist: requests
|
31
|
-
Requires-Dist: matplotlib
|
32
|
-
Requires-Dist: numpy
|
24
|
+
Requires-Dist: distro<=1.8
|
25
|
+
Requires-Dist: importlib-metadata<=6.8.0
|
26
|
+
Requires-Dist: matplotlib==3.7.3; python_version == "3.8"
|
27
|
+
Requires-Dist: numpy==1.24.4; python_version == "3.8"
|
28
|
+
Requires-Dist: configparser==6.0.0; python_version >= "3.8"
|
29
|
+
Requires-Dist: pillow==10.1.0; python_version >= "3.8"
|
30
|
+
Requires-Dist: requests==2.31.0; python_version >= "3.8"
|
31
|
+
Requires-Dist: matplotlib==3.8.1; python_version >= "3.9"
|
32
|
+
Requires-Dist: numpy==1.26.1; python_version >= "3.9"
|
33
33
|
|
34
34
|
.. image:: https://img.shields.io/pypi/v/scipion-pyworkflow.svg
|
35
35
|
:target: https://pypi.python.org/pypi/scipion-pyworkflow
|
@@ -1,9 +1,9 @@
|
|
1
1
|
pyworkflow/__init__.py,sha256=Wr-MVKMQJy_Cy-rpPPB0-pyv8-8tx7GPPaLSNBrV1AI,1246
|
2
|
-
pyworkflow/config.py,sha256=
|
3
|
-
pyworkflow/constants.py,sha256=
|
2
|
+
pyworkflow/config.py,sha256=a6TyBwKFvq79dQMamA4D5dPULWfSKfIBbsRT4NdlA94,22048
|
3
|
+
pyworkflow/constants.py,sha256=LEuEXv7rXBSl2YyTQ27X4iK4-NJYPHWi3ibLXkt4F1k,7319
|
4
4
|
pyworkflow/exceptions.py,sha256=3VFxuNJHcIWxRnLPR0vYg0RFAQMmxPBJZLZSi87VI8E,507
|
5
|
-
pyworkflow/object.py,sha256=
|
6
|
-
pyworkflow/plugin.py,sha256=
|
5
|
+
pyworkflow/object.py,sha256=D5pLvHezEIXB1J_Lxc1CXF_s5ZEZ1r-pj1QAI1CQL24,55070
|
6
|
+
pyworkflow/plugin.py,sha256=wl1n-qxBZitm5CHm6uiUIp99eOv6TxxRKLxygxcK1KM,28805
|
7
7
|
pyworkflow/template.py,sha256=JtdK2AKgaAdu-SuovqNqn5W-ojmtw3SfaP2bOzSy_IA,10460
|
8
8
|
pyworkflow/viewer.py,sha256=vA6VxYuxmCwMjIxCIdrp_G-R-nVo-0TA8p1rSl24EOY,11386
|
9
9
|
pyworkflow/wizard.py,sha256=nXuk_qMUVlQNa6nB6GCt0CoFQ_P2dnJbGWdwtpDG2tQ,2633
|
@@ -72,7 +72,7 @@ pyworkflow/protocol/hosts.py,sha256=B9ENNclqYe75CPqAMOoPjwn-r3ST6HxTewXtsK_zWks,
|
|
72
72
|
pyworkflow/protocol/launch.py,sha256=7WKAiHma2tSuhqK4xVnxD_SnVt7Y5qyDFdQwTo8BLF0,11267
|
73
73
|
pyworkflow/protocol/package.py,sha256=L6x3HHKtbrhDQRJHD07SG3DQKNMGaRQ0ROoLEY3SuRQ,1444
|
74
74
|
pyworkflow/protocol/params.py,sha256=DRpeNIi_uQQ_JbqORq8A7P7yMBQpoj8r-8oBfroNtYI,26338
|
75
|
-
pyworkflow/protocol/protocol.py,sha256=
|
75
|
+
pyworkflow/protocol/protocol.py,sha256=xlq3_K7RmuatL-KM9m2K364P6Ft0dPG5r9Fgt0-pI0U,96993
|
76
76
|
pyworkflow/resources/Imagej.png,sha256=nU2nWI1wxZB_xlOKsZzdUjj-qiCTjO6GwEKYgZ5Risg,14480
|
77
77
|
pyworkflow/resources/chimera.png,sha256=AKCuwMqmZo0Cg2sddMUjBWUhmAq-nPsAVCBpVrYNeiQ,815
|
78
78
|
pyworkflow/resources/fa-exclamation-triangle_alert.png,sha256=31_XvRu0CkJ2dvHSpcBAR43378lIJTWwiag_A7SuUQc,585
|
@@ -131,10 +131,10 @@ pyworkflowtests/tests/test_protocol_export.py,sha256=z18nKPkOnrYLMU8KqcnVsF6-ylQ
|
|
131
131
|
pyworkflowtests/tests/test_protocol_output.py,sha256=8gnIFMRNmwPnIBRCG29WHJB6mqK4FLGn1jiXHtTD6pY,5980
|
132
132
|
pyworkflowtests/tests/test_streaming.py,sha256=vOH-bKCM-fVUSsejqNnCX5TPXhdUayk9ZtJHsNVcfCY,1615
|
133
133
|
pyworkflowtests/tests/test_utils.py,sha256=_pTYGCuXC7YNMdCBzUYNfSBCR3etrHsxHfIhsQi4VPc,7465
|
134
|
-
scipion_pyworkflow-3.
|
135
|
-
scipion_pyworkflow-3.
|
136
|
-
scipion_pyworkflow-3.
|
137
|
-
scipion_pyworkflow-3.
|
138
|
-
scipion_pyworkflow-3.
|
139
|
-
scipion_pyworkflow-3.
|
140
|
-
scipion_pyworkflow-3.
|
134
|
+
scipion_pyworkflow-3.8.0.dist-info/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
135
|
+
scipion_pyworkflow-3.8.0.dist-info/METADATA,sha256=A-juSUF4DN1a1bGPKIfEBkhU8HJTaNa2Bo-y6CvoG_Q,4681
|
136
|
+
scipion_pyworkflow-3.8.0.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
|
137
|
+
scipion_pyworkflow-3.8.0.dist-info/dependency_links.txt,sha256=D7r_CPRjYRtBb3q_OBocTdsaeXI5TwnYMu5ri0JFtzs,84
|
138
|
+
scipion_pyworkflow-3.8.0.dist-info/entry_points.txt,sha256=oR-zwsOICjEPINm-FWVPp-RfnpXZanVal4_XG6BWkkQ,127
|
139
|
+
scipion_pyworkflow-3.8.0.dist-info/top_level.txt,sha256=PzyJteyenJwLjAeSFP7oYrTN_U71GABQwET8oLZkh9k,27
|
140
|
+
scipion_pyworkflow-3.8.0.dist-info/RECORD,,
|
File without changes
|
{scipion_pyworkflow-3.7.0.dist-info → scipion_pyworkflow-3.8.0.dist-info}/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|