Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@ on:
branches:
- dev
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
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']
Comment thread
bryan-harter marked this conversation as resolved.
defaults:
run:
shell: bash


steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# We need the full history to generate the proper version number
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v9
Expand All @@ -40,7 +41,7 @@ jobs:
poetry install --extras "test"

- name: Cache data directories
uses: actions/cache@v4
uses: actions/cache@v6
# We only download data on this runner, so only cache data from this run
# so we don't get an empty cache on other runners overriding that data
if: ${{ contains(matrix.os, 'ubuntu') && matrix.python-version == '3.10' }}
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
# The first Python version below is the oldest version with Pandas 3
# support that is also supported by IMAP, while the second is the
# newest Python version supported by IMAP.
python-version: ['3.11', '3.12']
python-version: ['3.11', '3.14']
defaults:
run:
shell: bash
Expand Down
5 changes: 3 additions & 2 deletions imap_processing/tests/cdf/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ def test_write_cdf_extra_cdf_kwargs(test_dataset):


def test_write_cdf_converts_extension_array(test_dataset):
"""Convert extension arrays for cdflib without changing the input dataset."""
"""Pass NumPy string data to cdflib without changing the input dataset."""
test_dataset["labels"] = (
"label",
pd.array(["first", "second"], dtype="string"),
)
original_data = test_dataset["labels"].data

with mock.patch(
"imap_processing.cdf.utils.xarray_to_cdf", autospec=True
Expand All @@ -156,7 +157,7 @@ def test_write_cdf_converts_extension_array(test_dataset):
converted_dataset = xarray_to_cdf.call_args.args[0]
assert isinstance(converted_dataset["labels"].data, np.ndarray)
np.testing.assert_array_equal(converted_dataset["labels"], ["first", "second"])
assert isinstance(test_dataset["labels"].data, pd.api.extensions.ExtensionArray)
assert test_dataset["labels"].data is original_data


@pytest.mark.parametrize(
Expand Down
3 changes: 2 additions & 1 deletion imap_processing/tests/ultra/unit/test_lookup_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def test_get_egy_norm(ancillary_files):
np.array([2]), np.array([2]), ancillary_files
)

assert int(norm_composite_energy) == egy_norm_df.iloc[2 * 4096 + 2]["NormEnergy"]
expected_energy = egy_norm_df.iloc[2 * 4096 + 2]["NormEnergy"]
np.testing.assert_array_equal(norm_composite_energy, [expected_energy])


@pytest.mark.external_test_data
Expand Down
Loading
Loading