Skip to content

Commit

Permalink
Drop python 3.8, test python 3.11 (#209)
Browse files Browse the repository at this point in the history
* Drop py38

* bump to py 3.11

* more bump

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* revert bump for xarray tests

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
dcherian and pre-commit-ci[bot] authored Oct 2, 2023
1 parent 528a645 commit 486b7c5
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-additional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

env:
CONDA_ENV_FILE: ci/environment.yml
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.11"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
shell: bash -l {0}
env:
CONDA_ENV_FILE: ci/environment.yml
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.11"

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.8", "3.10"]
python-version: ["3.9", "3.11"]
steps:
- uses: actions/checkout@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testpypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.10"
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.10"
python-version: "3.11"
- uses: actions/download-artifact@v3
with:
name: releases
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
with:
Expand Down
8 changes: 3 additions & 5 deletions flox/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
import sys
import warnings
from collections import namedtuple
from collections.abc import Mapping, Sequence
from functools import partial, reduce
from numbers import Integral
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Literal,
Mapping,
Sequence,
Union,
overload,
)
Expand Down Expand Up @@ -74,8 +72,8 @@
T_IsBins = Union[bool | Sequence[bool]]


IntermediateDict = Dict[Union[str, Callable], Any]
FinalResultsDict = Dict[str, Union["DaskArray", np.ndarray]]
IntermediateDict = dict[Union[str, Callable], Any]
FinalResultsDict = dict[str, Union["DaskArray", np.ndarray]]
FactorProps = namedtuple("FactorProps", "offset_group nan_sentinel nanmask")

# This dummy axis is inserted using np.expand_dims
Expand Down
3 changes: 2 additions & 1 deletion flox/xarray.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Any, Hashable, Iterable, Sequence, Union
from collections.abc import Hashable, Iterable, Sequence
from typing import TYPE_CHECKING, Any, Union

import numpy as np
import pandas as pd
Expand Down
3 changes: 2 additions & 1 deletion flox/xrutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# defined in xarray

import datetime
from typing import Any, Iterable
from collections.abc import Iterable
from typing import Any

import numpy as np
import pandas as pd
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name = "flox"
description = "GroupBy operations for dask.array"
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
keywords = ["xarray", "dask", "groupby"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down Expand Up @@ -60,10 +59,10 @@ write_to_template= '__version__ = "{version}"'

[tool.black]
line-length = 100
target-version = ["py38"]
target-version = ["py39"]

[tool.ruff]
target-version = "py38"
target-version = "py39"
builtins = ["ellipsis"]
exclude = [
".eggs",
Expand Down

0 comments on commit 486b7c5

Please sign in to comment.