Commit 9bbcd359 authored by payno's avatar payno
Browse files

move imports from esrftaskXXX to ewoksXXX

parent 15dcce9b
from esrftaskgraph import Task
from ewokscore.task import Task
class IgnoreTask(Task):
......
......@@ -34,7 +34,7 @@ from est.core.types import XASObject
from ..utils import extract_properties_from_dict
import logging
from collections import namedtuple
from esrftaskgraph.task import Task
from ewokscore.task import Task
from typing import Iterable
_logger = logging.getLogger(__name__)
......
......@@ -47,7 +47,6 @@ from .dim import Dim
from .spectra import Spectra
from est.settings import DEFAULT_READ_TIMEOUT
from est.thirdparty.silx.hdf5file import get_data, HDF5File
from esrftaskgraph import Variable
try:
import larch
......
......@@ -32,7 +32,7 @@ import functools
import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from silx.gui import qt
......@@ -142,8 +142,8 @@ class AutobkWindow(qt.QMainWindow):
class AutobkOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.larch.autobk.Larch_autobk,
OWEwoksWidget,
ewokstaskclass=est.core.process.larch.autobk.Larch_autobk,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -32,7 +32,7 @@ import functools
import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from silx.gui import qt
......@@ -115,8 +115,8 @@ class MbackWindow(qt.QMainWindow):
class MbackOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.larch.mback.Larch_mback,
OWEwoksWidget,
ewokstaskclass=est.core.process.larch.mback.Larch_mback,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -32,7 +32,7 @@ import functools
import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from silx.gui import qt
......@@ -115,8 +115,8 @@ class Mback_normWindow(qt.QMainWindow):
class Mback_normOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.larch.mback_norm.Larch_mback_norm,
OWEwoksWidget,
ewokstaskclass=est.core.process.larch.mback_norm.Larch_mback_norm,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -32,7 +32,7 @@ import functools
import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from silx.gui import qt
......@@ -129,8 +129,8 @@ class _PreEdgeWindow(qt.QMainWindow):
class PreEdgeOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.larch.pre_edge.Larch_pre_edge,
OWEwoksWidget,
ewokstaskclass=est.core.process.larch.pre_edge.Larch_pre_edge,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -32,7 +32,7 @@ import functools
import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from silx.gui import qt
......@@ -151,8 +151,8 @@ class XFTFWindow(qt.QMainWindow):
class XFTFOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.larch.xftf.Larch_xftf,
OWEwoksWidget,
ewokstaskclass=est.core.process.larch.xftf.Larch_xftf,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -33,7 +33,7 @@ import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from est.core.types import XASObject
......@@ -119,8 +119,8 @@ class ExafsWindow(qt.QMainWindow):
class ExafsOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.pymca.exafs.PyMca_exafs,
OWEwoksWidget,
ewokstaskclass=est.core.process.pymca.exafs.PyMca_exafs,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -33,7 +33,7 @@ import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from PyMca5.PyMcaGui.physics.xas.XASFourierTransformParameters import (
......@@ -137,8 +137,8 @@ class FTWindow(qt.QMainWindow):
class FTOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.pymca.ft.PyMca_ft,
OWEwoksWidget,
ewokstaskclass=est.core.process.pymca.ft.PyMca_ft,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -32,7 +32,7 @@ import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from silx.gui import qt
......@@ -68,8 +68,8 @@ class KWeightWindow(qt.QMainWindow):
class KWeightOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.pymca.k_weight.PyMca_k_weight,
OWEwoksWidget,
ewokstaskclass=est.core.process.pymca.k_weight.PyMca_k_weight,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -33,7 +33,7 @@ import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from PyMca5.PyMcaGui.physics.xas.XASNormalizationParameters import (
......@@ -185,8 +185,8 @@ class NormalizationWindow(qt.QMainWindow):
class NormalizationOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.pymca.normalization.PyMca_normalization,
OWEwoksWidget,
ewokstaskclass=est.core.process.pymca.normalization.PyMca_normalization,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -30,7 +30,7 @@ __date__ = "02/10/2018"
import logging
from Orange.widgets import gui
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from orangecontrib.est.utils import Converter
......@@ -45,8 +45,8 @@ _logger = logging.getLogger(__file__)
class E0calculatorOW(
OWESRFWidget,
esrftaskclass=est.core.process.ignoreprocess.IgnoreE0Calculation,
OWEwoksWidget,
ewokstaskclass=est.core.process.ignoreprocess.IgnoreE0Calculation,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -31,7 +31,7 @@ import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from orangecontrib.est.utils import Converter
......@@ -45,8 +45,8 @@ _logger = logging.getLogger(__file__)
class EnergyRoiOW(
OWESRFWidget,
esrftaskclass=est.core.process.energyroi.EnergyROIProcess,
OWEwoksWidget,
ewokstaskclass=est.core.process.energyroi.EnergyROIProcess,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......@@ -155,7 +155,7 @@ class EnergyRoiOW(
except Exception as e:
_logger.error(e)
else:
OWESRFWidget.accept(self)
OWEwoksWidget.accept(self)
def updateProperties(self):
# as dim are named tuple we have to cast them to dict
......
......@@ -31,7 +31,7 @@ import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
from orangecontrib.est.progress import QProgress
from orangecontrib.est.process import ProcessRunnable
......@@ -49,8 +49,8 @@ _logger = logging.getLogger(__file__)
class NoiseOW(
_ProcessForOrangeMixIn,
OWESRFWidget,
esrftaskclass=est.core.process.noise.NoiseProcess,
OWEwoksWidget,
ewokstaskclass=est.core.process.noise.NoiseProcess,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -31,7 +31,7 @@ import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Input, Output
import Orange.data
from orangecontrib.est.utils import Converter
......@@ -45,8 +45,8 @@ _logger = logging.getLogger(__file__)
class RoiSelectionOW(
OWESRFWidget,
esrftaskclass=est.core.process.roi.ROIProcess,
OWEwoksWidget,
ewokstaskclass=est.core.process.roi.ROIProcess,
inputnamemap={"xas_obj": "toto"},
outputnamemap={"xas_obj": "toto"},
):
......@@ -140,7 +140,7 @@ class RoiSelectionOW(
except Exception as e:
_logger.error(e)
else:
OWESRFWidget.accept(self)
OWEwoksWidget.accept(self)
def updateProperties(self):
# as dim are named tuple we have to cast them to dict
......
......@@ -31,7 +31,7 @@ __date__ = "06/11/2019"
import logging
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.widget import Output
from silx.gui import qt
from silx.io.url import DataUrl
......@@ -48,8 +48,8 @@ _DEBUG = False
class XASInputOW(
OWESRFWidget,
esrftaskclass=est.core.process.io.ReadXasObject,
OWEwoksWidget,
ewokstaskclass=est.core.process.io.ReadXasObject,
inputnamemap={},
outputnamemap={"xas_obj": "toto"},
):
......
......@@ -29,12 +29,11 @@ __date__ = "06/11/2019"
from Orange.widgets import gui
from esrf2orange3.bindings import OWESRFWidget
from ewoksorange.bindings import OWEwoksWidget
from Orange.widgets.settings import Setting
from Orange.widgets.widget import Input
from silx.gui import qt
from est.core.types import XASObject
import est.core.io
import est.core.process.io
import logging
import h5py
......@@ -43,8 +42,8 @@ _logger = logging.getLogger(__file__)
class XASOutputOW(
OWESRFWidget,
esrftaskclass=est.core.process.io.DumpXasObject,
OWEwoksWidget,
ewokstaskclass=est.core.process.io.DumpXasObject,
inputnamemap={"xas_obj": "toto"},
outputnamemap={},
):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment