Skip to content

Commit

Permalink
Drop Python 3.8 (#166)
Browse files Browse the repository at this point in the history
* Drop Python 3.8

* Update pre-commit

* Lint
  • Loading branch information
maxrjones authored Feb 2, 2023
1 parent d0d4327 commit 4c63119
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Setup Python
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Setup Python
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/[email protected]
name: Install Python
with:
python-version: 3.8
python-version: 3.10

- name: Install dependencies
run: |
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- uses: actions/[email protected]
name: Install Python
with:
python-version: 3.8
python-version: 3.10
- uses: actions/download-artifact@v3
with:
name: releases
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: check-yaml

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black-jupyter

Expand All @@ -27,7 +27,7 @@ repos:
hooks:
- id: seed-isort-config
- repo: https://github.com/PyCQA/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort

Expand Down
2 changes: 1 addition & 1 deletion ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- nodefaults
dependencies:
- python=3.8
- python=3.9
- dask
- pydata-sphinx-theme
- ipython
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ description = "Batch generation from Xarray objects"
readme = "README.rst"
license = {text = "Apache"}
authors = [{name = "xbatcher Developers", email = "[email protected]"}]
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
Expand Down
3 changes: 0 additions & 3 deletions xbatcher/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ def __init__(
concat_input_dims: bool = False,
preload_batch: bool = True,
):

self.ds = ds
self._batch_selectors: BatchSchema = BatchSchema(
ds,
Expand Down Expand Up @@ -419,7 +418,6 @@ def __len__(self) -> int:
return len(self._batch_selectors.selectors)

def __getitem__(self, idx: int) -> Union[xr.Dataset, xr.DataArray]:

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

if idx in self._batch_selectors.selectors:

if self.concat_input_dims:
new_dim_suffix = "_input"
all_dsets: List = []
Expand Down
2 changes: 0 additions & 2 deletions xbatcher/tests/test_keras_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def ds_xy():


def test_custom_dataarray(ds_xy):

x = ds_xy["x"]
y = ds_xy["y"]

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


def test_custom_dataarray_with_transform(ds_xy):

x = ds_xy["x"]
y = ds_xy["y"]

Expand Down
3 changes: 0 additions & 3 deletions xbatcher/tests/test_torch_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def ds_xy():
],
)
def test_map_dataset(ds_xy, x_var, y_var):

x = ds_xy[x_var]
y = ds_xy[y_var]

Expand Down Expand Up @@ -85,7 +84,6 @@ def test_map_dataset(ds_xy, x_var, y_var):
],
)
def test_map_dataset_with_transform(ds_xy, x_var, y_var):

x = ds_xy[x_var]
y = ds_xy[y_var]

Expand Down Expand Up @@ -117,7 +115,6 @@ def y_transform(batch):
],
)
def test_iterable_dataset(ds_xy, x_var, y_var):

x = ds_xy[x_var]
y = ds_xy[y_var]

Expand Down

0 comments on commit 4c63119

Please sign in to comment.