# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased ### Removed ### Deprecated ### Added - WOM-1187: Added `future` subpackage that reimplements all the device interfaces with the ADR-124 changes to simplify the operational and observation states. Deprecated features are also removed and some classes have been split-up to make them more compositional. Refer to the [1.7.0 migration guide](https://developer.skao.int/projects/ska-tango-base/en/latest/releases/migrating-to-1.7.html) for more details. ### Changed - WOM-1189: `future` interfaces: Devices will not automatically go to `DevState.ALARM` state when an attribute has alarm quality factor. The `healthState` attribute can rather be used to report information about alarms where appropriate. - WOM-1187: `LRCMixin` supports the first LRC protocol by default. The class attribute `MIN_SUPPORTED_LRC_PROTOCOL_VERSION` must be overridden by subclasses to 2 in order to explicitly exclude the deprecated LRC attributes from a device's interface. - WOM-1187: Removed `stored` and `initial_value` parameters from the `LastEmittedValue` signal data descriptor as `stored` must always be `True` and setting an initial value does not make sense for a read-only signal. ### Fixed ## 1.6.1 - 2026-04-29 ### Fixed - SKB-1318: Race condition in `PollingComponentManager.start_communicating()` that could result in a device being stuck in `DISABLED` if the `adminMode` is toggled between `OFFLINE` and `ONLINE` quickly. ## 1.6.0 - 2026-04-23 ### Added - WOM-1092: Added a `CallbackScheduler` class for robust Tango event callback handling. - WOM-1095: Added `connect_lrc_interface()` and `disconnect_lrc_interface()` to allow pre-connecting to a Tango device's LRC interface. - WOM-1225: Added `bus_test_context()` and `MockSignalObserver` utilities to help with unit testing `SharingObservers`. ### Changed - WOM-1183: Signal values are stored on the `shared_bus` instead of the `Signal` objects themselves. - WOM-1093: `invoke_lrc()` now uses a `CallbackScheduler`. If no scheduler is provided a global scheduler is started to invoke the long running commands. - WOM-1205: `TaskExecutor.start()` now raises an `ExecutorNotShutdownError` if the executor was not previously shutdown. ### Fixed - WOM-1213: Fixed `SubarrayInterface` to allow commands while in `DevState.ALARM`. - WOM-1093: Fixed `LRCSubscriptions` to avoid accidental reference cycles. - WOM-1227: Fixed `BaseInferface` to not add optional commands that have been completely overridden. - WOM-1205: Fixed `TaskExecutor.abort` to use `EnsureOmnithread`. - WOM-1205: Fixed `LRCMixin` to now use the device logger to report exceptions passed to the `update_command_info`. ## 1.5.0 - 2026-04-07 ### Deprecated - WOM-1090: Deprecated scalar `obsMode` attribute provided by `ObsInterface` and added `standard_obs_mode` method to override the scalar attribute and its signal with a list version. - WOM-1091: Deprecated directly writing to the `_health_state` signal. Use `report_health` instead. - WOM-1118: Deprecated `initial_value` from `attribute_from_signal.__init__`. This does nothing and was accepted in error. - WOM-1176: Deprecated assigning `NoValue` to a `Signal`. The `del` keyword can be used instead on a `Signal` instantiated with ``stored=True`` to delete the last value stored on the bus. Also, in order to force a linked attribute's quality to `ATTR_INVALID`, assign `None` instead. ### Added - WOM-1114: Added `Poller.kill_polling_thread()` and call it from `PollingComponentManager.cleanup()`. This ensures the polling thread is reclaimed in a timely manner when `Init()` is called. - WOM-1091: Added `healthInfo` attribute to `BaseInterface` - WOM-1091: Added `BaseInterface.report_health()` method for updating `healthState` and `healthInfo` attributes atomically. - WOM-1224: Allow disabling the `ObsInterface.obsMode` attribute by assigning `obsMode = None` ### Changed - WOM-1218: Improved failure-guidelines document ### Fixed - WOM-1100: Do not raise an exception when signal bus thread is shutdown when it isn't running - WOM-1101: Ensure the `lrcQueue` attribute is created with a minimum dimension of 1, even if a custom task executor is used that does not have a queue, i.e. if its `max_queued_tasks` property is 0. - WOM-1114: Fix race condition in polling thread initialisation that can miss that it was started. - WOM-1105: Fix overriding is-allowed methods - WOM-1116: Allow LRCs called with invalid JSON args to finish with a rejected result and appear in the `lrcFinished` attribute. - Validation decorators, such as `@validate_json_args`, must always be applied first (innermost) to allow LRCs to catch validation errors and reject the task. - WOM-1118: Fixed check for "value triples" to not get confused with 3-element tuples of `AttrQuality` - WOM-1118: Fixed `AttrSignal` type annotations to allow `None` for a timestamp - WOM-1173: Allow the subarray commands `ReleaseResources`/`ReleaseAllResources` from `ObsState.EMPTY` and `End` from `ObsState.IDLE`. ## 1.4.2 - 2026-02-13 ### Changed - WOM-828: Changed `TaskExecutorProtocol` to accept `Any` as the task type. - WOM-1069: Retry acquiring the Tango monitor on the signal bus when pushing events - WOM-1075: Allow emitting `NoValue` for a signal - WOM-1079: The signal bus now applies back pressure (by blocking) if the emission queue is full ### Fixed - WOM-1033: Do not emit bogus JSON schema warnings after you have updated a Subarray to not use command objects anymore - WOM-1068: Moved the `_update_state` and `_update_admin_mode` methods to `BaseInterface` to pass them as callbacks to the models. This allows devices to override these callbacks if needed, as was possible before ska-tango-base 1.4.0. - WOM-1068: Add timeout to emitting values on the signal bus, to apply back pressure. - WOM-1085: Pending operation count will now longer get out of sync if the operation throws an exception ## 1.4.1 - 2026-01-20 ### Changed - WOM-933: The signal bus thread now has a name. - WOM-935: `attribute_from_signal` now caches values with the Tango polling buffer when using pytango 10.1.0 or newer. - WOM-942: The `BaseInterface` only provides the `Reset`, `Standby`, `Off` and `On` commands when their respective execute methods are implemented in a subclass, except for when using pytango 10.0.3, which has a bug that prevents the implementation from working correctly. - WOM-1058: Suppress "state machine" logs by default, these can be re-enabled by setting the `STB_STATE_MACHINE_VERBOSE` environment variable to `ON`. ### Fixed - WOM-935: Fixed type hints for `attribute_from_signal.do_read`/`attribute_from_signal.do_write`. `attribute_from_signal.do_read` now consistently returns a (value, time stamp, quality) tuple. - WOM-939: Fixed `TaskExecutor.task` to allow decorating functions that except extra arguments. - WOM-974: Fixed the how-to/invoke-an-lrc example - WOM-1057: Removed backwards incompatible check on DevState values in `SKABaseDevice._update_state` - WOM-1058: Ensure we do not hang if SignalBusMixin device raises an exception during `__init__` - REL-2543: Correctly import all exposed modules in top package ## 1.4.0 - 2025-12-18 ### Deprecated - WOM-725, WOM-1028: Deprecated using SKA command objects to implement Tango commands. Use the `@tango.server.command` and `@ska_tango_base.long_running_command` decorators directly instead to define new commands. The various base classes in ska-tango-base now provide `execute_()` functions which can be overridden by subclasses to change the behaviour of a command. - WOM-768: Deprecated calling Tango functions (e.g. `push_change_event`) from a non-omnithread. Previously, when calling a Tango function from a non-omnithread, `SKABaseDevice` would schedule the Tango function to actually be called by the `ExecutePendingOperations` function. This is now deprecated and a warning will be generated if a Tango function is called from a non-omnithread. All threads wishing to call a Tango function should use the `tango.EnsureOmniThread` context manager, once at the start of the thread. - WOM-936: Deprecated duplicated modules and re-exports. Some `ska_tango_base` import statements that are present for backwards compatibility will emit a deprecation warning pointing you to the new path to import the object from. In some cases, the warning will point you to using a protocol type for type hinting rather than the concrete type. - WOM-968: Deprecated the `CommandTracker` object in favor of a `CommandTrackerProtocol` for type hinting. Now the long running command implementation uses a new internal `_CommandTracker` class that models the `CommandTrackerProtocol`. The `CommandTracker` object is still available in case there were any uses of the class directly, however, it is currently planned to be removed in the next major release. If you have a use for the `CommandTracker` other than a type hint, we would encourage you to share it with the Wombat Team so that we can continue to support your use case. See the [migration guide](https://developer.skao.int/projects/ska-tango-base/en/latest/releases/migrating-to-1.4.html) for details of how to resolve these deprecations. ### Changed - The `SKABaseDevice` now makes use of the `always_executed_hook` and `delete_device` methods. Subclasses of `SKABaseDevice` must always ensure they call the `super()` version of these methods if they override them otherwise `SKABaseDevice` will fail to clean up after itself. This has always been a requirement for these functions, however, it may have worked in previous releases as the `SKABaseDevice` did not use them. - WOM-804, WOM-936: Reorganised module layout, while maintaining old names for compatibility: - `ska_tango_base.long_running_commands_api` is now canonically `ska_tango_base.long_running_commands.api` - `ska_tango_base.controller_device` is now canonically `ska_tango_base.controller.controller_device` - WOM-782: Exposed the `unsubscribe_lrc_events` method of the `LRCSubscriptions` class. - WOM-824: `LrcSubscriptions` and `LrcCallback` have been renamed to `LRCSubscriptions` and `LRCCallbackType` respectively. The old names are still available as aliases from `ska_tango_base.long_running_commands_api`. - WOM-756: `SKABaseDevice` now exposes a public `command_tracker` property with type `CommandTrackerProtocol`. The previous `_command_tracker` attribute is still available, but its direct use is discouraged. ### Added - WOM-669, WOM-831: Added minimal base `SKADevice` class which sets-up logging. - WOM-676, WOM-708, WOM-740, WOM-827, WOM-934: Introduced the `_SignalBus` class modelling the `BusProtocol` to act as an internal event system for an SKA Tango device. - WOM-697: Added `attribute_from_signal`, a `tango.server.attribute` that automatically generates read and write callbacks linked to a signal. - WOM-670, WOM-730, WOM-756, WOM-856, WOM-898, WOM-940, WOM-968, WOM-977: Introduced `LRCMixin` to provide an implementation of long running commands that can be used with any device. - WOM-671, WOM-672, WOM-677, WOM-679, WOM-758, WOM-803, WOM-826, WOM-855, WOM-858, WOM-946, WOM-964, WOM-966: Introduced minimal Tango interface classes `BaseInterface`, `ControllerInterface`, `ObsInterface` and `SubarrayInterface` for different types of SKA Tango devices. These interface classes are now used by the `SKABaseDevice`, `SKAController`, `SKAObsDevice` and `SKASubarray` component manager based device classes respectively. They have the same Tango interface as the original base classes, but the interfaces do not require the use of a component manager. - WOM-725, WOM-832, WOM-979: Added dynamically dispatched `read_()`, `write_()` and `execute_()` methods to all Tango interfaces, allowing subclasses to override the behaviour of these attributes and commands, without changing the Tango interface classes and SKA base classes. - WOM-678: Added `standard_simulation_mode()`, `standard_test_mode()` and `standard_control_mode()` functions to provide standard implementations of optional SKA control model attributes to be used with the `BaseInterface`. - WOM-674: Added `@long_running_command` and `@submit_lrc_task` decorators for creating long running commands. - WOM-674, WOM-829: Added `@TaskExecutor.task` decorator for creating long running command tasks with a simplified API. - WOM-675, WOM-830: Added `@validate_json_arg` for decorating Tango commands to take a single JSON string as argument. - WOM-804: Introduced a new `ska_tango_base.type_hints` module that provides common type hints for use with SKA Tango devices. - WOM-947: Added support for pytango 10.1. - WOM-755: Added testing against multiple pytango versions. For this release 9.4.2, 9.5.0, 10.0.3 and 10.1.1 are tested against. ### Removed - WOM-768, WOM-965: Removed the internal `ExecutePendingOperations` polled command to use the `_SignalBus` instead. - WOM-852: Removed unused `SKATelState`, `SKAAlarmHandler`, `SKALogger` and `SKACapability` base classes. ### Fixed - WOM-783: Updated `TaskExecutor` to keep track of input queue length instead of using unreliable queue size of `ThreadPoolExecutor`. - WOM-811: Fix `TaskExecutor` to explicitly shutdown during `delete_device`. - WOM-793: Fix `BaseComponentManager` to clear `PowerState` whenever communication is lost. ### Changes since 1.4.0rc1 (2025-08-27) #### Added - WOM-755: Added testing against multiple pytango versions. 9.4.2, 9.5.0, 10.0.3 and 10.1.1 are tested against. - WOM-858: Added logic to automatically handle the `obsState` transitions for `SubarrayInterface` devices and moved `ObsStateModel` into the `SubarrayInterface`. - WOM-946: Moved `OpStateModel` into the `BaseInterface` to be inline with the `SubarrayInterface`. - WOM-936: Deprecated duplicated modules and tidied up exports. #### Fixed - WOM-830: `@validate-json-args` now accepts a single `schema` argument that can be a string or a dictionary. - WOM-831: Moved `SkaLevel` from `SKADevice` back to `SKABaseDevice`. - WOM-855: Simplified device initialisation so that it can be explained clearly. - WOM-898: Command status transitions are now checked immediately on `lrc_event` signals, before the LRC user dictionaries are updated, so warnings are correctly emitted. - WOM-934: Support `@listen_to_signal` with a `Signal` object. - WOM-940: The `completed_callback` is now called immediately when a command transitions to `TaskStatus.COMPLETED`, regardless of which LRC dict the command is in. - WOM-947: Added support for pytango 10.1. - WOM-964: Add `AbstractSubarrayInterface` to use with `SKASubarray` to avoid MRO issues. - WOM-965: Fixed `_submit_tango_operations` implementation based on the `_SignalBus`. - WOM-966: Fixed when we call `create_component_manager` to be compatible with previous releases. - WOM-968: Added missing methods to the `CommandTrackerProtocol` completely. - WOM-977: Synchronously update user LRC dictionaries in `_CommandTracker`. - WOM-979: Ensure attributes can be overridden with `@tango.server.attribute` decorator. #### Documentation - WOM-829: Improved `TaskExecutor.task` documentation. - WOM-1028: Improved deprecation warnings for SKA command objects. ## 1.3.2 - 2025-04-04 ### Fixed - THORN-99: Remove successful poll debug log - WOM-710: Fix long running command attribute deprecation warnings ### Changed - DPPT-987: Update sphinx and documentation theme ## 1.3.1 - 2025-01-29 ### Fixed - SKB-742: Added `SlowDeviceInitCommand`, a fixed version of `DeviceInitCommand`, which does not perform the "init_completed" action before invoking the user supplied `do()` method. Users requiring control over when the "init_completed" action is performed can inherit from `SlowDeviceInitCommand` but are then responsible for calling `self._completed()` in order to perform the "init_completed" action themselves. ## 1.3.0 - 2025-01-21 ### Added - WOM-572: Added OpenTelemetry support as optional poetry extra: 'telemetry'. It only works with PyTango 10.0.0 or newer. - WOM-571: Added an optional callback method to the `TaskExecutorComponentManager`, which is called when the `TaskExecutor` catches any unhandled exceptions during execution of a LRC. It implies a bug in the device code, and the callback should be used to notify users thereof. - WOM-573: Include the versions of the device, ska-tango-base and ska-control-model in the `tango.DeviceInfo.version_info` dict if using PyTango 10.0.0 or newer. ## 1.2.3 - 2024-11-27 ### Fixed - SKB-663: Fixed the `BaseComponentManager.abort_commands` deprecation check to be compatible with a `Mock` component manager that mocks `abort_commands`. ## 1.2.2 - 2024-11-21 ### Fixed - WOM-522: Handle and log any exceptions from `PollModel` methods in polling loop. ## 1.2.1 - 2024-11-12 ### Fixed - WOM-507: Fixed the `BaseComponentManager.abort_commands` deprecation check to be compatible with a `Mock` object in tests. ## 1.2.0 - 2024-10-22 ### Added - WOM-423: Added [1.2.0 migration guide](https://developer.skao.int/projects/ska-tango-base/en/latest/releases/migrating-to-1.2.html) explaining all the changes listed below in more detail. - PERENTIE-2592: `TestModeOverrideMixin` class that adds a `test_mode_overrides` attribute and `@overridable` decorator, with logic to apply overrides to Tango attributes when `TestMode` is active. - WOM-344: `Abort` command from `SKASubArray` added to `SKABaseDevice` that has a command ID and `TaskStatus`. - WOM-372: New user facing LRC attributes `lrcQueue`, `lrcExecuting` and `lrcFinished`. - WOM-367, WOM-457, WOM-466: Version 2 of the LRC client-server protocol. - New `lrcProtocolVersions` attribute indicating the range of versions of the LRC client-server protocol supported by `SKABaseDevice`. It is read in `invoke_lrc` to check compatibility between the client and server and to decide which version to use. - New private `_lrcEvents` attribute that is meant to be only used by `invoke_lrc`. ### Changed - WOM-502: Allow using PyTango 10.0.0 with ska-tango-base 1.2.0. - WOM-495, WOM-497: Long running command task tracking. - Emit warnings for invalid `TaskStatus` transitions. - Do not assume the `TaskCallbackType` annotation is used by all `task_callback` implementations: - `CommandTracker.update_command_info` emits a `FutureWarning` when the progress/result does not match their types specified by `TaskCallbackType`, and raises a `TypeError` if the status is not a `TaskStatus` enum. - `invoke_lrc` protocol V2 logs a warning if the progress is not an integer. - WOM-468: Updated the error handling guidelines to recommend throwing an exception if a LRC is rejected by the Tango command that initiates the LRC. ### Deprecated - WOM-344: `SKABaseDevice.AbortCommands` is deprecated and replaced by new `SKABaseDevice.Abort` command. `BaseComponentManager.abort_commands` is deprecated and replaced by `abort_tasks`. - WOM-377: `longRunningCommandStatus`, `longRunningCommandProgress`, `longRunningCommandInProgress`, `longRunningCommandsInQueue`, `longRunningCommandIDsInQueue` and `longRunningCommandResult` is deprecated in favour of new user facing LRC attributes. ### Fixed - WOM-488: The `Off`, `Reset` and `Standby` commands are allowed while the device is in `DevState.ALARM`, but the `On` command is rejected. This device state is equivalent to `DevState.ON`, but is forcefully set by cppTango when at least one attribute has its quality factor set to `AttrQuality.ATTR_WARNING` or `AttrQuality.ATTR_ALARM`. - WOM-501: Return status information for all known LRCs from `CheckLongRunningCommandStatus` command. ## 1.1.0 - 2024-08-20 ### Added - WOM-369, WOM-393, WOM-394, WOM-415: Added new `invoke_lrc` function as a callback API for LRCs. - WOM-373: Added documentation for the `communication_state_callback` and `component_state_callback` keyword arguments of a component manager. ### Changed - WOM-366: Updated logging guide from README and added it to ReadTheDocs. - WOM-413: Updated example of how to invoke a LRC using `invoke_lrc` and added its API to docs. ### Removed - WOM-365: Removed unnecessary `typing_extensions` import. ## 1.0.0 - 2024-05-21 ### Added - WOM-300: Added [1.0.0 migration guide](https://developer.skao.int/projects/ska-tango-base/en/latest/releases/migrating-to-1.0.html) explaining all the breaking changes listed below in more detail. ### Changed - WOM-300, WOM-358: Restructured and revised all the documentation, split into how-to, explanation and reference. - WOM-299: Updated to pytango ^9.4.2 for build and 9.5.0 for development. - WOM-343: Updated `TaskExecutor` to follow `TaskStatus` state machine. - Long Running Commands are transitioned to `TaskStatus.STAGING` initially. - When in a final status, all tasks have a result of the form `(ResultCode, message)`. - WOM-302: Set correct LRC attribute spectrum limits. - If there are too many items to report for `longRunningCommandStatus`, `longRunningCommandsInQueue` and `longRunningCommandIDsInQueue`, the oldest completed commands are now pruned from the list and a warning is logged. - `longRunningCommandInProgress` now supports reporting multiple commands in progress. If there are no commands in progress, this attribute now returns an empty list instead of `["", ""]`. - WOM-342: Made `max_queued_tasks` and `max_executing_tasks` read only attributes that have hard-coded values for the different base classes. ### Removed - WOM-250, WOM-345: Removed `max_workers` from `TaskExecutorComponentManager`. - Updated to ska-control-model 1.0.0 (REL-1292) - this removes `adminMode.MAINTENANCE`. ### Fixed - WOM-357: Fixed long outstanding issues with API auto generated docs. ## 0.20.2 - WOM-319: Fix timing issue with LRCInProgress and `Abort()` - WOM-320: Do not directly call Tango operations while holding the `CommandTracker` lock ## 0.20.1 - WOM-273: Pin poetry version in readthedocs.yml - WOM-274: Mark tests where `Abort()` is used as xfail ## 0.20.0 - WOM-265: Deprecate `max_workers` for `TaskExecutorComponentManager` - WOM-266: Revert LRC attribute size to 64 queued commands - WOM-211: Add `commandedState` and `commandedObsState` attributes - MCCS-1993: Update to use latest version of ska-control-model - WOM-212: Add `longRunningCommandInProgress` attribute ## 0.19.3 - WOM-213: Limit input queue size for long running commands - WOM-177: Fix `push_change_event` and `push_archive_event` to expose the official PyTango interface ## 0.19.2 - LOW-614: Remove `DevInt`, removed in cppTango/PyTango 9.5.0 - KAR-585: Improve docs to reflect input queue updates ## 0.19.1 - MCCS-1695: Workaround for pytango 9.4.2 logging interface change ## 0.19.0 - MCCS-1636: Use ska-ser-sphinx-theme for documentation - KAR-632: Unpinned numpy requirements. Bumped minimum Python version to 3.8 - KAR-587: Input queue updates ## 0.18.1 - MCCS-1494: Bug fixes to subarray subclassing following addition of JSON validation support - KAR-497: Further task callback parameters bug fixes - MCCS-1579: Strict type-checking, leading to bug fixes in task callback parameters and subarray resource pool checking ## 0.18.0 - MCCS-1424: JSON validation support ## 0.17.0 - MCCS-1358: Remove CSP-specific content (into separate ska-csp-lmc-base repo) ## 0.16.1 - LOW-418: Remove redundant production Dockerfile, relax pytango constraint - LOW-415: Complete linting and type-hinting ## 0.16.0 - MCCS-1312: Update to pytango 9.3.6 ## 0.15.0 - MCCS-1208: Allow `Abort()` from RESOURCING, `Off()` from FAULT ## 0.14.0 - LOW-346: Provide polling mechanism as alternive concurrency mechanism to task executor ## 0.13.6 - Updated numpy version ## 0.13.5 - REL-275: Fix pipeline ## 0.13.4 - KAR-466: Repository maintenance - MCCS-1072: Type hint & static type check base class alarm_handler_device & utils - MCCS-934: Type hint & Static type check base classes - LOW-330: Import control model definitions from ska-control-model - LOW-317: Allow `Reset()` from STANDBY and ON states, not just FAULT ## 0.13.3 - KAR-403: Fixed exceptions in LRCs not updating `longRunningCommandResult` accordingly - LOW-299: Fixed docs build in the CI pipeline - LOW-278: Now using ska-tango-testing - SAH-1156: Enable `assigned_resources` property inside `SubarrayComponentManager`. ## 0.13.2 - CT-738: fix check long running status - AT3-140: fix base TANGO xmi files - MCCS-1053: Fix the problem of device in UNKNOWN state upon test startup - PERENTIE-1350: Remove misleading `CspSubarrayComponentManager.__init__` function ## 0.13.1 - KAR-399: Renamed `SKAController` command `isCapabilityAchievable` to `IsCapabilityAchievable`. ## 0.13.0 - MCCS-876: Updated implementation of long running commands - SAR-341: Updated docs - SAR-351: Updated tests ## 0.12.1 - SAR-303 - Fixed PYPI URL - Moved command response message to component manager - MCCS-845 - `NO_SUPPLY` added to `PowerMode` enum ## 0.12.0 - Implemented ST-946 (automation templates) - Included Long running commands implementation - SAR-277, SAR-287, SAR-286, SAR-276, SAR-275, SAR-273 ## 0.11.3 - No change, moving artefacts to a new [Central Aftefact Repository](https://artefact.skao.int/). ## 0.11.2 - Update docstrings for 100% coverage and PEP257 compliance ## 0.11.1 - Minor breaking change: rename of "Master" devices to "Controller" ## 0.11.0 - Breaking change: state models and component managers - Re-implementation of operational state model to better model hardware and support device decoupling. - Decoupling of state models from each other - Introduction of component managers, to support component monitoring - Update to latest containers - Add developer guide to documentation ## 0.10.1 - Make dependency on `pytango` and `numpy` python packages explicit. - Add optional "key" parameter to `SKASubarrayResourceManager` to filter JSON for assign & release methods. ## 0.10.0 - Add `DebugDevice` command to `SKABaseDevice`. This allows remote debugging to be enabled on all devices. It cannot be disabled without restarting the process. If there are multiple devices in a device server, debugging is only enabled for the requested device (i.e., methods patched for debugging cppTango threads). However, all Python threads (not cppTango threads), will also be debuggable, even if created by devices other than the one that was used to enable debugging. There is only one debugger instance shared by the whole process. ## 0.9.1 - Changed dependency from `ska_logging` to `ska_ser_logging`. ## 0.9.0 - Breaking change: Package rename - Installable package name changed from `lmcbaseclasses` to `ska_tango_base`. - Package import `ska.base` has been changed to `ska_tango_base`. For example, instead of `from ska.base import SKABaseDevice` use `from ska_tango_base import SKABaseDevice`. ## 0.8.1 - Fix broken docs ## 0.8.0 - Add base classes for CSP SubElements ## 0.7.2 - Switch to threadsafe state machine ## 0.7.1 - Bugfix for `Reset()` command ## 0.7.0 - Separate `adminMode` state machine from `opState` state machine - Add support for STANDBY `opState` - Add `Standby()` and `Disable()` commands to `SKABaseDevice` - Breaking behavioural changes to adminMode and `opState` state machines - Breaking change to `_straight_to_state` method signature ## 0.6.6 - Documentation bugfix ## 0.6.5 - Fix to observation state machine: allow `Abort()` from RESETTING observation state ## 0.6.4 - Refactor state machine to use pytransitions library. - Minor behavioural change:` Off()` command is accepted in every obsState, rather than only EMPTY obsState. - support `_straight_to_state` shortcuts to simplify test setups - Refactor of state machine testing to make it more portable ## 0.6.3 - Fix omission of `fatal_error` transition from base device state machine. ## 0.6.2 - Fix issue with incorrect updates to transitions dict from inherited devices. Only noticeable if running multiple devices of different types in the same process. ## 0.6.1 - Add `ON` state to `SKABaseDeviceStateModel`. - Move `On()` and `Off()` commands to `SKABaseDevice`. - Add event pushing for device state, device status, admin mode and obs state (change and archive events). - Disable all attribute polling. ## 0.6.0 - Breaking change: State management - `SKABaseDevice` implements a simple state machine with states `DISABLED`, `OFF`, `ON`, `INIT` and `FAULT`, along with transitions between them. - `SKASubarray` implements full subarray state machine in accordance with ADR-8 (the underlying state model supports all states and transitions, including transitions through transient states; the subarray device uses this state model but currently provide a simple, purely synchronous implementation) - Base classes provide subclassing code hooks that separate management of device state from other device functionality. Thus, subclasses are encouraged to leave state management in the care of the base classes by: - leaving `init_device()` alone and placing their (stateless) initialisation code in the `do()` method of the `InitCommand` object instead. The base `init_device()` implementation will ensure that the `do()` method is called, whilst ensuring state is managed e.g. the device is put into state `IDLE` beforehand, and put into the right state afterwards. - leaving commands like `Configure()` alone and placing their (stateless) implementation code in `ConfigureCommand.do()` instead. This applies to all commands that affect device state: `Off()`, `On()`, `AssignResources()`, `ReleaseResources()`, `ReleaseAllResources()`, `Configure()`, `Scan()`, `EndScan()`, `End()`, `Abort()`, `Reset()`, `Restart()`. - leaving the base device to handle reads from and writes to the state attributes `adminMode`, `obsState` and device `state`. For example, do not call `Device.set_state()` directly; and do not override methods like `write_adminMode()`. ## 0.5.4 - Remove `ObsState` command from `SKACapability`, `SKAObsDevice` and `SKASubarray` Pogo XMI files. It should not have been included - the `obsState` attribute provides this information. The command was not in the Python files, so no change to usage. It only affects future Pogo code generation. - Add new logging target, `"tango::logger"`, that forwards Python logs to the Tango Logging Service. This is enabled by default in code, but could be overridden by existing Tango Database device properties. - Maximum number of logging targets increased from 3 to 4. ## 0.5.3 - Setting `loggingTargets` attribute to empty list no longer raises exception. - Change syslog targets in `loggingTargets` attribute to a full URL so that remote syslog servers can be specified. For example, `"syslog::udp://server.domain:514"`, would send logs to `server.domain` via UDP port 514. Specifying a path without a protocol, like `"syslog::/var/log"`, is deprecated. ## 0.5.2 - Change ska_logger dependency to use ska-namespaced package (v0.3.0). No change to usage. ## 0.5.1 - Make 'ska' a [native namespace package](https://packaging.python.org/guides/packaging-namespace-packages/#native-namespace-packages). No change to usage. ## 0.5.0 - Breaking change: Major restructuring of the package to simplify imports and reduce confusion. - The single word `skabase` module has now changed to two words: `ska.base`. - Instead of `from skabase.SKABaseDevice.SKABaseDevice import SKABaseDevice` to import the class, just use `from ska.base import SKABaseDevice`. - Instead of `skabase.control_model` use `ska.base.control_model`. - The `SKATestDevice` was removed. Note that this class was only intended for internal use and is no longer needed. - Removed unused scripts and modules. - Removed `TangoLoggingLevel` which was deprecated in 0.4.0. Use `ska.base.control_model.LoggingLevel` instead. ## 0.4.1 - Fix lost properties when re-initialising test device (remove `get_name` mock). - Fix Sphinx doc building. - Move `ObsDevice` variable initialisation from `__init__` to `init_device`. - Run scripts with `python3` instead of `python` and update pip usage. ## 0.4.0 - 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`. - The names of some of the enumeration labels were changed to better match the Control Systems Guidelines. - `ON-LINE` changed to `ONLINE`. - `OFF-LINE` changed to `OFFLINE`. - All dashes were changed to underscores to allow usage as Python variables. - Changed `simulationMode` attribute from `bool` to enumerated type: `SimulationMode`. - Changed `testMode` attribute from `str` to enumerated type: `TestMode`. - Deprecated `TangoLoggingLevel`. Will be removed in version 0.5.0. Use `skabase.control_model.LoggingLevel` instead. - Remove unnecessary usage of `DeviceMeta` class. ## 0.3.1 - Used `ska_logging` library instead of defining logging format and handlers locally. - `LoggingTargetDefault` property is now empty instead of `"console::cout"`, since the the `ska_logging` library will automatically output to stdout. - Fixed device name field in log message if a device server includes multiple devices. - Removed a number of unused files in the `ansible` and `refelt` folders. ## 0.3.0 - Not released ## 0.2.0 - Changed logging to use SKA format - Simplified element, storage and central logging to just a single target. Default writes to stdout. This is in line with the move to Elastic for all logs instead of using the Tango Logging Service for some cases. - Deprecated `dev_logging` method. Will be removed in 0.3.0. Use direct calls the `self.logger` instead. ## 0.1.3 - Storage logs are written to a file if Syslog service is not available. - Added exception handling - Improved code coverage - Improved compliance to coding standards - Improvement in documentation - Other minor improvements ## 0.1.2 - Internal release ## 0.1.1 - Logging functionality - Python3 migration - Repackaging of all the classes into a single Python package - Changes to folder structure, - Integration in CI environment