Python 3.13 and 3.14 Support - #3383
Conversation
0fe173c to
df131ff
Compare
There was a problem hiding this comment.
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.
| FIELDNAM: Number of Events | ||
| FILLVAL: *uint16_fillval | ||
| FORMAT: I5 | ||
| LABLAXIS: Number of Events |
There was a problem hiding this comment.
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
| 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), |
There was a problem hiding this comment.
is this needed to support python version 13 and 14?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@laspsandoval tagging to make sure these I-ALiRT changes looks good.
3c06931 to
8d7c442
Compare
There was a problem hiding this comment.
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']
|
Good catch! Fixed. |
|
I don't really understand the codecov failures, but I can overwrite and merge as soon as the tests complete. |
efb91fb
into
IMAP-Science-Operations-Center:dev
Change Summary
Closes #3085.
Overview
This PR addresses issues raised on #3334 regarding version pinning of
sammi-cdfandpandasby building on #3381 and #3382.