Skip to content

Commit e04af8b

Browse files
committed
Merge branch 'main' into kerchunk
2 parents b170dff + 1f36077 commit e04af8b

File tree

16 files changed

+2501
-805
lines changed

16 files changed

+2501
-805
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- name: checkout repo
15-
uses: actions/checkout@v3.3.0
15+
uses: actions/checkout@v4
1616

1717
- name: Set up Python
18-
uses: actions/setup-python@v3
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: "3.x"
2121

.github/workflows/tests.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,22 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
os: [ubuntu-latest]
27-
python-version: ["3.8", "3.9", "3.10", "3.11"]
28-
environment-file: ["environment.yaml"]
27+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2928
defaults:
3029
run:
3130
shell: bash -l {0}
3231

3332
steps:
3433
- name: checkout repo
35-
uses: actions/checkout@v3.3.0
34+
uses: actions/checkout@v4
3635

37-
- name: setup micromamba
38-
uses: mamba-org/setup-micromamba@main
36+
- uses: astral-sh/setup-uv@v5
3937
with:
40-
environment-file: ${{ matrix.environment-file }}
41-
micromamba-version: "latest"
42-
create-args: python=${{ matrix.python-version }}
38+
python-version: ${{ matrix.python-version }}
4339

44-
- name: install xpystac
45-
run: pip install .
40+
- name: sync
41+
run: uv sync --all-extras
4642

4743
- name: run tests
4844
id: status
49-
run: pytest -v --cov xpystac --cov-report term-missing --vcr-record=none .
45+
run: uv run pytest -v --cov xpystac --cov-report term-missing .

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ dist
66
.mypy_cache
77
.pytest_cache
88
.ruff_cache
9-
*.egg-info/
9+
*.egg-info/
10+
.venv

.pre-commit-config.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,20 @@
22
# Please run `pre-commit run --all-files` when adding or changing entries.
33

44
repos:
5-
- repo: https://github.com/MarcoGorelli/absolufy-imports
6-
rev: v0.3.1
7-
hooks:
8-
- id: absolufy-imports
9-
name: absolufy-imports
105
- repo: https://github.com/asottile/pyupgrade
11-
rev: v3.2.2
6+
rev: v3.19.1
127
hooks:
138
- id: pyupgrade
149
args:
15-
- --py38-plus
10+
- --py310-plus
1611
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: 'v0.0.272'
12+
rev: 'v0.9.10'
1813
hooks:
1914
- id: ruff
20-
args: [--fix, --exit-non-zero-on-fix]
21-
- repo: https://github.com/psf/black
22-
rev: 23.1.0
23-
hooks:
24-
- id: black
15+
args: [--fix, --unsafe-fixes, --exit-non-zero-on-fix]
16+
- id: ruff-format
2517
- repo: https://github.com/pre-commit/mirrors-mypy
26-
rev: v0.991
18+
rev: v1.15.0
2719
hooks:
2820
- id: mypy
2921
files: ".*\\.py$"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Read from a reference file:
4747
collection = catalog.get_collection("nasa-nex-gddp-cmip6")
4848
asset = collection.assets["ACCESS-CM2.historical"]
4949

50-
xr.open_dataset(asset)
50+
xr.open_dataset(asset, patch_url=planetary_computer.sign)
5151
```
5252
ref: https://planetarycomputer.microsoft.com/dataset/nasa-nex-gddp-cmip6#Example-Notebook
5353

@@ -58,7 +58,7 @@ Read from a zarr file:
5858
collection = catalog.get_collection("daymet-daily-hi")
5959
asset = collection.assets["zarr-abfs"]
6060

61-
xr.open_dataset(asset)
61+
xr.open_dataset(asset, patch_url=planetary_computer.sign)
6262
```
6363
ref: https://planetarycomputer.microsoft.com/docs/quickstarts/reading-zarr-data/
6464

pyproject.toml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
"xarray",
1515
"pystac>=1.0.1",
1616
]
17-
requires-python = ">=3.8"
17+
requires-python = ">=3.10"
1818
description = "Extend xarray.open_dataset to accept pystac objects"
1919
license = {text = "MIT"}
2020
readme = "README.md"
@@ -24,10 +24,24 @@ dynamic = ["version"]
2424
Home = "https://github.com/stac-utils/xpystac"
2525
Repository = "https://github.com/stac-utils/xpystac"
2626

27-
[project.optional-dependencies]
27+
[dependency-groups]
2828
dev = [
29-
"pytest",
30-
"pre-commit",
29+
"adlfs>=2024.12.0",
30+
"aiohttp>=3.11.13",
31+
"fsspec>=2025.3.0",
32+
"kerchunk>=0.2.7",
33+
"odc-stac>=0.3.11",
34+
"planetary-computer>=1.0.0",
35+
"pre-commit>=4.0.1",
36+
"pystac<1.12",
37+
"pystac-client>=0.8.6",
38+
"pytest>=8.3.3",
39+
"pytest-cov>=6.0.0",
40+
"requests>=2.32.3",
41+
"rioxarray>=0.18.2",
42+
"stackstac>=0.5.1",
43+
"urllib3>=2.3.0",
44+
"zarr<3",
3145
]
3246

3347
[project.entry-points."xarray.backends"]
@@ -40,4 +54,8 @@ include = [
4054

4155
[tool.ruff]
4256
line-length = 88
43-
select = ["E", "F", "W", "I"]
57+
lint.select = ["E", "F", "W", "I", "TID252" ]
58+
target-version = "py310"
59+
60+
[tool.ruff.lint.flake8-tidy-imports]
61+
ban-relative-imports = "all"

setup.cfg

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

0 commit comments

Comments
 (0)