processview 0.2.0__tar.gz → 0.2.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.
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/__pycache__/__init__.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/__pycache__/setup.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/__pycache__/version.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/__pycache__/__init__.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/__pycache__/dataset.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/__pycache__/helpers.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/__pycache__/setup.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/__pycache__/superviseprocess.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/helpers.py +59 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/manager/__pycache__/__init__.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/manager/__pycache__/manager.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/manager/manager.py +12 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/manager/test/__pycache__/__init__.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/manager/test/__pycache__/test_manager.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/core/test/__pycache__/__init__.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/gui/__pycache__/__init__.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/__pycache__/icons.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/__pycache__/messagebox.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/__pycache__/processmanager.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/processmanager.py +8 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/gui/test/__pycache__/__init__.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/test/__pycache__/test_process_manager.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/resources/__pycache__/__init__.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/test/__pycache__/__init__.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/utils/__pycache__/__init__.cpython-37.pyc +0 -0
- home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview/utils/__pycache__/singleton.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/version.py +1 -1
- {users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview-0.2.0-py3.7.egg-info → home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview-0.2.2-py3.7.egg-info}/PKG-INFO +1 -1
- {users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview-0.2.0-py3.7.egg-info → home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview-0.2.2-py3.7.egg-info}/SOURCES.txt +2 -0
- users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview/__pycache__/__init__.cpython-37.pyc +0 -0
- users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview/core/__pycache__/__init__.cpython-37.pyc +0 -0
- users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview/core/manager/__pycache__/__init__.cpython-37.pyc +0 -0
- users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview/core/manager/test/__pycache__/__init__.cpython-37.pyc +0 -0
- users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview/core/test/__pycache__/__init__.cpython-37.pyc +0 -0
- users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview/gui/__pycache__/__init__.cpython-37.pyc +0 -0
- users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview/gui/test/__pycache__/__init__.cpython-37.pyc +0 -0
- users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview/utils/__pycache__/singleton.cpython-37.pyc +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/dataset.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/manager/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/manager/test/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/manager/test/test_manager.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/setup.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/superviseprocess.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/core/test/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/icons.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/messagebox.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/test/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/gui/test/test_process_manager.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/resources/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/resources/gui/icons/advancement.png +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/resources/gui/icons/advancement.svg +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/resources/gui/icons/magnifying_glass.png +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/resources/gui/icons/magnifying_glass.svg +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/setup.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/test/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/utils/__init__.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc → home/payno/.local/share/virtualenvs/tomwer_venv}/lib/python3.7/site-packages/processview/utils/singleton.py +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview-0.2.0-py3.7.egg-info → home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview-0.2.2-py3.7.egg-info}/dependency_links.txt +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview-0.2.0-py3.7.egg-info → home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview-0.2.2-py3.7.egg-info}/not-zip-safe +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview-0.2.0-py3.7.egg-info → home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview-0.2.2-py3.7.egg-info}/requires.txt +0 -0
- {users/payno/.local/share/virtualenvs/tomwer_venc/lib/python3.7/site-packages/processview-0.2.0-py3.7.egg-info → home/payno/.local/share/virtualenvs/tomwer_venv/lib/python3.7/site-packages/processview-0.2.2-py3.7.egg-info}/top_level.txt +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# /*##########################################################################
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2016-2017 European Synchrotron Radiation Facility
|
|
5
|
+
#
|
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
# of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
# furnished to do so, subject to the following conditions:
|
|
12
|
+
#
|
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
|
14
|
+
# all copies or substantial portions of the Software.
|
|
15
|
+
#
|
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
# THE SOFTWARE.
|
|
23
|
+
#
|
|
24
|
+
# ###########################################################################*/
|
|
25
|
+
"""helper functions to notify state change for example"""
|
|
26
|
+
|
|
27
|
+
__authors__ = ["H. Payno"]
|
|
28
|
+
__license__ = "MIT"
|
|
29
|
+
__date__ = "13/04/2021"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
from processview.core.manager import ProcessManager
|
|
33
|
+
from processview.core.manager import DatasetState
|
|
34
|
+
from processview.core.superviseprocess import SuperviseProcess
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def notify_skip(process, dataset, details=None):
|
|
38
|
+
ProcessManager().notify_dataset_state(
|
|
39
|
+
dataset=dataset, process=process, state=DatasetState.SKIPPED, details=details
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def notify_pending(process, dataset, details=None):
|
|
44
|
+
ProcessManager().notify_dataset_state(
|
|
45
|
+
dataset=dataset, process=process, state=DatasetState.PENDING, details=details
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def notify_succeed(process, dataset, details=None):
|
|
50
|
+
ProcessManager().notify_dataset_state(
|
|
51
|
+
dataset=dataset, process=process, state=DatasetState.SUCCEED, details=details
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def notify_failed(process, dataset, details=None):
|
|
56
|
+
ProcessManager().notify_dataset_state(
|
|
57
|
+
dataset=dataset, process=process, state=DatasetState.FAILED, details=details
|
|
58
|
+
)
|
|
59
|
+
|
|
Binary file
|
|
@@ -69,6 +69,8 @@ class ProcessManager:
|
|
|
69
69
|
"""list of callback to trigger when an update is generated"""
|
|
70
70
|
self._newProcessCallback = set()
|
|
71
71
|
"""list of callback to trigger when a process is added"""
|
|
72
|
+
self._processRemovedCallback = set()
|
|
73
|
+
"""list of callback to trigger when a process is removed"""
|
|
72
74
|
self.lock = threading.Lock()
|
|
73
75
|
|
|
74
76
|
def met(self, process, dataset) -> bool:
|
|
@@ -132,6 +134,9 @@ class ProcessManager:
|
|
|
132
134
|
if process.process_id in self._processes and process.is_master_process:
|
|
133
135
|
del self._processes[process.process_id]
|
|
134
136
|
|
|
137
|
+
for callback in self._processRemovedCallback:
|
|
138
|
+
callback()
|
|
139
|
+
|
|
135
140
|
def get_processes(self) -> tuple:
|
|
136
141
|
"""
|
|
137
142
|
|
|
@@ -313,6 +318,13 @@ class ProcessManager:
|
|
|
313
318
|
if callback in self._newProcessCallback:
|
|
314
319
|
self._newProcessCallback.remove(callback)
|
|
315
320
|
|
|
321
|
+
def add_process_removed_callback(self, callback):
|
|
322
|
+
self._processRemovedCallback.add(callback)
|
|
323
|
+
|
|
324
|
+
def remove_process_removed_callback(self, callback):
|
|
325
|
+
if callback in self._processRemovedCallback:
|
|
326
|
+
self._processRemovedCallback.remove(callback)
|
|
327
|
+
|
|
316
328
|
def clear(self):
|
|
317
329
|
"""
|
|
318
330
|
clear registered processes and dataset states
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -159,6 +159,7 @@ class ProcessManagerWidget(qt.QWidget):
|
|
|
159
159
|
self.filterWidget.filterWidget.sigProcessPatternEditingFinished.connect(
|
|
160
160
|
self._filterUpdated
|
|
161
161
|
)
|
|
162
|
+
self._manager.sigProcessUnregistered.connect(self._updateProcesses)
|
|
162
163
|
# update to fit existing processes / datasets
|
|
163
164
|
self._updateProcesses()
|
|
164
165
|
self._updateDatasetStates()
|
|
@@ -472,6 +473,9 @@ class ProcessManager(qt.QObject):
|
|
|
472
473
|
sigNewProcessRegistered = qt.Signal()
|
|
473
474
|
"""Signal emitted when a new process is registered"""
|
|
474
475
|
|
|
476
|
+
sigProcessUnregistered = qt.Signal()
|
|
477
|
+
"""Signal emitted when a process is unregistered"""
|
|
478
|
+
|
|
475
479
|
def __init__(self):
|
|
476
480
|
qt.QObject.__init__(self)
|
|
477
481
|
self.manager = _ProcessManager()
|
|
@@ -480,6 +484,7 @@ class ProcessManager(qt.QObject):
|
|
|
480
484
|
# TODO: add / remove callback would be simpler
|
|
481
485
|
self.manager.add_update_callback(self.updated)
|
|
482
486
|
self.manager.add_new_process_callback(self.processAdded)
|
|
487
|
+
self.manager.add_process_removed_callback(self.processRemoved)
|
|
483
488
|
|
|
484
489
|
def updated(self):
|
|
485
490
|
self.sigUpdated.emit()
|
|
@@ -487,6 +492,9 @@ class ProcessManager(qt.QObject):
|
|
|
487
492
|
def processAdded(self):
|
|
488
493
|
self.sigNewProcessRegistered.emit()
|
|
489
494
|
|
|
495
|
+
def processRemoved(self):
|
|
496
|
+
self.sigProcessUnregistered.emit()
|
|
497
|
+
|
|
490
498
|
def processNameChanged(self, process):
|
|
491
499
|
self.sigProcessNameChanged.emit(process)
|
|
492
500
|
|
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
LICENSE
|
|
1
2
|
README.md
|
|
2
3
|
setup.py
|
|
3
4
|
processview/__init__.py
|
|
@@ -11,6 +12,7 @@ processview.egg-info/requires.txt
|
|
|
11
12
|
processview.egg-info/top_level.txt
|
|
12
13
|
processview/core/__init__.py
|
|
13
14
|
processview/core/dataset.py
|
|
15
|
+
processview/core/helpers.py
|
|
14
16
|
processview/core/setup.py
|
|
15
17
|
processview/core/superviseprocess.py
|
|
16
18
|
processview/core/manager/__init__.py
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|