Skip to content
Snippets Groups Projects
Commit 5bdedbed authored by Anton Joubert's avatar Anton Joubert
Browse files

Merge branch 'SAR-65-remove-metaclass' into 'master'

SAR-65 remove metaclass (and 0.4.0 release)

See merge request ska-telescope/lmc-base-classes!12
parents 04b5fe26 49ff4d90
No related branches found
No related tags found
No related merge requests found
release=0.3.1 release=0.4.0
tag=lmcbaseclasses-0.3.1 tag=lmcbaseclasses-0.4.0
...@@ -25,7 +25,7 @@ The lmc-base-classe repository contains set of eight classes as mentioned in SKA ...@@ -25,7 +25,7 @@ The lmc-base-classe repository contains set of eight classes as mentioned in SKA
## Version History ## Version History
#### 0.4.0 (unreleased) #### 0.4.0
- Changed all `DevEnum` attributes to use Python `enum.IntEnum` classes. These can be imported from the - Changed all `DevEnum` attributes to use Python `enum.IntEnum` classes. These can be imported from the
new `control_model` namespace, e.g., `skabase.control_model import AdminMode`. new `control_model` namespace, e.g., `skabase.control_model import AdminMode`.
- The names of some of the enumeration labels were changed to better match the Control Systems Guidelines. - The names of some of the enumeration labels were changed to better match the Control Systems Guidelines.
...@@ -36,6 +36,7 @@ The lmc-base-classe repository contains set of eight classes as mentioned in SKA ...@@ -36,6 +36,7 @@ The lmc-base-classe repository contains set of eight classes as mentioned in SKA
- Changed `testMode` attribute from `str` to enumerated type: `TestMode`. - Changed `testMode` attribute from `str` to enumerated type: `TestMode`.
- Deprecated `TangoLoggingLevel`. Will be removed in version 0.5.0. Use `skabase.control_model.LoggingLevel` - Deprecated `TangoLoggingLevel`. Will be removed in version 0.5.0. Use `skabase.control_model.LoggingLevel`
instead. instead.
- Remove unnecessary usage of `DeviceMeta` class.
#### 0.3.1 #### 0.3.1
- Used `ska_logging` library instead of defining logging format and handlers locally. - Used `ska_logging` library instead of defining logging format and handlers locally.
...@@ -108,7 +109,7 @@ The base classes are installed as python package in the system. The intended usa ...@@ -108,7 +109,7 @@ The base classes are installed as python package in the system. The intended usa
``` ```
from skabase.SKABaseDevice.SKABaseDevice import SKABaseDevice from skabase.SKABaseDevice.SKABaseDevice import SKABaseDevice
class DishLeafNode(with_metaclass(DeviceMeta, SKABaseDevice)): class DishLeafNode(SKABaseDevice):
. .
. .
. .
......
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
# return MagicMock() # return MagicMock()
# #
# # Mock tango modules # # Mock tango modules
# MOCK_MODULES = ['PyTango', 'tango', 'tango.server', 'run', 'DeviceMeta', 'command', # MOCK_MODULES = ['PyTango', 'tango', 'tango.server', 'run', 'command',
# 'future', 'future.utils', 'logging', 'logging.handlers'] # 'future', 'future.utils', 'logging', 'logging.handlers']
# sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
autodoc_mock_imports = ['PyTango', 'tango', 'tango.server', 'run', 'DeviceMeta', 'command', autodoc_mock_imports = ['PyTango', 'tango', 'tango.server', 'run', 'command',
'future', 'future.utils', 'ska_logging.configuration'] 'future', 'future.utils', 'ska_logging.configuration']
import sys import sys
......
...@@ -14,11 +14,10 @@ attribute values and quality factors, and are separate from the "built-in" TANGO ...@@ -14,11 +14,10 @@ attribute values and quality factors, and are separate from the "built-in" TANGO
# Standard imports # Standard imports
import os import os
import sys import sys
from future.utils import with_metaclass
# Tango imports # Tango imports
from tango import DebugIt from tango import DebugIt
from tango.server import run, DeviceMeta, attribute, command, device_property from tango.server import run, attribute, command, device_property
# SKA specific imports # SKA specific imports
from skabase import release from skabase import release
...@@ -31,7 +30,7 @@ from SKABaseDevice import SKABaseDevice ...@@ -31,7 +30,7 @@ from SKABaseDevice import SKABaseDevice
__all__ = ["SKAAlarmHandler", "main"] __all__ = ["SKAAlarmHandler", "main"]
class SKAAlarmHandler(with_metaclass(DeviceMeta, SKABaseDevice)): class SKAAlarmHandler(SKABaseDevice):
""" """
A generic base device for Alarms for SKA. A generic base device for Alarms for SKA.
""" """
......
...@@ -18,12 +18,10 @@ import os ...@@ -18,12 +18,10 @@ import os
import sys import sys
import threading import threading
from future.utils import with_metaclass
# Tango imports # Tango imports
import tango import tango
from tango import DebugIt from tango import DebugIt
from tango.server import run, Device, DeviceMeta, attribute, command, device_property from tango.server import run, Device, attribute, command, device_property
from tango import AttrQuality, AttrWriteType from tango import AttrQuality, AttrWriteType
from tango import DeviceProxy, DevFailed from tango import DeviceProxy, DevFailed
...@@ -177,7 +175,7 @@ class LoggingUtils: ...@@ -177,7 +175,7 @@ class LoggingUtils:
__all__ = ["SKABaseDevice", "TangoLoggingLevel", "main"] __all__ = ["SKABaseDevice", "TangoLoggingLevel", "main"]
class SKABaseDevice(with_metaclass(DeviceMeta, Device)): class SKABaseDevice(Device):
""" """
A generic base device for SKA. A generic base device for SKA.
""" """
......
...@@ -12,11 +12,10 @@ Capability handling device ...@@ -12,11 +12,10 @@ Capability handling device
# Standard import # Standard import
import os import os
import sys import sys
from future.utils import with_metaclass
# Tango imports # Tango imports
from tango import DebugIt from tango import DebugIt
from tango.server import run, DeviceMeta, attribute, command, device_property from tango.server import run, attribute, command, device_property
# SKA specific imports # SKA specific imports
from skabase import release from skabase import release
...@@ -30,7 +29,7 @@ from SKAObsDevice import SKAObsDevice ...@@ -30,7 +29,7 @@ from SKAObsDevice import SKAObsDevice
__all__ = ["SKACapability", "main"] __all__ = ["SKACapability", "main"]
class SKACapability(with_metaclass(DeviceMeta, SKAObsDevice)): class SKACapability(SKAObsDevice):
""" """
A Subarray handling device. It exposes the instances of configured capabilities. A Subarray handling device. It exposes the instances of configured capabilities.
""" """
......
...@@ -13,11 +13,10 @@ and to store logs using Python logging. It configures the log levels of remote l ...@@ -13,11 +13,10 @@ and to store logs using Python logging. It configures the log levels of remote l
# Standard imports # Standard imports
import os import os
import sys import sys
from future.utils import with_metaclass
# Tango imports # Tango imports
from tango import DebugIt, DeviceProxy, DevFailed from tango import DebugIt, DeviceProxy, DevFailed
from tango.server import run, DeviceMeta, command from tango.server import run, command
# SKA specific imports # SKA specific imports
from skabase import release from skabase import release
...@@ -31,7 +30,7 @@ from SKABaseDevice import SKABaseDevice ...@@ -31,7 +30,7 @@ from SKABaseDevice import SKABaseDevice
__all__ = ["SKALogger", "main"] __all__ = ["SKALogger", "main"]
class SKALogger(with_metaclass(DeviceMeta, SKABaseDevice)): class SKALogger(SKABaseDevice):
""" """
A generic base device for Logging for SKA. A generic base device for Logging for SKA.
""" """
......
...@@ -13,11 +13,10 @@ A master test ...@@ -13,11 +13,10 @@ A master test
# Standard imports # Standard imports
import os import os
import sys import sys
from future.utils import with_metaclass
# Tango imports # Tango imports
from tango import DebugIt from tango import DebugIt
from tango.server import run, DeviceMeta, attribute, command, device_property from tango.server import run, attribute, command, device_property
# SKA specific imports # SKA specific imports
from skabase import release from skabase import release
...@@ -37,7 +36,7 @@ from utils import (validate_capability_types, validate_input_sizes, convert_dict ...@@ -37,7 +36,7 @@ from utils import (validate_capability_types, validate_input_sizes, convert_dict
__all__ = ["SKAMaster", "main"] __all__ = ["SKAMaster", "main"]
class SKAMaster(with_metaclass(DeviceMeta, SKABaseDevice)): class SKAMaster(SKABaseDevice):
""" """
A master test A master test
""" """
......
...@@ -15,10 +15,9 @@ an obsMode will inherit from SKAObsDevice instead of just SKABaseDevice. ...@@ -15,10 +15,9 @@ an obsMode will inherit from SKAObsDevice instead of just SKABaseDevice.
# Standard imports # Standard imports
import os import os
import sys import sys
from future.utils import with_metaclass
# Tango imports # Tango imports
from tango.server import run, DeviceMeta, attribute from tango.server import run, attribute
# SKA specific imports # SKA specific imports
from skabase import release from skabase import release
...@@ -33,8 +32,7 @@ from SKABaseDevice import SKABaseDevice ...@@ -33,8 +32,7 @@ from SKABaseDevice import SKABaseDevice
__all__ = ["SKAObsDevice", "main"] __all__ = ["SKAObsDevice", "main"]
class SKAObsDevice(SKABaseDevice):
class SKAObsDevice(with_metaclass(DeviceMeta, SKABaseDevice)):
""" """
A generic base device for Observations for SKA. A generic base device for Observations for SKA.
""" """
......
...@@ -13,11 +13,10 @@ capabilities, and exposes the related information like assigned resources, confi ...@@ -13,11 +13,10 @@ capabilities, and exposes the related information like assigned resources, confi
# Standard imports # Standard imports
import os import os
import sys import sys
from future.utils import with_metaclass
# Tango imports # Tango imports
from tango import DebugIt from tango import DebugIt
from tango.server import run, DeviceMeta, attribute, command from tango.server import run, attribute, command
from tango.server import device_property from tango.server import device_property
from tango import Except, ErrSeverity, DevState from tango import Except, ErrSeverity, DevState
...@@ -34,7 +33,7 @@ from SKAObsDevice import SKAObsDevice ...@@ -34,7 +33,7 @@ from SKAObsDevice import SKAObsDevice
__all__ = ["SKASubarray", "main"] __all__ = ["SKASubarray", "main"]
class SKASubarray(with_metaclass(DeviceMeta, SKAObsDevice)): class SKASubarray(SKAObsDevice):
""" """
SubArray handling device SubArray handling device
""" """
......
...@@ -12,10 +12,9 @@ A generic base device for Telescope State for SKA. ...@@ -12,10 +12,9 @@ A generic base device for Telescope State for SKA.
# Standard import # Standard import
import os import os
import sys import sys
from future.utils import with_metaclass
# Tango imports # Tango imports
from tango.server import run, DeviceMeta, device_property from tango.server import run, device_property
# SKA specific imports # SKA specific imports
from skabase import release from skabase import release
...@@ -29,7 +28,7 @@ from SKABaseDevice import SKABaseDevice ...@@ -29,7 +28,7 @@ from SKABaseDevice import SKABaseDevice
__all__ = ["SKATelState", "main"] __all__ = ["SKATelState", "main"]
class SKATelState(with_metaclass(DeviceMeta, SKABaseDevice)): class SKATelState(SKABaseDevice):
""" """
A generic base device for Telescope State for SKA. A generic base device for Telescope State for SKA.
""" """
......
...@@ -13,13 +13,12 @@ A generic Test device for testing SKA base class functionalities. ...@@ -13,13 +13,12 @@ A generic Test device for testing SKA base class functionalities.
import os import os
import sys import sys
import json import json
from future.utils import with_metaclass
# Tango imports # Tango imports
import tango import tango
from tango import DebugIt from tango import DebugIt
from tango.server import run from tango.server import run
from tango.server import DeviceMeta, attribute, command from tango.server import attribute, command
# SKA specific imports # SKA specific imports
from skabase import release from skabase import release
...@@ -36,7 +35,7 @@ from skabase.auxiliary.utils import (exception_manager, convert_api_value, coerc ...@@ -36,7 +35,7 @@ from skabase.auxiliary.utils import (exception_manager, convert_api_value, coerc
__all__ = ["SKATestDevice", "main"] __all__ = ["SKATestDevice", "main"]
class SKATestDevice(with_metaclass(DeviceMeta, SKABaseDevice)): class SKATestDevice(SKABaseDevice):
""" """
A generic Test device for testing SKA base class functionalities. A generic Test device for testing SKA base class functionalities.
""" """
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"""Release information for lmc-base-classes Python Package""" """Release information for lmc-base-classes Python Package"""
name = """lmcbaseclasses""" name = """lmcbaseclasses"""
version = "0.3.1" version = "0.4.0"
version_info = version.split(".") version_info = version.split(".")
description = """A set of generic base devices for SKA Telescope.""" description = """A set of generic base devices for SKA Telescope."""
author = "SKA India and SARAO" author = "SKA India and SARAO"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment