Skip to content

Commit d8d91e1

Browse files
Drop Python 3.9 support (#720)
1 parent 27396e5 commit d8d91e1

File tree

9 files changed

+12
-13
lines changed

9 files changed

+12
-13
lines changed

.github/workflows/build_workflow.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
- name: Checkout Code Repository
3737
uses: actions/checkout@v3
3838

39-
- name: Set up Python 3.10
39+
- name: Set up Python 3.11
4040
uses: actions/setup-python@v3
4141
with:
42-
python-version: "3.10"
42+
python-version: "3.11"
4343

4444
- name: Install and Run Pre-commit
4545
uses: pre-commit/[email protected]
@@ -55,7 +55,7 @@ jobs:
5555
shell: bash -l {0}
5656
strategy:
5757
matrix:
58-
python-version: ["3.9", "3.10", "3.11", "3.12"]
58+
python-version: ["3.10", "3.11", "3.12"]
5959
steps:
6060
- uses: actions/checkout@v3
6161

conda-env/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ channels:
66
dependencies:
77
# Base - required for building the package.
88
# =========================================
9-
- python >=3.9
9+
- python >=3.10
1010
- cf_xarray >=0.9.1
1111
- cftime
1212
- dask

conda-env/dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ channels:
66
dependencies:
77
# Base - required for building the package.
88
# =========================================
9-
- python >=3.9
9+
- python >=3.10
1010
- cf_xarray >=0.9.1
1111
- cftime
1212
- dask

docs/getting-started-guide/installation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Instructions
6666

6767
We recommend using the Conda environment creation procedure to install ``xcdat``.
6868
The advantage with following this approach is that Conda will attempt to resolve
69-
dependencies (e.g. ``python >= 3.9``) for compatibility.
69+
dependencies for compatibility.
7070

7171
To create an ``xcdat`` Conda environment, run:
7272

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "xcdat"
77
dynamic = ["version"]
88
description = "Xarray Climate Data Analysis Tools"
99
readme = "README.rst"
10-
requires-python = ">=3.9"
10+
requires-python = ">=3.10"
1111
license = { text = "Apache-2.0" }
1212
authors = [{ name = "xCDAT developers" }]
1313
classifiers = [
@@ -16,7 +16,6 @@ classifiers = [
1616
"License :: OSI Approved :: Apache-2.0 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",
2221
"Programming Language :: Python :: 3.12",

tests/test_regrid.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -664,10 +664,10 @@ def test_map_latitude_coarse_to_fine(self):
664664
[[0.29289322]],
665665
]
666666

667-
for x, y in zip(mapping, expected_mapping):
667+
for x, y in zip(mapping, expected_mapping, strict=False):
668668
np.testing.assert_allclose(x, y)
669669

670-
for x2, y2 in zip(weights, expected_weigths):
670+
for x2, y2 in zip(weights, expected_weigths, strict=False):
671671
np.testing.assert_allclose(x2, y2)
672672

673673
def test_map_latitude_fine_to_coarse(self):

xcdat/dataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def _get_cftime_coords(offsets: np.ndarray, units: str, calendar: str) -> np.nda
652652

653653
# Convert offsets to `np.float64` to avoid "TypeError: unsupported type
654654
# for timedelta days component: numpy.int64".
655-
flat_offsets = flat_offsets.astype("float")
655+
flat_offsets = flat_offsets.astype("float") # type: ignore
656656

657657
# We don't need to do calendar arithmetic here because the units and
658658
# offsets are in "months" or "years", which means leap days should not

xcdat/regridder/grid.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _create_gaussian_axis(nlats: int) -> Tuple[xr.DataArray, xr.DataArray]:
140140
},
141141
)
142142

143-
bounds = (180.0 / np.pi) * np.arcsin(bounds)
143+
bounds = (180.0 / np.pi) * np.arcsin(bounds) # type: ignore
144144

145145
bounds_data = np.zeros((points.shape[0], 2))
146146
bounds_data[:, 0] = bounds[:-1]

xcdat/temporal.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1892,7 +1892,7 @@ def _convert_df_to_dt(self, df: pd.DataFrame) -> np.ndarray:
18921892
dates = [
18931893
self.date_type(year, month, day, hour)
18941894
for year, month, day, hour in zip(
1895-
df_new.year, df_new.month, df_new.day, df_new.hour
1895+
df_new.year, df_new.month, df_new.day, df_new.hour, strict=False
18961896
)
18971897
]
18981898

0 commit comments

Comments
 (0)