Skip to content

Python 3.13 and 3.14 Support - #3383

Open
leowerneck wants to merge 8 commits into
IMAP-Science-Operations-Center:devfrom
leowerneck:lw/issue3085
Open

Python 3.13 and 3.14 Support#3383
leowerneck wants to merge 8 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.

matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@leowerneck - it may be better to have a CI workflow parallel to the current testing but with poetry lock --regenerate so it tests stuff with floating dependencies, so we can catch these things early on. Perhaps continue-on-error: true so it doesn't alarm PR submitters?

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.

@vineetbansal - I think your suggestion makes a lot of sense. What are your thoughts on running the floating-dependency tests against the oldest and newest supported Python versions? I think that could be a good way to catch errors that a single job with poetry lock --regenerate might overlook. I also like the continue-on-error: true suggestion.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes that's a good idea. I think I've indeed seen in other projects that you can get away with just testing on the oldest and newest supported pythons to bracket a floating dependency issue, reducing CI time in the process.

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

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

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

4 participants