Skip to content

Python 3.13 and 3.14 Support - #3383

Merged
bryan-harter merged 5 commits into
IMAP-Science-Operations-Center:devfrom
leowerneck:lw/issue3085
Aug 20, 2026
Merged

Python 3.13 and 3.14 Support#3383
bryan-harter merged 5 commits into
IMAP-Science-Operations-Center:devfrom
leowerneck:lw/issue3085

Conversation

@leowerneck

Copy link
Copy Markdown
Contributor

Change Summary

Closes #3085.

Overview

This PR addresses issues raised on #3334 regarding version pinning of sammi-cdf and pandas by building on #3381 and #3382.

@leowerneck leowerneck added this to the August 2026 milestone Aug 11, 2026
@leowerneck leowerneck self-assigned this Aug 12, 2026
@bryan-harter
bryan-harter requested review from lacoak21 and tech3371 and a balanced review from Copilot August 13, 2026 17:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Python 3.13/3.14 support while incorporating pandas 3 compatibility and CoDICE metadata fixes.

Changes:

  • Expands supported Python versions and CI coverage.
  • Updates pandas/xarray compatibility across processing paths.
  • Refreshes dependencies, metadata, and regression tests.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/test.yml Expands Python and action versions.
imap_processing/_version.py Updates generated version metadata.
imap_processing/ccsds/excel_to_xtce.py Avoids pandas mixed-type assignment.
imap_processing/cdf/config/imap_codice_l2-hi-direct-events_variable_attrs.yaml Adds axis label.
imap_processing/cdf/config/imap_codice_l2-lo-direct-events_variable_attrs.yaml Adds axis label.
imap_processing/cdf/utils.py Converts extension arrays for CDF output.
imap_processing/ialirt/l0/process_swe.py Uses direct record filtering.
imap_processing/ialirt/utils/grouping.py Uses direct group indexing.
imap_processing/idex/idex_l1b.py Preserves missing trigger modes.
imap_processing/tests/cdf/test_imap_cdf_manager.py Tests CoDICE labels.
imap_processing/tests/cdf/test_utils.py Tests extension-array conversion.
imap_processing/tests/ialirt/unit/test_process_swapi.py Uses writable test arrays.
imap_processing/tests/mag/test_mag_l2.py Prevents fixture mutation.
imap_processing/tests/swapi/test_swapi_l1.py Declares explicit dimensions.
imap_processing/tests/ultra/unit/test_lookup_utils.py Updates lookup assertion.
imap_processing/tests/ultra/unit/test_ultra_l1b_culling.py Declares explicit dimensions.
imap_processing/ultra/l1b/lookup_utils.py Returns NumPy lookup results.
poetry.lock Refreshes resolved dependencies.
pyproject.toml Declares Python 3.13/3.14 support.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/test.yml
FIELDNAM: Number of Events
FILLVAL: *uint16_fillval
FORMAT: I5
LABLAXIS: Number of Events

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By CDF metadata standard, metadata should only have one, either LABLAXIS or LABL_PTR_1. Because of that, we didn't add LABLAXIS when there is LABL_PTR_1. At one point, I went through CDF metadata requirement and documented what applies to us here https://imap-processing.readthedocs.io/en/latest/cdf-metadata/cdf_requirements.html.

If SAMMI is throwing error or etc, that could be because it doesn't check to that detail yet still. Please apply this same suggestion to other places

Suggested change
LABLAXIS: Number of Events

To get around that issue, we have been setting check_schema=False when needed to not see that error. I think the intention is that SAMMI will handle these requirement in the future.

cdflib_logger.setLevel(logging.ERROR)
xarray_to_cdf(dataset, str(file_path), **extra_cdf_kwargs)
xarray_to_cdf(
_cdf_compatible_dataset(dataset),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed to support python version 13 and 14?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, no. This PR should've arguably been deferred until the sammi-cdf and Pandas 3 support PRs had already been merged, as it builds on both of them. That is basically a required conversion because cdflib does not currently support Pandas 3. There is a brief discussion about that in #3382.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laspsandoval tagging to make sure these I-ALiRT changes looks good.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may not need this test

@leowerneck

Copy link
Copy Markdown
Contributor Author

@tech3371 I apologize again for the confusion. I have cleaned up this PR substantially now that #3381 and #3382 were merged. Since your comments were relevant to those PRs, new issues might have to be opened to address them.

@bryan-harter
bryan-harter requested a balanced review from Copilot August 20, 2026 20:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

.github/workflows/test.yml:16

  • Adding 3.14 here leaves the separate Pandas 3 compatibility matrix at lines 86–89 testing only 3.11 and 3.12, even though it explicitly intends to bracket the oldest and newest supported versions. The blocking 3.14 jobs use locked pandas 2.3.3, so the supported Python 3.14 + pandas 3 combination is never exercised. Update that compatibility matrix's newest entry to 3.14.
        python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

@leowerneck

Copy link
Copy Markdown
Contributor Author

Good catch! Fixed.

@bryan-harter

Copy link
Copy Markdown
Member

I don't really understand the codecov failures, but I can overwrite and merge as soon as the tests complete.

@bryan-harter
bryan-harter merged commit efb91fb into IMAP-Science-Operations-Center:dev Aug 20, 2026
22 checks passed
@leowerneck
leowerneck deleted the lw/issue3085 branch August 21, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Python 3.13

5 participants