Skip to content
Snippets Groups Projects
Commit d93cb4c8 authored by Henri Payno's avatar Henri Payno
Browse files

remove tomwer/web module. graylog is not used anymore and in the future we...

remove tomwer/web module. graylog is not used anymore and in the future we will go more for 'generic ewoks' stuff. So let's clean a bit.

clsoe #854
parent 21a9fb31
No related branches found
No related tags found
No related merge requests found
Showing
with 28 additions and 131 deletions
...@@ -27,11 +27,10 @@ __authors__ = ["C. Nemoz", "H. Payno"] ...@@ -27,11 +27,10 @@ __authors__ = ["C. Nemoz", "H. Payno"]
__license__ = "MIT" __license__ = "MIT"
__date__ = "01/12/2016" __date__ = "01/12/2016"
from orangewidget import widget, gui from orangewidget import gui
from silx.gui import qt from silx.gui import qt
from tomwer.gui.control.datalist import GenericScanListDialog from tomwer.gui.control.datalist import GenericScanListDialog
from tomwer.core.scan.hdf5scan import HDF5TomoScan from tomwer.core.scan.hdf5scan import HDF5TomoScan
from tomwer.web.client import OWClient
from tomwer.core.scan.scanbase import TomwerScanBase from tomwer.core.scan.scanbase import TomwerScanBase
import tomwer.core.process.control.scanlist import tomwer.core.process.control.scanlist
from orangewidget.settings import Setting from orangewidget.settings import Setting
...@@ -41,7 +40,7 @@ import logging ...@@ -41,7 +40,7 @@ import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class DataListOW(OWBaseWidget, OWClient, openclass=True): class DataListOW(OWBaseWidget, openclass=True):
name = "scan list" name = "scan list"
id = "orange.widgets.tomwer.scanlist" id = "orange.widgets.tomwer.scanlist"
description = "List path to reconstructions/scans. Those path will be send to the next box once validated." description = "List path to reconstructions/scans. Those path will be send to the next box once validated."
...@@ -72,8 +71,7 @@ class DataListOW(OWBaseWidget, OWClient, openclass=True): ...@@ -72,8 +71,7 @@ class DataListOW(OWBaseWidget, OWClient, openclass=True):
:param parent: the parent widget :param parent: the parent widget
""" """
widget.OWBaseWidget.__init__(self, parent) super().__init__(parent)
OWClient.__init__(self)
self.widget = GenericScanListDialog(parent=self) self.widget = GenericScanListDialog(parent=self)
self.widget.sigUpdated.connect(self._updateSettings) self.widget.sigUpdated.connect(self._updateSettings)
self._loadSettings() self._loadSettings()
......
...@@ -30,7 +30,6 @@ __date__ = "25/05/2018" ...@@ -30,7 +30,6 @@ __date__ = "25/05/2018"
from silx.gui import qt from silx.gui import qt
from orangewidget import gui from orangewidget import gui
from orangewidget.widget import Output, Input, OWBaseWidget from orangewidget.widget import Output, Input, OWBaseWidget
from tomwer.web.client import OWClient
from tomwer.core.scan.hdf5scan import HDF5TomoScan from tomwer.core.scan.hdf5scan import HDF5TomoScan
from tomwer.gui.control.scanselectorwidget import ScanSelectorWidget from tomwer.gui.control.scanselectorwidget import ScanSelectorWidget
from tomwer.core.scan.scanbase import TomwerScanBase from tomwer.core.scan.scanbase import TomwerScanBase
...@@ -41,7 +40,7 @@ import logging ...@@ -41,7 +40,7 @@ import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class DataSelectorOW(OWBaseWidget, OWClient, openclass=True): class DataSelectorOW(OWBaseWidget, openclass=True):
name = "scan selector" name = "scan selector"
id = "orange.widgets.tomwer.scanselector" id = "orange.widgets.tomwer.scanselector"
description = ( description = (
...@@ -69,8 +68,7 @@ class DataSelectorOW(OWBaseWidget, OWClient, openclass=True): ...@@ -69,8 +68,7 @@ class DataSelectorOW(OWBaseWidget, OWClient, openclass=True):
def __init__(self, parent=None): def __init__(self, parent=None):
""" """ """ """
OWBaseWidget.__init__(self, parent) super().__init__(parent)
OWClient.__init__(self)
self.widget = ScanSelectorWidget(parent=self) self.widget = ScanSelectorWidget(parent=self)
self._loadSettings() self._loadSettings()
......
...@@ -36,7 +36,6 @@ from silx.gui import qt ...@@ -36,7 +36,6 @@ from silx.gui import qt
import tomwer.core.process.control.scantransfer import tomwer.core.process.control.scantransfer
from tomwer.core.process.control.scantransfer import ScanTransfer from tomwer.core.process.control.scantransfer import ScanTransfer
from orangecontrib.tomwer.orange.settings import CallbackSettingsHandler from orangecontrib.tomwer.orange.settings import CallbackSettingsHandler
from tomwer.web.client import OWClient
from tomwer.gui.control.datatransfert import DataTransfertSelector from tomwer.gui.control.datatransfert import DataTransfertSelector
from tomwer.core.scan.scanbase import TomwerScanBase from tomwer.core.scan.scanbase import TomwerScanBase
from processview.core.manager import ProcessManager, DatasetState from processview.core.manager import ProcessManager, DatasetState
...@@ -47,7 +46,7 @@ import functools ...@@ -47,7 +46,7 @@ import functools
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class DataTransfertOW(SuperviseOW, OWClient): class DataTransfertOW(SuperviseOW):
""" """
A simple widget managing the copy of an incoming folder to an other one A simple widget managing the copy of an incoming folder to an other one
...@@ -91,8 +90,7 @@ class DataTransfertOW(SuperviseOW, OWClient): ...@@ -91,8 +90,7 @@ class DataTransfertOW(SuperviseOW, OWClient):
data = Output(name="data", type=TomwerScanBase) data = Output(name="data", type=TomwerScanBase)
def __init__(self, parent=None): def __init__(self, parent=None):
SuperviseOW.__init__(self, parent) super().__init__(parent)
OWClient.__init__(self)
self._destDir = None self._destDir = None
self._forceSync = False self._forceSync = False
......
...@@ -35,16 +35,13 @@ from orangewidget.settings import Setting ...@@ -35,16 +35,13 @@ from orangewidget.settings import Setting
from orangewidget.widget import Output from orangewidget.widget import Output
from tomwer.core.scan.scanbase import TomwerScanBase from tomwer.core.scan.scanbase import TomwerScanBase
from tomwer.gui.control.datawatcher import DataWatcherWidget from tomwer.gui.control.datawatcher import DataWatcherWidget
from tomwer.web.client import OWClient
import functools import functools
import logging import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class DataWatcherOW( class DataWatcherOW(widget.OWBaseWidget, WidgetLongProcessing, openclass=True):
widget.OWBaseWidget, OWClient, WidgetLongProcessing, openclass=True
):
""" """
This widget is used to observe a selected folder and his sub-folders to This widget is used to observe a selected folder and his sub-folders to
detect if they are containing valid-finished acquisitions. detect if they are containing valid-finished acquisitions.
...@@ -95,7 +92,6 @@ class DataWatcherOW( ...@@ -95,7 +92,6 @@ class DataWatcherOW(
:param parent: the parent widget :param parent: the parent widget
""" """
widget.OWBaseWidget.__init__(self, parent) widget.OWBaseWidget.__init__(self, parent)
OWClient.__init__(self)
WidgetLongProcessing.__init__(self) WidgetLongProcessing.__init__(self)
self._widget = DataWatcherWidget(parent=self) self._widget = DataWatcherWidget(parent=self)
self._widget.setFolderObserved(self.folderObserved) self._widget.setFolderObserved(self.folderObserved)
......
...@@ -33,7 +33,6 @@ from orangewidget import gui ...@@ -33,7 +33,6 @@ from orangewidget import gui
import tomwer.core.process.conditions.filters import tomwer.core.process.conditions.filters
from orangecontrib.tomwer.orange.managedprocess import SuperviseOW from orangecontrib.tomwer.orange.managedprocess import SuperviseOW
from orangewidget.widget import Input, Output from orangewidget.widget import Input, Output
from tomwer.web.client import OWClient
from tomwer.gui.conditions.filter import FileNameFilterWidget from tomwer.gui.conditions.filter import FileNameFilterWidget
from tomwer.core.scan.scanbase import TomwerScanBase from tomwer.core.scan.scanbase import TomwerScanBase
from processview.core.manager import DatasetState from processview.core.manager import DatasetState
...@@ -44,7 +43,7 @@ import logging ...@@ -44,7 +43,7 @@ import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class NameFilterOW(SuperviseOW, OWClient): class NameFilterOW(SuperviseOW):
name = "scan filter" name = "scan filter"
id = "orange.widgets.tomwer.filterow" id = "orange.widgets.tomwer.filterow"
description = ( description = (
...@@ -69,8 +68,7 @@ class NameFilterOW(SuperviseOW, OWClient): ...@@ -69,8 +68,7 @@ class NameFilterOW(SuperviseOW, OWClient):
def __init__(self, parent=None): def __init__(self, parent=None):
""" """ """ """
SuperviseOW.__init__(self, parent) super().__init__(parent)
OWClient.__init__(self)
self.widget = FileNameFilterWidget(parent=self) self.widget = FileNameFilterWidget(parent=self)
self.widget.setContentsMargins(0, 0, 0, 0) self.widget.setContentsMargins(0, 0, 0, 0)
......
...@@ -27,13 +27,12 @@ __authors__ = ["C. Nemoz", "H. Payno"] ...@@ -27,13 +27,12 @@ __authors__ = ["C. Nemoz", "H. Payno"]
__license__ = "MIT" __license__ = "MIT"
__date__ = "25/08/2022" __date__ = "25/08/2022"
from orangewidget import widget, gui from orangewidget import gui
from tomwer.core.scan.scanbase import TomwerScanBase from tomwer.core.scan.scanbase import TomwerScanBase
from tomwer.core.scan.scanfactory import ScanFactory from tomwer.core.scan.scanfactory import ScanFactory
from tomwer.core.tomwer_object import TomwerObject from tomwer.core.tomwer_object import TomwerObject
from tomwer.core.volume.volumefactory import VolumeFactory from tomwer.core.volume.volumefactory import VolumeFactory
from tomwer.gui.control.singletomoobj import SingleTomoObj from tomwer.gui.control.singletomoobj import SingleTomoObj
from tomwer.web.client import OWClient
from orangewidget.settings import Setting from orangewidget.settings import Setting
from orangewidget.widget import Output, Input, OWBaseWidget from orangewidget.widget import Output, Input, OWBaseWidget
import tomoscan.esrf.scan.utils import tomoscan.esrf.scan.utils
...@@ -43,7 +42,7 @@ import logging ...@@ -43,7 +42,7 @@ import logging
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
class SingleTomoObjOW(OWBaseWidget, OWClient, openclass=True): class SingleTomoObjOW(OWBaseWidget, openclass=True):
name = "single tomo obj" name = "single tomo obj"
id = "orange.widgets.tomwer.control.SingleScanOW.SingleScanOW" id = "orange.widgets.tomwer.control.SingleScanOW.SingleScanOW"
description = "Definition of a single dataset" description = "Definition of a single dataset"
...@@ -79,8 +78,7 @@ class SingleTomoObjOW(OWBaseWidget, OWClient, openclass=True): ...@@ -79,8 +78,7 @@ class SingleTomoObjOW(OWBaseWidget, OWClient, openclass=True):
) )
def __init__(self, parent=None): def __init__(self, parent=None):
widget.OWBaseWidget.__init__(self, parent) super().__init__(parent)
OWClient.__init__(self)
self._latest_received_scan = None self._latest_received_scan = None
# small work around to keep in scan processing cache and avoid recomputing it if not necessary # small work around to keep in scan processing cache and avoid recomputing it if not necessary
self.widget = SingleTomoObj(parent=self) self.widget = SingleTomoObj(parent=self)
......
...@@ -33,7 +33,6 @@ from orangewidget import gui ...@@ -33,7 +33,6 @@ from orangewidget import gui
from orangewidget.widget import Output, Input, OWBaseWidget from orangewidget.widget import Output, Input, OWBaseWidget
from tomoscan.serie import Serie from tomoscan.serie import Serie
from tomwer.core.tomwer_object import TomwerObject from tomwer.core.tomwer_object import TomwerObject
from tomwer.web.client import OWClient
import tomwer.core.process.control.tomoobjserie import tomwer.core.process.control.tomoobjserie
from tomwer.gui.control.serie.seriecreator import SerieWidgetDialog from tomwer.gui.control.serie.seriecreator import SerieWidgetDialog
import logging import logging
...@@ -41,7 +40,7 @@ import logging ...@@ -41,7 +40,7 @@ import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class TomoObjSerieOW(OWBaseWidget, OWClient, openclass=True): class TomoObjSerieOW(OWBaseWidget, openclass=True):
name = "serie of objects" name = "serie of objects"
id = "orange.widgets.tomwer.tomoobjserieow" id = "orange.widgets.tomwer.tomoobjserieow"
description = "Allow user define a serie of object that will be defined as a Serie (grouped together and can be used within a purpose like stiching)" description = "Allow user define a serie of object that will be defined as a Serie (grouped together and can be used within a purpose like stiching)"
...@@ -64,8 +63,7 @@ class TomoObjSerieOW(OWBaseWidget, OWClient, openclass=True): ...@@ -64,8 +63,7 @@ class TomoObjSerieOW(OWBaseWidget, OWClient, openclass=True):
def __init__(self, parent=None): def __init__(self, parent=None):
""" """ """ """
OWBaseWidget.__init__(self, parent) super().__init__(parent)
OWClient.__init__(self)
layout = gui.vBox(self.mainArea, self.name).layout() layout = gui.vBox(self.mainArea, self.name).layout()
self._widget = SerieWidgetDialog(self) self._widget = SerieWidgetDialog(self)
......
...@@ -33,7 +33,6 @@ from silx.gui import qt ...@@ -33,7 +33,6 @@ from silx.gui import qt
from orangewidget import gui from orangewidget import gui
from orangewidget.widget import Output, Input, OWBaseWidget from orangewidget.widget import Output, Input, OWBaseWidget
from tomwer.core.volume.volumebase import TomwerVolumeBase from tomwer.core.volume.volumebase import TomwerVolumeBase
from tomwer.web.client import OWClient
from tomwer.core.scan.hdf5scan import HDF5TomoScan from tomwer.core.scan.hdf5scan import HDF5TomoScan
from tomwer.gui.control.volumeselectorwidget import VolumeSelectorWidget from tomwer.gui.control.volumeselectorwidget import VolumeSelectorWidget
from orangewidget.settings import Setting from orangewidget.settings import Setting
...@@ -43,7 +42,7 @@ import logging ...@@ -43,7 +42,7 @@ import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class VolumeSelectorOW(OWBaseWidget, OWClient, openclass=True): class VolumeSelectorOW(OWBaseWidget, openclass=True):
name = "volume selector" name = "volume selector"
id = "orange.widgets.tomwer.volumeselector" id = "orange.widgets.tomwer.volumeselector"
description = ( description = (
...@@ -73,8 +72,7 @@ class VolumeSelectorOW(OWBaseWidget, OWClient, openclass=True): ...@@ -73,8 +72,7 @@ class VolumeSelectorOW(OWBaseWidget, OWClient, openclass=True):
def __init__(self, parent=None): def __init__(self, parent=None):
""" """ """ """
OWBaseWidget.__init__(self, parent) super().__init__(parent)
OWClient.__init__(self)
self.widget = VolumeSelectorWidget(parent=self) self.widget = VolumeSelectorWidget(parent=self)
self._loadSettings() self._loadSettings()
......
...@@ -32,7 +32,6 @@ from silx.gui import qt ...@@ -32,7 +32,6 @@ from silx.gui import qt
from orangewidget import gui from orangewidget import gui
import tomwer.core.process.control.volumesymlink import tomwer.core.process.control.volumesymlink
from tomwer.web.client import OWClient
from orangewidget.settings import Setting from orangewidget.settings import Setting
from orangewidget.widget import Output, Input from orangewidget.widget import Output, Input
from tomwer.core.scan.scanbase import TomwerScanBase from tomwer.core.scan.scanbase import TomwerScanBase
...@@ -47,7 +46,7 @@ import logging ...@@ -47,7 +46,7 @@ import logging
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
class VolumeSymLinkOW(SuperviseOW, OWClient): class VolumeSymLinkOW(SuperviseOW):
""" """
link volume reconstructed at proposal file if possible else under link volume reconstructed at proposal file if possible else under
the given folder the given folder
...@@ -86,8 +85,7 @@ class VolumeSymLinkOW(SuperviseOW, OWClient): ...@@ -86,8 +85,7 @@ class VolumeSymLinkOW(SuperviseOW, OWClient):
data = Output(name="data", type=TomwerScanBase, doc="one scan to be process") data = Output(name="data", type=TomwerScanBase, doc="one scan to be process")
def __init__(self, parent=None): def __init__(self, parent=None):
SuperviseOW.__init__(self, parent) super().__init__(parent)
OWClient.__init__(self)
self._mainWidget = _OutputDir(parent=self) self._mainWidget = _OutputDir(parent=self)
layout = gui.vBox(self.mainArea, self.name).layout() layout = gui.vBox(self.mainArea, self.name).layout()
layout.addWidget(self._mainWidget) layout.addWidget(self._mainWidget)
......
...@@ -38,7 +38,6 @@ from orangewidget.widget import Input, Output ...@@ -38,7 +38,6 @@ from orangewidget.widget import Input, Output
from tomwer.core.scan.scanbase import TomwerScanBase from tomwer.core.scan.scanbase import TomwerScanBase
from tomwer.gui.reconstruction.darkref.darkrefcopywidget import DarkRefAndCopyWidget from tomwer.gui.reconstruction.darkref.darkrefcopywidget import DarkRefAndCopyWidget
from tomwer.synctools.darkref import QDKRFRP from tomwer.synctools.darkref import QDKRFRP
from tomwer.web.client import OWClient
from tomwer.synctools.stacks.reconstruction.dkrefcopy import DarkRefCopyProcessStack from tomwer.synctools.stacks.reconstruction.dkrefcopy import DarkRefCopyProcessStack
from processview.core.manager import DatasetState from processview.core.manager import DatasetState
from processview.core.manager import ProcessManager from processview.core.manager import ProcessManager
...@@ -50,7 +49,7 @@ import copy ...@@ -50,7 +49,7 @@ import copy
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing): class DarkRefAndCopyOW(SuperviseOW, WidgetLongProcessing):
""" """
A simple widget managing the copy of an incoming folder to an other one A simple widget managing the copy of an incoming folder to an other one
...@@ -110,7 +109,6 @@ class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing): ...@@ -110,7 +109,6 @@ class DarkRefAndCopyOW(SuperviseOW, OWClient, WidgetLongProcessing):
:param QKRFRP reconsparams: reconstruction parameters :param QKRFRP reconsparams: reconstruction parameters
""" """
SuperviseOW.__init__(self, parent) SuperviseOW.__init__(self, parent)
OWClient.__init__(self)
WidgetLongProcessing.__init__(self) WidgetLongProcessing.__init__(self)
recons_params = reconsparams or QDKRFRP() recons_params = reconsparams or QDKRFRP()
self._processing_stack = DarkRefCopyProcessStack(process_id=self.process_id) self._processing_stack = DarkRefCopyProcessStack(process_id=self.process_id)
......
...@@ -70,7 +70,7 @@ class DataViewerOW(widget.OWBaseWidget, openclass=True): ...@@ -70,7 +70,7 @@ class DataViewerOW(widget.OWBaseWidget, openclass=True):
data = Input(name="data", type=TomwerScanBase) data = Input(name="data", type=TomwerScanBase)
def __init__(self, parent=None): def __init__(self, parent=None):
widget.OWBaseWidget.__init__(self, parent) super().__init__(parent)
self._layout = gui.vBox(self.mainArea, self.name).layout() self._layout = gui.vBox(self.mainArea, self.name).layout()
self.viewer = DataViewer(parent=self) self.viewer = DataViewer(parent=self)
self.viewer.setSizePolicy(qt.QSizePolicy.Expanding, qt.QSizePolicy.Expanding) self.viewer.setSizePolicy(qt.QSizePolicy.Expanding, qt.QSizePolicy.Expanding)
......
...@@ -30,7 +30,6 @@ __date__ = "19/03/2018" ...@@ -30,7 +30,6 @@ __date__ = "19/03/2018"
from silx.gui import qt from silx.gui import qt
from orangewidget import widget, gui from orangewidget import widget, gui
from orangewidget.widget import Input from orangewidget.widget import Input
from tomwer.web.client import OWClient
from tomwer.gui.samplemoved import SampleMovedWidget from tomwer.gui.samplemoved import SampleMovedWidget
from tomwer.core.scan.scanbase import TomwerScanBase from tomwer.core.scan.scanbase import TomwerScanBase
import tomwer.core.process.visualization.samplemoved import tomwer.core.process.visualization.samplemoved
...@@ -40,7 +39,7 @@ import logging ...@@ -40,7 +39,7 @@ import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class SampleMovedOW(widget.OWBaseWidget, OWClient, openclass=True): class SampleMovedOW(widget.OWBaseWidget, openclass=True):
""" """
Simple widget exposing two images side by side to see if a sample moved Simple widget exposing two images side by side to see if a sample moved
during the acquisition. during the acquisition.
...@@ -72,8 +71,7 @@ class SampleMovedOW(widget.OWBaseWidget, OWClient, openclass=True): ...@@ -72,8 +71,7 @@ class SampleMovedOW(widget.OWBaseWidget, OWClient, openclass=True):
data = Input(name="data", type=TomwerScanBase) data = Input(name="data", type=TomwerScanBase)
def __init__(self, parent=None): def __init__(self, parent=None):
widget.OWBaseWidget.__init__(self, parent) super().__init__(parent)
OWClient.__init__(self)
layout = gui.vBox(self.mainArea, self.name).layout() layout = gui.vBox(self.mainArea, self.name).layout()
......
...@@ -39,7 +39,6 @@ import threading ...@@ -39,7 +39,6 @@ import threading
from collections import OrderedDict from collections import OrderedDict
from typing import Optional from typing import Optional
from tomwer.core.process.control.datawatcher import status as datawatcherstatus from tomwer.core.process.control.datawatcher import status as datawatcherstatus
from tomwer.web.client import OWClient
from .edfdwprocess import ( from .edfdwprocess import (
_DataWatcherProcessParseInfo, _DataWatcherProcessParseInfo,
_DataWatcherProcessUserFilePattern, _DataWatcherProcessUserFilePattern,
...@@ -56,7 +55,7 @@ import h5py ...@@ -56,7 +55,7 @@ import h5py
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class _DataWatcherStaticObserverMixIn(OWClient): class _DataWatcherStaticObserverMixIn:
def __init__( def __init__(
self, self,
scanID, scanID,
...@@ -75,7 +74,6 @@ class _DataWatcherStaticObserverMixIn(OWClient): ...@@ -75,7 +74,6 @@ class _DataWatcherStaticObserverMixIn(OWClient):
:param Union[str,None] patternObs: :param Union[str,None] patternObs:
:param observationRegistry: what registry the observation should update :param observationRegistry: what registry the observation should update
""" """
OWClient.__init__(self)
self.obsMethod = obsMethod self.obsMethod = obsMethod
self.srcPattern = srcPattern self.srcPattern = srcPattern
self.destPattern = destPattern self.destPattern = destPattern
...@@ -271,7 +269,7 @@ class _DataWatcherStaticObserver(_DataWatcherStaticObserverMixIn, threading.Thre ...@@ -271,7 +269,7 @@ class _DataWatcherStaticObserver(_DataWatcherStaticObserverMixIn, threading.Thre
) )
class _DataWatcherObserver_MixIn(OWClient): class _DataWatcherObserver_MixIn:
"""Thread launching the data watcher process (observation of acquisition) """Thread launching the data watcher process (observation of acquisition)
:param str headDir: the root dir to make to fin dacquisition :param str headDir: the root dir to make to fin dacquisition
...@@ -302,7 +300,6 @@ class _DataWatcherObserver_MixIn(OWClient): ...@@ -302,7 +300,6 @@ class _DataWatcherObserver_MixIn(OWClient):
ignoredFolders=None, ignoredFolders=None,
file_name_pattern=None, file_name_pattern=None,
): ):
OWClient.__init__(self)
self.observations = observationClass() self.observations = observationClass()
self.observations.ignoredFolders = ( self.observations.ignoredFolders = (
[] if ignoredFolders is None else ignoredFolders [] if ignoredFolders is None else ignoredFolders
......
...@@ -34,7 +34,6 @@ __date__ = "14/10/2016" ...@@ -34,7 +34,6 @@ __date__ = "14/10/2016"
from glob import glob from glob import glob
import subprocess import subprocess
from tomwer.core.signal import Signal from tomwer.core.signal import Signal
from tomwer.web.client import OWClient
import logging import logging
from tomwer.core.scan.edfscan import EDFTomoScan from tomwer.core.scan.edfscan import EDFTomoScan
from .status import OBSERVATION_STATUS from .status import OBSERVATION_STATUS
...@@ -56,7 +55,7 @@ Useful tools ...@@ -56,7 +55,7 @@ Useful tools
""" """
class _DataWatcherProcess(OWClient): class _DataWatcherProcess:
""" """
DataWatcherProcess is the process managing the observation of acquisition. DataWatcherProcess is the process managing the observation of acquisition.
Since we want to loop infinitly on a root folder we have to ignore the Since we want to loop infinitly on a root folder we have to ignore the
...@@ -106,7 +105,7 @@ class _DataWatcherProcess(OWClient): ...@@ -106,7 +105,7 @@ class _DataWatcherProcess(OWClient):
INITIAL_STATUS = "not processing" INITIAL_STATUS = "not processing"
def __init__(self, dataDir, srcPattern=None, destPattern=None): def __init__(self, dataDir, srcPattern=None, destPattern=None):
super(_DataWatcherProcess, self).__init__() super().__init__()
self.RootDir = os.path.abspath(dataDir) self.RootDir = os.path.abspath(dataDir)
self.parsing_dir = os.path.abspath(dataDir) self.parsing_dir = os.path.abspath(dataDir)
self.oldest = 0 self.oldest = 0
......
...@@ -38,13 +38,12 @@ from processview.core.superviseprocess import SuperviseProcess ...@@ -38,13 +38,12 @@ from processview.core.superviseprocess import SuperviseProcess
import copy import copy
from tomwer.core.process.reconstruction.lamino.tofu import LaminoReconstruction from tomwer.core.process.reconstruction.lamino.tofu import LaminoReconstruction
from tomwer.core.utils.Singleton import singleton from tomwer.core.utils.Singleton import singleton
from tomwer.web.client import OWClient
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@singleton @singleton
class LaminoReconstructionStack(qt.QObject, Queue, OWClient): class LaminoReconstructionStack(qt.QObject, Queue):
""" """
Manage a stack of lamino (tofu) reconstruction Manage a stack of lamino (tofu) reconstruction
""" """
...@@ -61,7 +60,6 @@ class LaminoReconstructionStack(qt.QObject, Queue, OWClient): ...@@ -61,7 +60,6 @@ class LaminoReconstructionStack(qt.QObject, Queue, OWClient):
def __init__(self, process_id=None): def __init__(self, process_id=None):
qt.QObject.__init__(self) qt.QObject.__init__(self)
Queue.__init__(self) Queue.__init__(self)
OWClient.__init__(self)
self.process_id = process_id self.process_id = process_id
self.reconsThread = _LaminoReconsThread(process_id=process_id) self.reconsThread = _LaminoReconsThread(process_id=process_id)
self.reconsThread.sigThReconsFinished.connect(self._dealWithFinishedRecons) self.reconsThread.sigThReconsFinished.connect(self._dealWithFinishedRecons)
......
# coding: utf-8
# /*##########################################################################
# Copyright (C) 2016 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
#############################################################################*/
"""Module containing process relative to the web (like classes used to link
with graylog)
"""
__authors__ = ["H.Payno"]
__license__ = "MIT"
__date__ = "15/05/2017"
# coding: utf-8
# /*##########################################################################
# Copyright (C) 2016 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
#############################################################################*/
"""module defining functions and class to communicate a status to the
orange-server.
The orange-server is used to display the advancement of the workflow.
"""
__authors__ = ["H.Payno"]
__license__ = "MIT"
__date__ = "28/04/2017"
import logging
_logger = logging.getLogger(__name__)
class OWClient(object):
"""Orange widget Client can emit information about his advancement"""
WORKFLOW_INFO = "workflow" # general information about a workflow
SCAN_INFO = "scan" # information focus on a scan
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment