Skip to content

Commit 4c63119

Browse files
authored
Drop Python 3.8 (#166)
* Drop Python 3.8 * Update pre-commit * Lint
1 parent d0d4327 commit 4c63119

File tree

8 files changed

+8
-17
lines changed

8 files changed

+8
-17
lines changed

.github/workflows/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
python-version: ["3.8", "3.9", "3.10"]
21+
python-version: ["3.9", "3.10"]
2222
steps:
2323
- uses: actions/checkout@v3
2424
- name: Setup Python
@@ -50,7 +50,7 @@ jobs:
5050
runs-on: ubuntu-latest
5151
strategy:
5252
matrix:
53-
python-version: ["3.8", "3.10"]
53+
python-version: ["3.9", "3.10"]
5454
steps:
5555
- uses: actions/checkout@v3
5656
- name: Setup Python

.github/workflows/pypi-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/setup-python@v4.5.0
2323
name: Install Python
2424
with:
25-
python-version: 3.8
25+
python-version: 3.10
2626

2727
- name: Install dependencies
2828
run: |
@@ -65,7 +65,7 @@ jobs:
6565
- uses: actions/setup-python@v4.5.0
6666
name: Install Python
6767
with:
68-
python-version: 3.8
68+
python-version: 3.10
6969
- uses: actions/download-artifact@v3
7070
with:
7171
name: releases

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: check-yaml
1515

1616
- repo: https://github.com/psf/black
17-
rev: 22.12.0
17+
rev: 23.1.0
1818
hooks:
1919
- id: black-jupyter
2020

@@ -27,7 +27,7 @@ repos:
2727
hooks:
2828
- id: seed-isort-config
2929
- repo: https://github.com/PyCQA/isort
30-
rev: 5.11.4
30+
rev: 5.12.0
3131
hooks:
3232
- id: isort
3333

ci/requirements/doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- nodefaults
55
dependencies:
6-
- python=3.8
6+
- python=3.9
77
- dask
88
- pydata-sphinx-theme
99
- ipython

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ description = "Batch generation from Xarray objects"
1111
readme = "README.rst"
1212
license = {text = "Apache"}
1313
authors = [{name = "xbatcher Developers", email = "rpa@ldeo.columbia.edu"}]
14-
requires-python = ">=3.8"
14+
requires-python = ">=3.9"
1515
classifiers = [
1616
"Development Status :: 4 - Beta",
1717
"License :: OSI Approved :: Apache Software License",
1818
"Operating System :: OS Independent",
1919
"Intended Audience :: Science/Research",
2020
"Programming Language :: Python",
2121
"Programming Language :: Python :: 3",
22-
"Programming Language :: Python :: 3.8",
2322
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Topic :: Scientific/Engineering",

xbatcher/generators.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ def __init__(
380380
concat_input_dims: bool = False,
381381
preload_batch: bool = True,
382382
):
383-
384383
self.ds = ds
385384
self._batch_selectors: BatchSchema = BatchSchema(
386385
ds,
@@ -419,7 +418,6 @@ def __len__(self) -> int:
419418
return len(self._batch_selectors.selectors)
420419

421420
def __getitem__(self, idx: int) -> Union[xr.Dataset, xr.DataArray]:
422-
423421
if not isinstance(idx, int):
424422
raise NotImplementedError(
425423
f"{type(self).__name__}.__getitem__ currently requires a single integer key"
@@ -429,7 +427,6 @@ def __getitem__(self, idx: int) -> Union[xr.Dataset, xr.DataArray]:
429427
idx = list(self._batch_selectors.selectors)[idx]
430428

431429
if idx in self._batch_selectors.selectors:
432-
433430
if self.concat_input_dims:
434431
new_dim_suffix = "_input"
435432
all_dsets: List = []

xbatcher/tests/test_keras_loaders.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def ds_xy():
2525

2626

2727
def test_custom_dataarray(ds_xy):
28-
2928
x = ds_xy["x"]
3029
y = ds_xy["y"]
3130

@@ -46,7 +45,6 @@ def test_custom_dataarray(ds_xy):
4645

4746

4847
def test_custom_dataarray_with_transform(ds_xy):
49-
5048
x = ds_xy["x"]
5149
y = ds_xy["y"]
5250

xbatcher/tests/test_torch_loaders.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def ds_xy():
3232
],
3333
)
3434
def test_map_dataset(ds_xy, x_var, y_var):
35-
3635
x = ds_xy[x_var]
3736
y = ds_xy[y_var]
3837

@@ -85,7 +84,6 @@ def test_map_dataset(ds_xy, x_var, y_var):
8584
],
8685
)
8786
def test_map_dataset_with_transform(ds_xy, x_var, y_var):
88-
8987
x = ds_xy[x_var]
9088
y = ds_xy[y_var]
9189

@@ -117,7 +115,6 @@ def y_transform(batch):
117115
],
118116
)
119117
def test_iterable_dataset(ds_xy, x_var, y_var):
120-
121118
x = ds_xy[x_var]
122119
y = ds_xy[y_var]
123120

0 commit comments

Comments
 (0)