diff --git a/scos_actions/actions/acquire_sea_data_product.py b/scos_actions/actions/acquire_sea_data_product.py index 43d57ba5..5ffd6979 100644 --- a/scos_actions/actions/acquire_sea_data_product.py +++ b/scos_actions/actions/acquire_sea_data_product.py @@ -25,6 +25,7 @@ import platform import sys from enum import EnumMeta +from environs import Env from time import perf_counter from typing import Tuple @@ -77,6 +78,7 @@ from scos_actions.status import start_time from scos_actions.utils import convert_datetime_to_millisecond_iso_format, get_days_up +env = Env() logger = logging.getLogger(__name__) if not ray.is_initialized(): @@ -791,6 +793,7 @@ def capture_diagnostics(self, action_start_tic: float, cpu_speeds: list) -> None software_diag = { "system_platform": platform.platform(), "python_version": sys.version.split()[0], + "scos_sensor_version": env("SCOS_SENSOR_GIT_TAG", "unknown"), "scos_actions_version": SCOS_ACTIONS_VERSION, "preselector_api_version": PRESELECTOR_API_VERSION, } diff --git a/scos_actions/metadata/structs/ntia_diagnostics.py b/scos_actions/metadata/structs/ntia_diagnostics.py index 279bd81d..35dce19c 100644 --- a/scos_actions/metadata/structs/ntia_diagnostics.py +++ b/scos_actions/metadata/structs/ntia_diagnostics.py @@ -125,12 +125,14 @@ class Software(msgspec.Struct, **SIGMF_OBJECT_KWARGS): :param system_platform: The underlying platform, as returned by `platform.platform()` :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 preselector_api_version: Version of the NTIA `preselector` package. """ system_platform: Optional[str] = None python_version: Optional[str] = None + scos_sensor_version: Optional[str] = None scos_actions_version: Optional[str] = None preselector_api_version: Optional[str] = None