Skip to content

Commit b042dac

Browse files
authored
#217 Merge pull request from astropenguin/astropenguin/issue215
Support Python 3.12
2 parents 74f9401 + eb8fc05 commit b042dac

File tree

8 files changed

+519
-458
lines changed

8 files changed

+519
-458
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "xarray-dataclasses",
3-
"build": {
4-
"context": "..",
5-
"dockerfile": "Dockerfile"
6-
},
3+
"image":"python:3.12",
4+
"onCreateCommand": "pip install poetry==1.6.1",
75
"postCreateCommand": "poetry install",
6+
"containerEnv": {
7+
"POETRY_VIRTUALENVS_CREATE": "false"
8+
},
89
"customizations": {
910
"vscode": {
1011
"extensions": [

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v2
1616
- uses: actions/setup-python@v2
1717
with:
18-
python-version: "3.11"
18+
python-version: "3.12"
1919
- name: Install project dependencies
2020
run: pip install poetry && poetry install
2121
- name: Build docs

.github/workflows/pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
- uses: actions/checkout@v2
1616
- uses: actions/setup-python@v2
1717
with:
18-
python-version: "3.11"
18+
python-version: "3.12"
1919
- name: Publish package to PyPI
2020
run: pip install poetry && poetry publish --build

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python: ["3.8", "3.9", "3.10", "3.11"]
20+
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2121
steps:
2222
- uses: actions/checkout@v2
2323
- uses: actions/setup-python@v2

poetry.lock

Lines changed: 498 additions & 430 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,25 @@ homepage = "https://github.com/astropenguin/xarray-dataclasses/"
1010
documentation = "https://astropenguin.github.io/xarray-dataclasses/"
1111

1212
[tool.poetry.dependencies]
13-
python = ">=3.8, <3.12"
14-
numpy = "^1.22"
13+
python = ">=3.8, <3.13"
14+
numpy = [
15+
{ version = ">=1.22, <1.25", python = ">=3.8, <3.9" },
16+
{ version = "^1.22", python = ">=3.9, <3.13" },
17+
]
1518
typing-extensions = "^4.0"
1619
xarray = [
1720
{ version = ">=2022.3, <2023.2", python = ">=3.8, <3.9" },
18-
{ version = "^2022.3", python = ">=3.9, <3.12" },
21+
{ version = "^2022.3 | ^2023.1", python = ">=3.9, <3.13" },
1922
]
2023

2124
[tool.poetry.group.dev.dependencies]
22-
black = "^23.1"
23-
ipython = "^8.11"
24-
myst-parser = "^1.0"
25-
pydata-sphinx-theme = "^0.13"
25+
black = "^23.9"
26+
ipython = "^8.12"
27+
myst-parser = "^2.0"
28+
pydata-sphinx-theme = "^0.14"
2629
pyright = "^1.1"
27-
pytest = "^7.2"
28-
sphinx = "^6.1"
30+
pytest = "^7.4"
31+
sphinx = "^7.1"
2932

3033
[tool.pyright]
3134
reportImportCycles = "warning"

tests/test_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ class Weather:
6767
10 * np.random.rand(2, 2, 3),
6868
np.array([[-99.83, -99.32], [-99.79, -99.23]]),
6969
np.array([[42.25, 42.21], [42.63, 42.59]]),
70-
np.array(["2014-09-06", "2014-09-07", "2014-09-08"], "M8[ns]"),
70+
np.array(["2014-09-06", "2014-09-07", "2014-09-08"], "M8[ns]"), # type: ignore
7171
np.datetime64("2014-09-05"),
7272
)

0 commit comments

Comments
 (0)