From 36f3fa70d6d12039dfed51d43802d50c54c97a96 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Thu, 12 Oct 2023 15:20:51 -0400 Subject: [PATCH 01/10] Change SEA data classification level to CUI --- scos_actions/actions/acquire_sea_data_product.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scos_actions/actions/acquire_sea_data_product.py b/scos_actions/actions/acquire_sea_data_product.py index e9a46d9f..7ed6f297 100644 --- a/scos_actions/actions/acquire_sea_data_product.py +++ b/scos_actions/actions/acquire_sea_data_product.py @@ -1059,8 +1059,8 @@ def get_sigmf_builder( sigmf_builder.set_num_channels(len(iter_params)) sigmf_builder.set_task(task_id) - # Mark data as UNCLASSIFIED - sigmf_builder.set_classification("UNCLASSIFIED") + # Mark data as CUI (basic) + sigmf_builder.set_classification("CUI") self.sigmf_builder = sigmf_builder From 716d2e90b7cae0f86bda27d52d4dcb217d6ea037 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Thu, 12 Oct 2023 15:21:22 -0400 Subject: [PATCH 02/10] Bump version to 6.3.4 --- scos_actions/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scos_actions/__init__.py b/scos_actions/__init__.py index 9eaeb606..76d9e7ee 100644 --- a/scos_actions/__init__.py +++ b/scos_actions/__init__.py @@ -1 +1 @@ -__version__ = "6.3.3" +__version__ = "6.3.4" From 83012742c66b05701d409e95629656d5e8a270e5 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Wed, 18 Oct 2023 16:51:10 -0400 Subject: [PATCH 03/10] Update for ntia-diagnostics v1.1.1 --- scos_actions/actions/acquire_sea_data_product.py | 1 + scos_actions/metadata/sigmf_builder.py | 2 +- scos_actions/metadata/structs/ntia_diagnostics.py | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scos_actions/actions/acquire_sea_data_product.py b/scos_actions/actions/acquire_sea_data_product.py index 7ed6f297..4b541dc9 100644 --- a/scos_actions/actions/acquire_sea_data_product.py +++ b/scos_actions/actions/acquire_sea_data_product.py @@ -796,6 +796,7 @@ def capture_diagnostics(self, action_start_tic: float, cpu_speeds: list) -> None "python_version": sys.version.split()[0], "scos_sensor_version": SCOS_SENSOR_GIT_TAG, "scos_actions_version": SCOS_ACTIONS_VERSION, + "scos_tekrsa_version": self.sigan.plugin_version, "preselector_api_version": PRESELECTOR_API_VERSION, } diff --git a/scos_actions/metadata/sigmf_builder.py b/scos_actions/metadata/sigmf_builder.py index 2341d31d..6840e49f 100644 --- a/scos_actions/metadata/sigmf_builder.py +++ b/scos_actions/metadata/sigmf_builder.py @@ -27,7 +27,7 @@ }, { "name": "ntia-diagnostics", - "version": "v1.1.0", + "version": "v1.1.1", "optional": True, }, { diff --git a/scos_actions/metadata/structs/ntia_diagnostics.py b/scos_actions/metadata/structs/ntia_diagnostics.py index 35dce19c..e391e744 100644 --- a/scos_actions/metadata/structs/ntia_diagnostics.py +++ b/scos_actions/metadata/structs/ntia_diagnostics.py @@ -127,6 +127,7 @@ class Software(msgspec.Struct, **SIGMF_OBJECT_KWARGS): :param python_version: The Python version, as returned by `sys.version()`. :param scos_sensor_version: The SCOS Sensor version, as returned by `git describe --tags`. :param scos_actions_version: Version of `scos_actions` plugin. + :param scos_tekrs_version: Version of `scos_tekrsa` plugin. :param preselector_api_version: Version of the NTIA `preselector` package. """ @@ -134,6 +135,7 @@ class Software(msgspec.Struct, **SIGMF_OBJECT_KWARGS): python_version: Optional[str] = None scos_sensor_version: Optional[str] = None scos_actions_version: Optional[str] = None + scos_tekrsa_version: Optional[str] = None preselector_api_version: Optional[str] = None From 8d3e8e35e34e802c726e3ff6829288a6f54ce2a6 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Wed, 18 Oct 2023 16:53:06 -0400 Subject: [PATCH 04/10] Remove unused ntia_sensor metadata from SEA action --- scos_actions/actions/acquire_sea_data_product.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/scos_actions/actions/acquire_sea_data_product.py b/scos_actions/actions/acquire_sea_data_product.py index 4b541dc9..70cc914f 100644 --- a/scos_actions/actions/acquire_sea_data_product.py +++ b/scos_actions/actions/acquire_sea_data_product.py @@ -823,22 +823,6 @@ def create_global_sensor_metadata(self): ntia_sensor.Sensor( sensor_spec=ntia_core.HardwareSpec( id=self.sensor_definition["sensor_spec"]["id"], - version=self.sensor_definition["sensor_spec"]["version"], - ), - preselector=ntia_sensor.Preselector( - preselector_spec=ntia_core.HardwareSpec( - id=self.sensor_definition["preselector"]["preselector_spec"][ - "id" - ] - ) - ), - signal_analyzer=ntia_sensor.SignalAnalyzer( - sigan_spec=ntia_core.HardwareSpec( - id=self.sensor_definition["signal_analyzer"]["sigan_spec"]["id"] - ) - ), - computer_spec=ntia_sensor.HardwareSpec( - id=self.sensor_definition["computer_spec"]["id"] ), sensor_sha512=SENSOR_DEFINITION_HASH, ) From e41576f154d395c2b96d2c45ec72d98bd7f3ccd2 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Wed, 18 Oct 2023 15:49:53 -0600 Subject: [PATCH 05/10] Update and run pre-commit hooks --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d9d65765..6d0c9f36 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ default_language_version: python: python3.8 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-ast types: [file, python] @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/asottile/pyupgrade - rev: v3.10.1 + rev: v3.15.0 hooks: - id: pyupgrade args: ["--py38-plus"] @@ -30,12 +30,12 @@ repos: types: [file, python] args: ["--profile", "black", "--filter-files", "--gitignore"] - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.10.0 hooks: - id: black types: [file, python] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.35.0 + rev: v0.37.0 hooks: - id: markdownlint types: [file, markdown] From 6df5620691bfe28ca7a3e5485584df09276bde20 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Thu, 19 Oct 2023 09:52:09 -0400 Subject: [PATCH 06/10] remove confusing, unused iteration variable --- scos_actions/actions/acquire_sea_data_product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scos_actions/actions/acquire_sea_data_product.py b/scos_actions/actions/acquire_sea_data_product.py index 70cc914f..507cf501 100644 --- a/scos_actions/actions/acquire_sea_data_product.py +++ b/scos_actions/actions/acquire_sea_data_product.py @@ -575,7 +575,7 @@ def __call__(self, schedule_entry, task_id): [], ) result_tic = perf_counter() - for i, channel_data_process in enumerate(dp_procs): + for channel_data_process in dp_procs: # Retrieve object references for channel data channel_data_refs = ray.get(channel_data_process) channel_data = [] From 88b564ac8b8e51011d54b9498fa7f00cb5c5ab50 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Thu, 19 Oct 2023 09:58:07 -0400 Subject: [PATCH 07/10] fix broken signalanalyzer metadata struct --- scos_actions/metadata/structs/ntia_sensor.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/scos_actions/metadata/structs/ntia_sensor.py b/scos_actions/metadata/structs/ntia_sensor.py index 263c6754..c57f605f 100644 --- a/scos_actions/metadata/structs/ntia_sensor.py +++ b/scos_actions/metadata/structs/ntia_sensor.py @@ -31,20 +31,6 @@ class SignalAnalyzer(msgspec.Struct, **SIGMF_OBJECT_KWARGS): max_power: Optional[float] = None a2d_bits: Optional[int] = None - def __post_init__(self): - super().__post_init__() - # Define SigMF key names - self.obj_keys.update( - { - "sigan_spec": "sigan_spec", - "frequency_low": "frequency_low", - "frequency_high": "frequency_high", - "noise_figure": "noise_figure", - "max_power": "max_power", - "a2d_bits": "a2d_bits", - } - ) - class CalSource( msgspec.Struct, rename={"cal_source_type": "type"}, **SIGMF_OBJECT_KWARGS From f5b16092ea398656712912d90f4c39cb7d8c57b5 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Thu, 19 Oct 2023 11:50:36 -0400 Subject: [PATCH 08/10] Add plugin_version abstractmethod property to sigan interface --- scos_actions/hardware/mocks/mock_sigan.py | 6 ++++++ scos_actions/hardware/sigan_iface.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/scos_actions/hardware/mocks/mock_sigan.py b/scos_actions/hardware/mocks/mock_sigan.py index d6a18287..3da60c9c 100644 --- a/scos_actions/hardware/mocks/mock_sigan.py +++ b/scos_actions/hardware/mocks/mock_sigan.py @@ -4,6 +4,7 @@ import numpy as np +from scos_actions import __version__ as SCOS_ACTIONS_VERSION from scos_actions.hardware.sigan_iface import SignalAnalyzerInterface from scos_actions.utils import get_datetime_str_now @@ -36,6 +37,7 @@ def __init__(self, randomize_values=False): self._overload = False self._capture_time = None self._is_available = True + self._plugin_version = SCOS_ACTIONS_VERSION # Simulate returning less than the requested number of samples from # self.recv_num_samps @@ -49,6 +51,10 @@ def __init__(self, randomize_values=False): @property def is_available(self): return self._is_available + + @property + def plugin_version(self): + return self._plugin_version @property def sample_rate(self): diff --git a/scos_actions/hardware/sigan_iface.py b/scos_actions/hardware/sigan_iface.py index 0f525a4b..99e25ab9 100644 --- a/scos_actions/hardware/sigan_iface.py +++ b/scos_actions/hardware/sigan_iface.py @@ -64,6 +64,12 @@ def is_available(self) -> bool: """Returns True if sigan is initialized and ready for measurements.""" pass + @property + @abstractmethod + def plugin_version(self) -> str: + """Returns the version of the SCOS plugin defining this interface.""" + pass + @abstractmethod def acquire_time_domain_samples( self, From fc358424af1c30828316bb5a09a8cd39c8462705 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Thu, 19 Oct 2023 09:53:10 -0600 Subject: [PATCH 09/10] run pre-commit --- scos_actions/hardware/mocks/mock_sigan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scos_actions/hardware/mocks/mock_sigan.py b/scos_actions/hardware/mocks/mock_sigan.py index 3da60c9c..b1e82bca 100644 --- a/scos_actions/hardware/mocks/mock_sigan.py +++ b/scos_actions/hardware/mocks/mock_sigan.py @@ -51,7 +51,7 @@ def __init__(self, randomize_values=False): @property def is_available(self): return self._is_available - + @property def plugin_version(self): return self._plugin_version From 2991bbc36768a52e534dfdbb90343f5af24f8e80 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello Date: Thu, 19 Oct 2023 12:01:47 -0400 Subject: [PATCH 10/10] Bump version to 6.4.0 --- scos_actions/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scos_actions/__init__.py b/scos_actions/__init__.py index 76d9e7ee..f0a00b37 100644 --- a/scos_actions/__init__.py +++ b/scos_actions/__init__.py @@ -1 +1 @@ -__version__ = "6.3.4" +__version__ = "6.4.0"