From a8b7ea3aed5bf16189ca5e45b92458cd2ced13aa Mon Sep 17 00:00:00 2001 From: Leo Werneck Date: Tue, 11 Aug 2026 16:21:04 -0400 Subject: [PATCH 1/3] sammi-cdf: updated YAML files and pyproject.toml to make CI more robust --- imap_processing/_version.py | 4 ++-- ..._codice_l2-hi-direct-events_variable_attrs.yaml | 2 +- ..._codice_l2-lo-direct-events_variable_attrs.yaml | 2 +- imap_processing/tests/cdf/test_imap_cdf_manager.py | 14 ++++++++++++++ poetry.lock | 10 +++++----- pyproject.toml | 2 +- 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/imap_processing/_version.py b/imap_processing/_version.py index 31a9c8e8e6..7aeb729b74 100644 --- a/imap_processing/_version.py +++ b/imap_processing/_version.py @@ -1,3 +1,3 @@ # These version placeholders will be replaced later during substitution. -__version__ = "1.0.35.post11.dev0+ed24bc01" -__version_tuple__ = (1, 0, 35, "post11", "dev0", "ed24bc01") +__version__ = "1.0.36.post2.dev0+6f06f337" +__version_tuple__ = (1, 0, 36, "post2", "dev0", "6f06f337") diff --git a/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml b/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml index eadc5c20c1..da1cf58740 100644 --- a/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml +++ b/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml @@ -78,7 +78,7 @@ num_events: FIELDNAM: Number of Events FILLVAL: *uint16_fillval FORMAT: I5 - LABL_PTR_1: priority_label + LABLAXIS: Number of Events SCALETYP: linear UNITS: " " VALIDMAX: 10000 diff --git a/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml b/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml index 8637095680..ff7648938a 100644 --- a/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml +++ b/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml @@ -77,7 +77,7 @@ num_events: FIELDNAM: Number of Events FILLVAL: *uint16_fillval FORMAT: I5 - LABL_PTR_1: priority_label + LABLAXIS: Number of Events SCALETYP: linear UNITS: " " VALIDMAX: 10000 diff --git a/imap_processing/tests/cdf/test_imap_cdf_manager.py b/imap_processing/tests/cdf/test_imap_cdf_manager.py index 86985a8c70..6278e69be0 100644 --- a/imap_processing/tests/cdf/test_imap_cdf_manager.py +++ b/imap_processing/tests/cdf/test_imap_cdf_manager.py @@ -1,5 +1,7 @@ from pathlib import Path +import pytest + # from imap_processing.cdf.cdf_attribute_manager import CdfAttributeManager from imap_processing.cdf.imap_cdf_manager import ImapCdfAttributes @@ -50,3 +52,15 @@ def test_add_instrument_variable_attrs(): == "Time, number of nanoseconds since J2000 with leap seconds included" ) assert instrument2_instrument["UNITS"] == "ns" + + +@pytest.mark.parametrize("level", ["l2-lo-direct-events", "l2-hi-direct-events"]) +def test_codice_direct_events_num_events_axis_label(level): + """Ensure the one-dimensional num_events spectrogram uses an axis label.""" + attributes = ImapCdfAttributes() + attributes.add_instrument_variable_attrs("codice", level) + + num_events_attrs = attributes.get_variable_attributes("num_events") + + assert num_events_attrs["LABLAXIS"] == "Number of Events" + assert "LABL_PTR_1" not in num_events_attrs diff --git a/poetry.lock b/poetry.lock index bba858f46a..2bdaea2992 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.3.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. [[package]] name = "accessible-pygments" @@ -1898,13 +1898,13 @@ files = [ [[package]] name = "sammi-cdf" -version = "1.0.0" -description = "A Python package to support metadata attriubte management for Space Weather data processing pipelines." +version = "1.1.0" +description = "A Python package to support metadata attribute management for Space Weather data processing pipelines." optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "sammi_cdf-1.0.0.tar.gz", hash = "sha256:dec77b2d2ae45dae32540f7db7b74b4444d22e73ce3e0e346342f36360f02f89"}, + {file = "sammi_cdf-1.1.0.tar.gz", hash = "sha256:bca307d08fe734235bafcdecae70288c3384a20f0e906eba1cf561cfd18e1d03"}, ] [package.dependencies] @@ -2428,4 +2428,4 @@ tools = ["openpyxl", "pandas"] [metadata] lock-version = "2.1" python-versions = ">=3.10,<3.13" -content-hash = "dc258d9186f0ec542145c7ed4509781ad87b789cc23a5e8cb0acf2e3ee811d18" +content-hash = "3eb041e4ac28d41a31428549d80f8c2bc2961877588d80a443396d72827957c2" diff --git a/pyproject.toml b/pyproject.toml index c2522d9f86..a199329f34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ "spiceypy>=6.0.0", "xarray>=2024.10.0,<2026", "numpy>=2,<3", - "sammi-cdf>=1.0,<2", + "sammi-cdf>=1.0.2,<2", "scipy>=1.13,<2" ] From 232a50bd7e05a7afb21be8900c0bbbe3fa13bf38 Mon Sep 17 00:00:00 2001 From: Leo Werneck Date: Wed, 12 Aug 2026 14:54:26 -0400 Subject: [PATCH 2/3] Restored LABL_PTR_1 label --- .../config/imap_codice_l2-hi-direct-events_variable_attrs.yaml | 1 + .../config/imap_codice_l2-lo-direct-events_variable_attrs.yaml | 1 + imap_processing/tests/cdf/test_imap_cdf_manager.py | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml b/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml index da1cf58740..2c1eec8475 100644 --- a/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml +++ b/imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml @@ -79,6 +79,7 @@ num_events: FILLVAL: *uint16_fillval FORMAT: I5 LABLAXIS: Number of Events + LABL_PTR_1: priority_label SCALETYP: linear UNITS: " " VALIDMAX: 10000 diff --git a/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml b/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml index ff7648938a..8fabd21961 100644 --- a/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml +++ b/imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml @@ -78,6 +78,7 @@ num_events: FILLVAL: *uint16_fillval FORMAT: I5 LABLAXIS: Number of Events + LABL_PTR_1: priority_label SCALETYP: linear UNITS: " " VALIDMAX: 10000 diff --git a/imap_processing/tests/cdf/test_imap_cdf_manager.py b/imap_processing/tests/cdf/test_imap_cdf_manager.py index 6278e69be0..1b5a6f7417 100644 --- a/imap_processing/tests/cdf/test_imap_cdf_manager.py +++ b/imap_processing/tests/cdf/test_imap_cdf_manager.py @@ -63,4 +63,3 @@ def test_codice_direct_events_num_events_axis_label(level): num_events_attrs = attributes.get_variable_attributes("num_events") assert num_events_attrs["LABLAXIS"] == "Number of Events" - assert "LABL_PTR_1" not in num_events_attrs From 6c24f1cd550cdb2dcf8395898bf66e3f3c7e54c3 Mon Sep 17 00:00:00 2001 From: Leo Werneck Date: Wed, 12 Aug 2026 15:56:42 -0400 Subject: [PATCH 3/3] imap_processing/_version.py: restored dev version --- imap_processing/_version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imap_processing/_version.py b/imap_processing/_version.py index 7aeb729b74..31a9c8e8e6 100644 --- a/imap_processing/_version.py +++ b/imap_processing/_version.py @@ -1,3 +1,3 @@ # These version placeholders will be replaced later during substitution. -__version__ = "1.0.36.post2.dev0+6f06f337" -__version_tuple__ = (1, 0, 36, "post2", "dev0", "6f06f337") +__version__ = "1.0.35.post11.dev0+ed24bc01" +__version_tuple__ = (1, 0, 35, "post11", "dev0", "ed24bc01")