Skip to content

Commit 346595b

Browse files
authored
Merge pull request #99 from chrishavlin/drop_py39
drop py39 support, explicitly add 3.12
2 parents 5e198e3 + e2978b9 commit 346595b

File tree

8 files changed

+38
-17
lines changed

8 files changed

+38
-17
lines changed

.github/workflows/check-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
name: twinecheck
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
1010
- name: Set up Python
11-
uses: actions/setup-python@v4
11+
uses: actions/setup-python@v5
1212
with:
1313
python-version: '3.10'
1414
- name: Install dependencies

.github/workflows/check-manifest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout Source
10-
uses: actions/checkout@v3
10+
uses: actions/checkout@v4
1111
- name: Setup Python
12-
uses: actions/setup-python@v4
12+
uses: actions/setup-python@v5
1313
with:
1414
python-version: '3.10'
1515
- name: install check-manifest

.github/workflows/create-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
- name: Create Release
1818
id: create_release
1919
uses: actions/create-release@v1

.github/workflows/publish-to-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: startsWith(github.ref, 'refs/tags')
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
- name: Set up Python 3.10
17-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: '3.10'
2020
- name: Install dependencies

.github/workflows/run-pytest-tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@ jobs:
99
strategy:
1010
matrix:
1111
platform: [ubuntu-latest, windows-latest, macos-latest]
12-
python-version: ['3.9', '3.10', '3.11']
12+
python-version: ['3.10', '3.11', '3.12']
1313

1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: ${{ matrix.python-version }}
2020
- name: Setup yt_xarray
2121
run: |
2222
python -m pip install --upgrade pip
2323
python -m pip install -e .[full,test]
24+
- name: List installed deps
25+
run: pip list
2426
- name: Run Tests
25-
run: pytest --cov=./ --cov-report=html
27+
run: pytest --cov=./ --cov-report=html --color=yes yt_xarray
2628

2729
- name: Upload coverage report
2830
if: (matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11')

.github/workflows/weekly-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
python-version: ['3.10']
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323
- name: Setup yt_xarray

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ authors = [
99
]
1010
description="interface between yt and xarray"
1111
readme = "README.md"
12-
requires-python = ">=3.9"
12+
requires-python = ">=3.10"
1313
classifiers = [
1414
"Development Status :: 4 - Beta",
1515
"Intended Audience :: Developers",
1616
"License :: OSI Approved :: MIT License",
1717
"Natural Language :: English",
1818
"Programming Language :: Python :: 3",
19-
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
2222
]
2323
dependencies=['yt>=4.2.0', 'h5py>=3.4.0', 'pooch>=1.5.1', 'xarray']
2424
dynamic = ["version"]

yt_xarray/tests/test_xr_to_yt.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,23 @@ def test_reversed_axis(stretched, use_callable, chunksizes):
537537
assert np.all(np.isfinite(vals))
538538

539539

540+
def _invalid_nc4_windows():
541+
import sys
542+
543+
import netCDF4
544+
545+
nc4_v = netCDF4.__version__
546+
return "1.7.1" in nc4_v and sys.platform.startswith("win")
547+
548+
540549
def test_cf_xarray_disambiguation():
541-
from cf_xarray.datasets import airds
542550

551+
if _invalid_nc4_windows():
552+
# https://github.com/Unidata/netcdf4-python/issues/1373
553+
# https://github.com/data-exp-lab/yt_xarray/pull/99
554+
pytest.skip("Known nc4, windows endian issue.")
555+
556+
airds = xr.tutorial.open_dataset("air_temperature")
543557
# run the whole selection (will internally run coord disambiguation)
544558
sel = xr2yt.Selection(
545559
airds, fields=["air"], sel_dict={"time": 0}, sel_dict_type="isel"
@@ -554,7 +568,12 @@ def test_cf_xarray_disambiguation():
554568

555569

556570
def test_missing_cfxarray(monkeypatch):
557-
from cf_xarray.datasets import airds
571+
if _invalid_nc4_windows():
572+
# https://github.com/Unidata/netcdf4-python/issues/1373
573+
# https://github.com/data-exp-lab/yt_xarray/pull/99
574+
pytest.skip("Known nc4, windows endian issue.")
575+
576+
airds = xr.tutorial.open_dataset("air_temperature")
558577

559578
def _bad_import(name, globals=None, locals=None, fromlist=(), level=0):
560579
raise ImportError

0 commit comments

Comments
 (0)