Commit 08a2363d authored by Aleksandra Mnich's avatar Aleksandra Mnich
Browse files

[SIGMON-356] running notebooks fixed

parent 0ce797d4
Pipeline #4155057 failed with stages
in 7 minutes and 43 seconds
......@@ -5,33 +5,36 @@ from typing import List, Tuple, Union
class FgcBase(ABC):
""" Base class for the FGC event"""
def get_all_circuits(self) -> Union[str, Tuple[str, ...]]:
def get_all_circuits(self) -> List[str]:
def get_all_timestamps(self) -> Union[int, Tuple[int, ...]]:
def get_all_timestamps(self) -> List[int]:
class Fgc(FgcBase):
""" Represents an FGC event associated with a single circuit."""
circuit_name: str
timestamp: int
def get_all_circuits(self) -> str:
return self.circuit_name
def get_all_circuits(self) -> List[str]:
return [self.circuit_name]
def get_all_timestamps(self) -> int:
return self.timestamp
def get_all_timestamps(self) -> List[int]:
return [self.timestamp]
class FgcCompound(FgcBase, ABC):
def get_all_circuits(self) -> Tuple[str, ...]:
return tuple(pm.circuit_name for pm in self.get_all_fgcs())
""" Represents an FGC event associated with many correlated circuits."""
def get_all_circuits(self) -> List[str]:
return [pm.circuit_name for pm in self.get_all_fgcs()]
def get_all_timestamps(self) -> Tuple[int, ...]:
return tuple(pm.timestamp for pm in self.get_all_fgcs())
def get_all_timestamps(self) -> List[int]:
return [pm.timestamp for pm in self.get_all_fgcs()]
def get_all_fgcs(self) -> List[Fgc]:
......@@ -40,6 +43,7 @@ class FgcCompound(FgcBase, ABC):
class RqFgc(FgcCompound):
"""RQ specific FGC event."""
rqd: Fgc
rqf: Fgc
......@@ -49,6 +53,7 @@ class RqFgc(FgcCompound):
class RcdoFgc(FgcCompound):
"""RCDO specific FGC event."""
rcd: Fgc
rco: Fgc
......@@ -58,6 +63,7 @@ class RcdoFgc(FgcCompound):
class RcbxhvFgc(FgcCompound):
"""RCBXHV specific FGC event."""
rcbxh: Fgc
rcbxv: Fgc
......@@ -83,10 +83,8 @@ class FgcPmEventSelectBaseModule(BaseModule):
# Fix an occasional issue with widget updates
fgc_pm_event = self._get_fgc_pm_event()
pm_event_text = self._get_description(fgc_pm_event)
circuit_name = fgc_pm_event.get_all_circuits()
circuit_name = circuit_name[0] if isinstance(circuit_name, tuple) else circuit_name
timestamp = fgc_pm_event.get_all_timestamps()
timestamp = timestamp[0] if isinstance(timestamp, tuple) else timestamp
circuit_name = fgc_pm_event.get_all_circuits()[0]
timestamp = fgc_pm_event.get_all_timestamps()[0]
if self.circuit_type == '600A':
print_ee_info_600A(circuit_name, self.circuit_type, timestamp)
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