Skip to content

Commit 3e6e9c6

Browse files
2 parents a8b7df6 + 121df69 commit 3e6e9c6

12 files changed

Lines changed: 3211 additions & 2056 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Code coverage report
2+
3+
# no permissions by default
4+
permissions: {}
5+
6+
on:
7+
pull_request:
8+
push:
9+
10+
jobs:
11+
run:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16+
with:
17+
persist-credentials: false
18+
19+
- name: Setup pixi
20+
uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
21+
with:
22+
cache: true
23+
24+
- name: Run tests with coverage
25+
run: >
26+
pixi run --environment testcov test_cov

.pre-commit-config.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,14 @@ repos:
2727
- --ignore-words-list=astroid,fo
2828

2929
- repo: https://github.com/astral-sh/ruff-pre-commit
30-
rev: v0.14.10
30+
rev: v0.15.0
3131
hooks:
3232
- id: ruff
3333
args: ["--fix", "--show-fixes"]
3434
- id: ruff-format
3535

36-
- repo: https://github.com/tox-dev/pyproject-fmt
37-
rev: v2.11.1
38-
hooks:
39-
- id: pyproject-fmt
40-
4136
- repo: https://github.com/woodruffw/zizmor-pre-commit
42-
rev: v1.19.0
37+
rev: v1.22.0
4338
hooks:
4439
- id: zizmor
4540

pixi.lock

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

pixi.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[workspace]
2+
name = "xarray_subset_grid"
3+
channels = [ "conda-forge" ]
4+
platforms = [ "linux-64", "osx-arm64", "osx-64", "win-64" ]
5+
6+
[pypi-dependencies]
7+
xarray_subset_grid = { path = ".", editable = true }
8+
9+
[dependencies]
10+
python = ">=3.10"
11+
numpy = "*"
12+
xarray = ">=2024.6"
13+
pandas = "*"
14+
cf_xarray = "*"
15+
dask = "*"
16+
fsspec = "*"
17+
s3fs = "*"
18+
zarr = "<3"
19+
netcdf4 = "*"
20+
h5netcdf = "*"
21+
22+
[environments]
23+
default = { solve-group = "default" }
24+
dev = { features = [ "dev" ], solve-group = "default" }
25+
examples = { features = [ "examples" ], solve-group = "default" }
26+
all = { features = [ "dev", "examples" ], solve-group = "default" }
27+
test310 = [ "dev", "py310" ] # implicit: test310 = ["dev", "py310", "default"]
28+
test311 = [ "dev", "py311" ]
29+
test312 = [ "dev", "py312" ]
30+
test313 = [ "dev", "py313" ]
31+
test314 = [ "dev", "py314" ]
32+
testcov = [ "dev", "py314" ]
33+
34+
[system-requirements]
35+
macos = "11.0"
36+
37+
[tasks]
38+
39+
[feature.dev.dependencies]
40+
ruff = "*"
41+
pre-commit = "*"
42+
pyright = "*"
43+
pytest = "*"
44+
pytest-cov = "*"
45+
sphinx = "*"
46+
sphinx-rtd-theme = "*"
47+
pip = "*"
48+
setuptools_scm = "*"
49+
python-build = "*"
50+
sphinx-autodoc-typehints = "*"
51+
myst-nb = "*"
52+
53+
[feature.dev.tasks]
54+
lint = "ruff check tests xarray_subset_grid"
55+
test = "pytest tests/"
56+
test_all = "pytest --online tests/"
57+
test_cov = "pytest --cov=xarray_subset_grid tests"
58+
59+
[feature.examples.dependencies]
60+
matplotlib = "*"
61+
jupyter = "*"
62+
ipython = "*"
63+
64+
[feature.py310.dependencies]
65+
python = "~=3.10"
66+
67+
[feature.py311.dependencies]
68+
python = "~=3.11"
69+
70+
[feature.py312.dependencies]
71+
python = "~=3.12"
72+
73+
[feature.py313.dependencies]
74+
python = "~=3.13"
75+
76+
[feature.py314.dependencies]
77+
python = "~=3.14"

pyproject.toml

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ dependencies = [
3636
"cf-xarray",
3737
"cftime",
3838
"dask",
39-
# "dask[complete]", # getting errors from pixi with the "complete"
4039
"netcdf4",
4140
"numpy",
4241
"xarray>=2024.6",
@@ -51,7 +50,7 @@ optional-dependencies.dev = [
5150
"sphinx-rtd-theme",
5251
]
5352
optional-dependencies.examples = [ "fsspec", "h5netcdf", "matplotlib", "s3fs", "zarr<3" ]
54-
urls."Homepage" = "https://github.com/asascience-open/xarray-subset-grid"
53+
urls."Homepage" = "https://github.com/ioos/xarray-subset-grid/"
5554

5655
[tool.setuptools]
5756
packages = [ "xarray_subset_grid" ]
@@ -90,79 +89,3 @@ lint.extend-safe-fixes = [
9089
[tool.pyright]
9190
venvPath = "."
9291
venv = "venv"
93-
94-
[tool.pixi.workspace]
95-
channels = [ "conda-forge" ]
96-
platforms = [ "linux-64", "osx-arm64", "osx-64", "win-64" ]
97-
98-
[tool.pixi.pypi-dependencies]
99-
xarray_subset_grid = { path = ".", editable = true }
100-
101-
[tool.pixi.environments]
102-
default = { solve-group = "default" }
103-
dev = { features = [ "dev" ], solve-group = "default" }
104-
examples = { features = [ "examples" ], solve-group = "default" }
105-
all = { features = [ "dev", "examples" ], solve-group = "default" }
106-
test310 = [ "dev", "py310" ] # implicit: test310 = ["dev", "py310", "default"]
107-
test311 = [ "dev", "py311" ]
108-
test312 = [ "dev", "py312" ]
109-
test313 = [ "dev", "py313" ]
110-
test314 = [ "dev", "py314" ]
111-
112-
[tool.pixi.system-requirements]
113-
macos = "11.0"
114-
115-
[tool.pixi.tasks]
116-
117-
[tool.pixi.dependencies]
118-
python = ">=3.10"
119-
numpy = "*"
120-
xarray = ">=2024.6"
121-
pandas = "*"
122-
cf_xarray = "*"
123-
dask = "*"
124-
fsspec = "*"
125-
s3fs = "*"
126-
zarr = "<3"
127-
netcdf4 = "*"
128-
h5netcdf = "*"
129-
130-
131-
[tool.pixi.feature.dev.dependencies]
132-
ruff = "*"
133-
pre-commit = "*"
134-
pyright = "*"
135-
pytest = "*"
136-
pytest-cov = "*"
137-
sphinx = "*"
138-
sphinx-rtd-theme = "*"
139-
pip = "*"
140-
setuptools_scm = "*"
141-
python-build = "*"
142-
sphinx-autodoc-typehints = "*"
143-
myst-nb = "*"
144-
145-
[tool.pixi.feature.dev.tasks]
146-
lint = "ruff check tests xarray_subset_grid"
147-
test = "pytest tests/"
148-
test_all = "pytest --online tests/"
149-
150-
[tool.pixi.feature.examples.dependencies]
151-
matplotlib = "*"
152-
jupyter = "*"
153-
ipython = "*"
154-
155-
[tool.pixi.feature.py310.dependencies]
156-
python = "~=3.10"
157-
158-
[tool.pixi.feature.py311.dependencies]
159-
python = "~=3.11"
160-
161-
[tool.pixi.feature.py312.dependencies]
162-
python = "~=3.12"
163-
164-
[tool.pixi.feature.py313.dependencies]
165-
python = "~=3.13"
166-
167-
[tool.pixi.feature.py314.dependencies]
168-
python = "~=3.14"

tests/conftest.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,20 @@ def pytest_collection_modifyitems(config, items):
3838
# if item.config.getoption("-E") not in envnames:
3939
# pytest.skip(f"test requires env in {envnames!r}")
4040

41-
EXAMPLE_DATA = Path(__file__).parent / 'example_data'
42-
43-
UGRID_FILES = [EXAMPLE_DATA / 'SFBOFS_subset1.nc',
44-
EXAMPLE_DATA / 'small_ugrid_zero_based.nc',
45-
EXAMPLE_DATA / 'tris_and_bounds.nc',
46-
]
47-
48-
SGRID_FILES = [EXAMPLE_DATA / 'arakawa_c_test_grid.nc',
49-
]
50-
51-
RGRID_FILES = [EXAMPLE_DATA / '2D-rectangular_grid_wind.nc',
52-
EXAMPLE_DATA / 'rectangular_grid_decreasing.nc',
53-
EXAMPLE_DATA / 'AMSEAS-subset.nc',
54-
]
41+
EXAMPLE_DATA = Path(__file__).parent / "example_data"
42+
43+
UGRID_FILES = [
44+
EXAMPLE_DATA / "SFBOFS_subset1.nc",
45+
EXAMPLE_DATA / "small_ugrid_zero_based.nc",
46+
EXAMPLE_DATA / "tris_and_bounds.nc",
47+
]
48+
49+
SGRID_FILES = [
50+
EXAMPLE_DATA / "arakawa_c_test_grid.nc",
51+
]
52+
53+
RGRID_FILES = [
54+
EXAMPLE_DATA / "2D-rectangular_grid_wind.nc",
55+
EXAMPLE_DATA / "rectangular_grid_decreasing.nc",
56+
EXAMPLE_DATA / "AMSEAS-subset.nc",
57+
]

0 commit comments

Comments
 (0)