Ts-salobj

Latest version: v6.9.1

Safety actively analyzes 628478 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 13

6.2.0

------

Deprecations:

* `CscCommander.get_rounded_public_fields` is deprecated. Call `CscCommander.get_rounded_public_data` instead.

Changes:

* Improve `CscCommander`:

* Add ``exclude_commands`` and ``telemetry_fields_to_not_compare`` constructor arguments.
* Add method ``format_dict``.
* Renamed method ``get_rounded_public_fields`` to ``get_rounded_public_data``, for consistency.
The old method remains, for backwards compatibility, but is deprecated.
* Round telemetry to 2 digits by default, instead of 4.
That should greatly reduce the need to write custom code for CSC commanders.

* Improve `Controller` to fail in the constructor if the ``authList`` event is missing.
The event was already required; this change simply reports the error earlier and more clearly.

Requirements:

* ts_ddsconfig
* ts_idl 2
* ts_xml 6.2
* IDL files for Test, Script, and LOVE generated by ts_sal 5
* SALPY_Test generated by ts_sal 5

6.1.2

------

Changes:

* Fixed documented range of values for LSST_DDS_DOMAIN_ID in configuration.
According to the reply to an ADLink ticket I filed their manual is in error; 0 and 230 are fine.
* Require ts_xml 6.2 or later.
Removed a small piece of ts_xml 6.1 compatibility code from tests/test_csc_configuration.py.
* Add installation instructions.

Requirements:

* ts_ddsconfig
* ts_idl 2
* ts_xml 6.2
* IDL files for Test, Script, and LOVE generated by ts_sal 5
* SALPY_Test generated by ts_sal 5

6.1.1

------

Document updates:

* Document environment variable LSST_DDS_DOMAIN_ID in configuration.
* Fix two incorrect references to AckCmdType.

Requirements:

* ts_ddsconfig
* ts_idl 2
* ts_xml 6.2
* IDL files for Test, Script, and LOVE generated by ts_sal 5
* SALPY_Test generated by ts_sal 5

6.1.0

------

Backwards-incompatible changes:

* ``initial-state`` can no longer be `salobj.State.FAULT` when constructing a CSC.
This may break some unit tests.

Changes:

* Gets its configuration from the new ``ts_ddsconfig`` package.
* Improved support for specifying the initial state of the CSC:

* Add ``enable_cmdline_state`` class variable, which defaults to False.
If True then `BaseCsc.amain` adds ``--state`` and (if relevant) ``--settings`` command-line argument`.
* Added constructor argument ``settings_to_apply`` to `BaseCsc` and `ConfigurableCsc`.
If you have a configurable CSC then you should add this parameter to your constructor.
* CSCs now handle ``initial_state`` differently: the CSC starts in the default initial state
and `BaseCsc.start` transitions to each intermediate state in turn.
* As a result, ``initial_state`` can no longer be `State.FAULT`.

* Added function `get_expected_summary_states`.
* Improved `BaseCsc.amain` to accept an `enum.IntEnum` as the value of the index parameter.
This restricts the allowed values and describes each value in the help.
* Improved `BaseCscTestCase.assert_next_sample` to try to cast read SAL values to the apppropriate enum,
if the expected value is an instance of `enum.IntEnum`.
This makes errors easier to understand.
* Improved `Controller` startup: commands will be ignored until the `Controller` has (at least mostly) started.
This avoids mysterious errors from commanding a partially constructed SAL component.
* Improved the output of `BaseCscTestCase` if the subprocess dies.
* Uses ``pre-commit`` instead of a custom git pre-commit hook.
You may have to do the following to take advantage of it:

* Run `pre-commit install` once.
* If directed, run `git config --unset-all core.hooksPath` once.

How to update your Code. Except as noted, all changes are backwards compatible with ts_salobj 6.0:

* If your CSC overrides the `BaseCsc.start` method, make sure it calls ``await super().start()``
at or near the *end* of your ``start`` method, not the beginning.
This is because `BaseCsc.start()` can now call state transition commands,
which will trigger calls to `BaseCsc.handle_summary_state`;
thus your CSC should be as "started" as practical before calling ``await super().start()``.
* If you wish to be able to specify the initial state of your CSC from the command line:

* Set class variable ``enable_cmdline_state`` to True.
* If your CSC is configurable and does not have a usable default configuration
(so it *must* have settings specified in the ``start`` command)
specify class variable ``settings_required = True``.
This is rare, but Watcher is one such CSC.

* If you have a configurable CSC, add constructor argument ``settings_to_apply=""`` and pass it (by name) to ``super().__init__``.
This is essential if you set ``enable_cmdline_state = True``, and useful for unit tests even if not.
This change is *not* backwards compatible with ts_salobj 6.0.
* If your CSC is "externally commandable" (it does not quit in OFFLINE state)
specify class variable ``default_initial_state = salobj.State.OFFLINE``.

Requirements:

* ts_ddsconfig
* ts_idl 2
* ts_xml 6.1 (older versions might work but have not been tested)
* IDL files for Test, Script, and LOVE generated by ts_sal 5
* SALPY_Test generated by ts_sal 5

6.0.4

------

Changes:

* Fix `SalLogHandler.emit` to handle message and traceback data with unencodable characters,
and to never raise an exception.
This fixes `DM-27380 <https://jira.lsstcorp.org/browse/DM-27380>`_
* Beef up the unit test for invalid configuration to make sure the correct exception is raised
and that the CSC can still be configured.

Requirements:

* ts_idl 2
* ts_xml 6.1 (older versions might work but have not been tested)
* IDL files for Test, Script, and LOVE generated by ts_sal 5
* SALPY_Test generated by ts_sal 5

6.0.3

------

Changes:

* Fix an entry in ``Writing a CSC`` about setting ``evt_softwareVersions`` and ``evt_settingsApplied``.

Requirements:

* ts_idl 2
* ts_xml 6.1 (older versions might work but have not been tested)
* IDL files for Test, Script, and LOVE generated by ts_sal 5
* SALPY_Test generated by ts_sal 5

Page 7 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.