Skip to content

Commit 1f36077

Browse files
authored
Update dev tooling (#42)
Switch to uv, ruff and remove cassettes since they don't work with planetary computer signing
1 parent 3ee03a2 commit 1f36077

17 files changed

+2194
-264347
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: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,21 @@ jobs:
2525
matrix:
2626
os: [ubuntu-latest]
2727
python-version: ["3.10", "3.11", "3.12", "3.13"]
28-
environment-file: ["environment.yaml"]
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 --block-network .
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$"

environment.yaml

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

pyproject.toml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,23 @@ 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+
"odc-stac>=0.3.11",
33+
"planetary-computer>=1.0.0",
34+
"pre-commit>=4.0.1",
35+
"pystac<1.12",
36+
"pystac-client>=0.8.6",
37+
"pytest>=8.3.3",
38+
"pytest-cov>=6.0.0",
39+
"requests>=2.32.3",
40+
"rioxarray>=0.18.2",
41+
"stackstac>=0.5.1",
42+
"urllib3>=2.3.0",
43+
"zarr<3",
3144
]
3245

3346
[project.entry-points."xarray.backends"]
@@ -40,4 +53,8 @@ include = [
4053

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

tests/cassettes/test_core/test_to_xarray_reference_file.yaml

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

tests/cassettes/test_core/test_to_xarray_with_drop_variables_raises.yaml

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

tests/cassettes/test_core/test_to_xarray_with_pystac_client_search.yaml

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

tests/cassettes/test_core/test_to_xarray_with_pystac_client_search_with_patch_url.yaml

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

0 commit comments

Comments
 (0)