Python 3.13 and 3.14 Support - #3383
Conversation
…py(copy=True) when array is mutated, supporting Pandas 3
…py(copy=True) when array is mutated, supporting Pandas 3
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.
| 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'] |
There was a problem hiding this comment.
@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?
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
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 |
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.
@laspsandoval tagging to make sure these I-ALiRT changes looks good.
Change Summary
Closes #3085.
Overview
This PR addresses issues raised on #3334 regarding version pinning of
sammi-cdfandpandasby building on #3381 and #3382.