cf-xarray 0.10.8__tar.gz → 0.10.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cf_xarray-0.10.10/.github/workflows/ci.yaml +107 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.github/workflows/pypi.yaml +8 -8
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.github/workflows/testpypi-release.yaml +7 -7
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.github/workflows/upstream-dev-ci.yaml +14 -17
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.pre-commit-config.yaml +2 -2
- cf_xarray-0.10.10/.readthedocs.yml +20 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/PKG-INFO +2 -2
- cf_xarray-0.10.10/cf_xarray/_version.py +1 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/accessor.py +0 -1
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/geometry.py +5 -1
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/helpers.py +12 -1
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/test_accessor.py +3 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/units.py +1 -1
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray.egg-info/PKG-INFO +2 -2
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray.egg-info/SOURCES.txt +1 -5
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray.egg-info/requires.txt +1 -1
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/pyproject.toml +93 -2
- cf_xarray-0.10.10/uv.lock +3137 -0
- cf_xarray-0.10.8/.github/workflows/ci.yaml +0 -118
- cf_xarray-0.10.8/.readthedocs.yml +0 -19
- cf_xarray-0.10.8/cf_xarray/_version.py +0 -1
- cf_xarray-0.10.8/ci/doc.yml +0 -28
- cf_xarray-0.10.8/ci/environment-all-min-deps.yml +0 -25
- cf_xarray-0.10.8/ci/environment-no-optional-deps.yml +0 -13
- cf_xarray-0.10.8/ci/environment.yml +0 -25
- cf_xarray-0.10.8/ci/upstream-dev-env.yml +0 -22
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.binder/environment.yml +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.deepsource.toml +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.github/dependabot.yml +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.github/release.yml +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.github/workflows/parse_logs.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.gitignore +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/.tributors +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/CITATION.cff +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/LICENSE +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/README.rst +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/__init__.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/coding.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/criteria.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/datasets.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/formatting.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/groupers.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/options.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/parametric.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/py.typed +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/scripts/make_doc.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/scripts/print_versions.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/sgrid.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/__init__.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/conftest.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/test_coding.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/test_geometry.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/test_groupers.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/test_helpers.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/test_options.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/test_parametric.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/test_scripts.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/tests/test_units.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray/utils.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray.egg-info/dependency_links.txt +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/cf_xarray.egg-info/top_level.txt +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/codecov.yml +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/2D_bounds_averaged.png +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/2D_bounds_error.png +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/2D_bounds_nonunique.png +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/Makefile +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/_static/dataset-diagram-logo.tex +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/_static/full-logo.png +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/_static/logo.png +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/_static/logo.svg +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/_static/rich-repr-example.png +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/_static/style.css +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/api.rst +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/bounds.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/cartopy_rotated_pole.png +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/coding.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/conf.py +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/contributing.rst +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/coord_axes.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/custom-criteria.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/dsg.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/examples/introduction.ipynb +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/faq.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/flags.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/geometry.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/grid_mappings.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/howtouse.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/index.rst +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/make.bat +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/parametricz.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/plotting.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/provenance.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/quickstart.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/roadmap.rst +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/selecting.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/sgrid_ugrid.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/units.md +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/doc/whats-new.rst +0 -0
- {cf_xarray-0.10.8 → cf_xarray-0.10.10}/setup.cfg +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- "main"
|
|
6
|
+
pull_request:
|
|
7
|
+
branches:
|
|
8
|
+
- "*"
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: "0 13 * * 1"
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
COLUMNS: 120
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
name: Build (${{ matrix.python-version }}, ${{ matrix.os }}), ${{ matrix.env }}
|
|
22
|
+
runs-on: ${{ matrix.os }}
|
|
23
|
+
strategy:
|
|
24
|
+
fail-fast: false
|
|
25
|
+
matrix:
|
|
26
|
+
os: ["ubuntu-latest"]
|
|
27
|
+
python-version: ["3.11", "3.13"]
|
|
28
|
+
env: ["test"]
|
|
29
|
+
include:
|
|
30
|
+
- env: "test-min-deps"
|
|
31
|
+
python-version: "3.11"
|
|
32
|
+
os: ubuntu-latest
|
|
33
|
+
- env: "test-no-optional"
|
|
34
|
+
python-version: "3.13"
|
|
35
|
+
os: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v6
|
|
38
|
+
with:
|
|
39
|
+
fetch-depth: 0 # Fetch all history for all branches and tags.
|
|
40
|
+
|
|
41
|
+
- name: Set up Python
|
|
42
|
+
uses: actions/setup-python@v6
|
|
43
|
+
with:
|
|
44
|
+
python-version: ${{ matrix.python-version }}
|
|
45
|
+
|
|
46
|
+
- name: Install uv
|
|
47
|
+
uses: astral-sh/setup-uv@v7
|
|
48
|
+
with:
|
|
49
|
+
enable-cache: true
|
|
50
|
+
|
|
51
|
+
- name: Install dependencies
|
|
52
|
+
run: |
|
|
53
|
+
uv pip install --system -e .
|
|
54
|
+
uv pip install --system --group ${{ matrix.env }}
|
|
55
|
+
|
|
56
|
+
- name: Run Tests
|
|
57
|
+
run: |
|
|
58
|
+
pytest -n auto --cov=./ --cov-report=xml
|
|
59
|
+
|
|
60
|
+
- name: Upload code coverage to Codecov
|
|
61
|
+
uses: codecov/codecov-action@v5.5.1
|
|
62
|
+
with:
|
|
63
|
+
file: ./coverage.xml
|
|
64
|
+
flags: unittests
|
|
65
|
+
env_vars: RUNNER_OS,PYTHON_VERSION
|
|
66
|
+
name: codecov-umbrella
|
|
67
|
+
fail_ci_if_error: false
|
|
68
|
+
|
|
69
|
+
mypy:
|
|
70
|
+
name: mypy
|
|
71
|
+
runs-on: "ubuntu-latest"
|
|
72
|
+
strategy:
|
|
73
|
+
matrix:
|
|
74
|
+
python-version: ["3.11", "3.13"]
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/checkout@v6
|
|
77
|
+
with:
|
|
78
|
+
fetch-depth: 0 # Fetch all history for all branches and tags.
|
|
79
|
+
|
|
80
|
+
- name: Set up Python
|
|
81
|
+
uses: actions/setup-python@v6
|
|
82
|
+
with:
|
|
83
|
+
python-version: ${{ matrix.python-version }}
|
|
84
|
+
|
|
85
|
+
- name: Install uv
|
|
86
|
+
uses: astral-sh/setup-uv@v7
|
|
87
|
+
with:
|
|
88
|
+
enable-cache: true
|
|
89
|
+
|
|
90
|
+
- name: Install dependencies
|
|
91
|
+
run: |
|
|
92
|
+
uv pip install --system -e .
|
|
93
|
+
uv pip install --system --group test
|
|
94
|
+
uv pip install --system --group typing
|
|
95
|
+
|
|
96
|
+
- name: Run mypy
|
|
97
|
+
run: |
|
|
98
|
+
python -m mypy --install-types --non-interactive --cobertura-xml-report mypy_report cf_xarray/
|
|
99
|
+
|
|
100
|
+
- name: Upload mypy coverage to Codecov
|
|
101
|
+
uses: codecov/codecov-action@v5.5.1
|
|
102
|
+
with:
|
|
103
|
+
file: mypy_report/cobertura.xml
|
|
104
|
+
flags: mypy
|
|
105
|
+
env_vars: PYTHON_VERSION
|
|
106
|
+
name: codecov-umbrella
|
|
107
|
+
fail_ci_if_error: false
|
|
@@ -12,13 +12,13 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
if: github.repository == 'xarray-contrib/cf-xarray'
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v6
|
|
16
16
|
with:
|
|
17
17
|
fetch-depth: 0
|
|
18
|
-
- uses: actions/setup-python@
|
|
18
|
+
- uses: actions/setup-python@v6
|
|
19
19
|
name: Install Python
|
|
20
20
|
with:
|
|
21
|
-
python-version: "3.
|
|
21
|
+
python-version: "3.11"
|
|
22
22
|
|
|
23
23
|
- name: Install dependencies
|
|
24
24
|
run: |
|
|
@@ -41,7 +41,7 @@ jobs:
|
|
|
41
41
|
else
|
|
42
42
|
echo "✅ Looks good"
|
|
43
43
|
fi
|
|
44
|
-
- uses: actions/upload-artifact@
|
|
44
|
+
- uses: actions/upload-artifact@v5
|
|
45
45
|
with:
|
|
46
46
|
name: releases
|
|
47
47
|
path: dist
|
|
@@ -50,11 +50,11 @@ jobs:
|
|
|
50
50
|
needs: build-artifacts
|
|
51
51
|
runs-on: ubuntu-latest
|
|
52
52
|
steps:
|
|
53
|
-
- uses: actions/setup-python@
|
|
53
|
+
- uses: actions/setup-python@v6
|
|
54
54
|
name: Install Python
|
|
55
55
|
with:
|
|
56
|
-
python-version: "3.
|
|
57
|
-
- uses: actions/download-artifact@
|
|
56
|
+
python-version: "3.11"
|
|
57
|
+
- uses: actions/download-artifact@v6
|
|
58
58
|
with:
|
|
59
59
|
name: releases
|
|
60
60
|
path: dist
|
|
@@ -91,7 +91,7 @@ jobs:
|
|
|
91
91
|
id-token: write
|
|
92
92
|
|
|
93
93
|
steps:
|
|
94
|
-
- uses: actions/download-artifact@
|
|
94
|
+
- uses: actions/download-artifact@v6
|
|
95
95
|
with:
|
|
96
96
|
name: releases
|
|
97
97
|
path: dist
|
|
@@ -17,14 +17,14 @@ jobs:
|
|
|
17
17
|
if: ${{ contains( github.event.pull_request.labels.*.name, 'test-build') && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
|
|
18
18
|
runs-on: ubuntu-latest
|
|
19
19
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
21
|
with:
|
|
22
22
|
fetch-depth: 0
|
|
23
23
|
|
|
24
|
-
- uses: actions/setup-python@
|
|
24
|
+
- uses: actions/setup-python@v6
|
|
25
25
|
name: Install Python
|
|
26
26
|
with:
|
|
27
|
-
python-version: "3.
|
|
27
|
+
python-version: "3.11"
|
|
28
28
|
|
|
29
29
|
- name: Install dependencies
|
|
30
30
|
run: |
|
|
@@ -53,7 +53,7 @@ jobs:
|
|
|
53
53
|
echo "✅ Looks good"
|
|
54
54
|
fi
|
|
55
55
|
|
|
56
|
-
- uses: actions/upload-artifact@
|
|
56
|
+
- uses: actions/upload-artifact@v5
|
|
57
57
|
with:
|
|
58
58
|
name: releases
|
|
59
59
|
path: dist
|
|
@@ -62,11 +62,11 @@ jobs:
|
|
|
62
62
|
needs: build-artifacts
|
|
63
63
|
runs-on: ubuntu-latest
|
|
64
64
|
steps:
|
|
65
|
-
- uses: actions/setup-python@
|
|
65
|
+
- uses: actions/setup-python@v6
|
|
66
66
|
name: Install Python
|
|
67
67
|
with:
|
|
68
|
-
python-version: "3.
|
|
69
|
-
- uses: actions/download-artifact@
|
|
68
|
+
python-version: "3.11"
|
|
69
|
+
- uses: actions/download-artifact@v6
|
|
70
70
|
with:
|
|
71
71
|
name: releases
|
|
72
72
|
path: dist
|
|
@@ -8,7 +8,7 @@ on:
|
|
|
8
8
|
branches:
|
|
9
9
|
- main
|
|
10
10
|
schedule:
|
|
11
|
-
- cron: "0 0 * * *" # Daily
|
|
11
|
+
- cron: "0 0 * * *" # Daily "At 00:00" UTC
|
|
12
12
|
workflow_dispatch: # allows you to trigger the workflow run manually
|
|
13
13
|
|
|
14
14
|
concurrency:
|
|
@@ -23,31 +23,28 @@ jobs:
|
|
|
23
23
|
name: upstream-dev
|
|
24
24
|
runs-on: ubuntu-latest
|
|
25
25
|
if: ${{ (contains( github.event.pull_request.labels.*.name, 'test-upstream') && github.event_name == 'pull_request') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
|
|
26
|
-
defaults:
|
|
27
|
-
run:
|
|
28
|
-
shell: bash -l {0}
|
|
29
26
|
strategy:
|
|
30
27
|
fail-fast: false
|
|
31
28
|
matrix:
|
|
32
29
|
python-version: ["3.13"]
|
|
33
30
|
steps:
|
|
34
|
-
- uses: actions/checkout@
|
|
31
|
+
- uses: actions/checkout@v6
|
|
35
32
|
with:
|
|
36
33
|
fetch-depth: 0 # Fetch all history for all branches and tags.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- name: Set up conda environment
|
|
41
|
-
uses: mamba-org/setup-micromamba@v2
|
|
34
|
+
|
|
35
|
+
- name: Set up Python
|
|
36
|
+
uses: actions/setup-python@v6
|
|
42
37
|
with:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- name: Install
|
|
38
|
+
python-version: ${{ matrix.python-version }}
|
|
39
|
+
|
|
40
|
+
- name: Install uv
|
|
41
|
+
uses: astral-sh/setup-uv@v7
|
|
42
|
+
|
|
43
|
+
- name: Install dependencies
|
|
49
44
|
run: |
|
|
50
|
-
|
|
45
|
+
uv pip install --system -e .
|
|
46
|
+
uv pip install --system --group test-upstream
|
|
47
|
+
|
|
51
48
|
- name: Run Tests
|
|
52
49
|
if: success()
|
|
53
50
|
id: status
|
|
@@ -10,7 +10,7 @@ repos:
|
|
|
10
10
|
|
|
11
11
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
12
12
|
# Ruff version.
|
|
13
|
-
rev: 'v0.
|
|
13
|
+
rev: 'v0.13.3'
|
|
14
14
|
hooks:
|
|
15
15
|
- id: ruff
|
|
16
16
|
args: ["--fix", "--show-fixes"]
|
|
@@ -41,7 +41,7 @@ repos:
|
|
|
41
41
|
additional_dependencies: [mdformat==0.7.17]
|
|
42
42
|
|
|
43
43
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
44
|
-
rev:
|
|
44
|
+
rev: v6.0.0
|
|
45
45
|
hooks:
|
|
46
46
|
- id: trailing-whitespace
|
|
47
47
|
- id: end-of-file-fixer
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
sphinx:
|
|
3
|
+
configuration: doc/conf.py
|
|
4
|
+
build:
|
|
5
|
+
os: ubuntu-lts-latest
|
|
6
|
+
tools:
|
|
7
|
+
python: "3.11"
|
|
8
|
+
jobs:
|
|
9
|
+
pre_create_environment:
|
|
10
|
+
- asdf plugin add uv
|
|
11
|
+
- asdf install uv latest
|
|
12
|
+
- asdf global uv latest
|
|
13
|
+
create_environment:
|
|
14
|
+
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
|
|
15
|
+
install:
|
|
16
|
+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group docs
|
|
17
|
+
post_checkout:
|
|
18
|
+
- (git --no-pager log --pretty="tformat:%s" -1 | grep -vqF "[skip-rtd]") || exit 183
|
|
19
|
+
|
|
20
|
+
formats: []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cf_xarray
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.10
|
|
4
4
|
Summary: A convenience wrapper for using CF attributes on xarray objects
|
|
5
5
|
License: Apache License
|
|
6
6
|
Version 2.0, January 2004
|
|
@@ -220,7 +220,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
220
220
|
Requires-Python: >=3.11
|
|
221
221
|
Description-Content-Type: text/x-rst
|
|
222
222
|
License-File: LICENSE
|
|
223
|
-
Requires-Dist: xarray>=
|
|
223
|
+
Requires-Dist: xarray>=2024.7.0
|
|
224
224
|
Provides-Extra: all
|
|
225
225
|
Requires-Dist: matplotlib; extra == "all"
|
|
226
226
|
Requires-Dist: pint!=0.24.0,>=0.18; extra == "all"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.10.10"
|
|
@@ -796,7 +796,6 @@ def _guess_bounds(da, dim=None, out_dim="bounds"):
|
|
|
796
796
|
f"If dim is None, variable {da.name} must be 1D or 2D. Received {da.ndim}D variable instead."
|
|
797
797
|
)
|
|
798
798
|
dim = da.dims
|
|
799
|
-
|
|
800
799
|
if not isinstance(dim, str):
|
|
801
800
|
if len(dim) > 2:
|
|
802
801
|
raise NotImplementedError(
|
|
@@ -586,7 +586,11 @@ def points_to_cf(
|
|
|
586
586
|
coord = None
|
|
587
587
|
pts_ = pts
|
|
588
588
|
|
|
589
|
-
x
|
|
589
|
+
x: list[np.ndarray] = []
|
|
590
|
+
y: list[np.ndarray] = []
|
|
591
|
+
node_count: list[int] = []
|
|
592
|
+
crdX: list[float] = []
|
|
593
|
+
crdY: list[float] = []
|
|
590
594
|
for pt in pts_:
|
|
591
595
|
if isinstance(pt, MultiPoint):
|
|
592
596
|
xy = np.concatenate([p.coords for p in pt.geoms])
|
|
@@ -34,7 +34,7 @@ def _guess_bounds_1d(da, dim):
|
|
|
34
34
|
result = xr.concat([first, bounds], dim=dim).transpose(..., "bounds")
|
|
35
35
|
if ADDED_INDEX:
|
|
36
36
|
result = result.drop_vars(dim)
|
|
37
|
-
return result
|
|
37
|
+
return result.drop_attrs(deep=False)
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
def _guess_bounds_2d(da, dims):
|
|
@@ -222,6 +222,11 @@ def _get_core_dim_orders(core_dim_coords: dict[str, np.ndarray]) -> dict[str, st
|
|
|
222
222
|
core_dim_orders = {}
|
|
223
223
|
|
|
224
224
|
for dim, coords in core_dim_coords.items():
|
|
225
|
+
if coords.size <= 1:
|
|
226
|
+
# A single value, same as all values are equal, treat as ascending
|
|
227
|
+
core_dim_orders[dim] = "ascending"
|
|
228
|
+
continue
|
|
229
|
+
|
|
225
230
|
diffs = np.diff(coords)
|
|
226
231
|
|
|
227
232
|
# Handle datetime64 and timedelta64 safely for both numpy 1.26.4 and numpy 2
|
|
@@ -333,6 +338,12 @@ def _get_ordered_vertices(
|
|
|
333
338
|
elif order == "descending":
|
|
334
339
|
endpoints = np.maximum(bounds[..., :, 0], bounds[..., :, 1])
|
|
335
340
|
last_endpoint = np.minimum(bounds[..., -1, 0], bounds[..., -1, 1])
|
|
341
|
+
else:
|
|
342
|
+
raise NotImplementedError(
|
|
343
|
+
f"Cannot determine vertices for non-monotonic bounds with {order} core "
|
|
344
|
+
"dimension orders. Try normalizing the coordinates to a monotonic "
|
|
345
|
+
"convention and try again."
|
|
346
|
+
)
|
|
336
347
|
|
|
337
348
|
vertices = np.concatenate(
|
|
338
349
|
[endpoints, np.expand_dims(last_endpoint, axis=-1)], axis=-1
|
|
@@ -832,6 +832,9 @@ def test_add_bounds(dims):
|
|
|
832
832
|
assert_allclose(
|
|
833
833
|
added[name].reset_coords(drop=True), expected[dim].transpose(..., "bounds")
|
|
834
834
|
)
|
|
835
|
+
if dim == "lat":
|
|
836
|
+
# The CF axes shouldn't have changed
|
|
837
|
+
assert added.cf.axes["Y"] == ["lat"]
|
|
835
838
|
|
|
836
839
|
_check_unchanged(original, ds)
|
|
837
840
|
|
|
@@ -60,7 +60,7 @@ def short_formatter(unit, registry, **options):
|
|
|
60
60
|
# Reused with modification from MetPy under the terms of the BSD 3-Clause License.
|
|
61
61
|
# Copyright (c) 2015,2017,2019 MetPy Developers.
|
|
62
62
|
# Create registry, with preprocessors for UDUNITS-style powers (m2 s-2) and percent signs
|
|
63
|
-
units = pint.UnitRegistry(
|
|
63
|
+
units: pint.UnitRegistry = pint.UnitRegistry(
|
|
64
64
|
autoconvert_offset_to_baseunit=True,
|
|
65
65
|
preprocessors=[
|
|
66
66
|
functools.partial(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cf_xarray
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.10
|
|
4
4
|
Summary: A convenience wrapper for using CF attributes on xarray objects
|
|
5
5
|
License: Apache License
|
|
6
6
|
Version 2.0, January 2004
|
|
@@ -220,7 +220,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
220
220
|
Requires-Python: >=3.11
|
|
221
221
|
Description-Content-Type: text/x-rst
|
|
222
222
|
License-File: LICENSE
|
|
223
|
-
Requires-Dist: xarray>=
|
|
223
|
+
Requires-Dist: xarray>=2024.7.0
|
|
224
224
|
Provides-Extra: all
|
|
225
225
|
Requires-Dist: matplotlib; extra == "all"
|
|
226
226
|
Requires-Dist: pint!=0.24.0,>=0.18; extra == "all"
|
|
@@ -8,6 +8,7 @@ LICENSE
|
|
|
8
8
|
README.rst
|
|
9
9
|
codecov.yml
|
|
10
10
|
pyproject.toml
|
|
11
|
+
uv.lock
|
|
11
12
|
.binder/environment.yml
|
|
12
13
|
.github/dependabot.yml
|
|
13
14
|
.github/release.yml
|
|
@@ -50,11 +51,6 @@ cf_xarray/tests/test_options.py
|
|
|
50
51
|
cf_xarray/tests/test_parametric.py
|
|
51
52
|
cf_xarray/tests/test_scripts.py
|
|
52
53
|
cf_xarray/tests/test_units.py
|
|
53
|
-
ci/doc.yml
|
|
54
|
-
ci/environment-all-min-deps.yml
|
|
55
|
-
ci/environment-no-optional-deps.yml
|
|
56
|
-
ci/environment.yml
|
|
57
|
-
ci/upstream-dev-env.yml
|
|
58
54
|
doc/2D_bounds_averaged.png
|
|
59
55
|
doc/2D_bounds_error.png
|
|
60
56
|
doc/2D_bounds_nonunique.png
|
|
@@ -16,7 +16,7 @@ classifiers = [
|
|
|
16
16
|
"Programming Language :: Python :: 3.13",
|
|
17
17
|
]
|
|
18
18
|
dependencies = [
|
|
19
|
-
"xarray>=
|
|
19
|
+
"xarray>=2024.7.0",
|
|
20
20
|
]
|
|
21
21
|
dynamic = ["version"]
|
|
22
22
|
|
|
@@ -107,7 +107,6 @@ docstring-code-format = true
|
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
[tool.pytest]
|
|
110
|
-
python_files = "test_*.py"
|
|
111
110
|
testpaths = ["cf_xarray/tests"]
|
|
112
111
|
|
|
113
112
|
[tool.rstcheck]
|
|
@@ -150,3 +149,95 @@ ignore_missing_imports = true
|
|
|
150
149
|
|
|
151
150
|
[tool.coverage.run]
|
|
152
151
|
omit = ["*/tests/*"]
|
|
152
|
+
|
|
153
|
+
[dependency-groups]
|
|
154
|
+
test-base = [
|
|
155
|
+
"pytest-cov",
|
|
156
|
+
"pytest",
|
|
157
|
+
"pytest-xdist",
|
|
158
|
+
"pytest-pretty",
|
|
159
|
+
]
|
|
160
|
+
|
|
161
|
+
test = [
|
|
162
|
+
{include-group = "test-base"},
|
|
163
|
+
"dask",
|
|
164
|
+
"flox",
|
|
165
|
+
"lxml",
|
|
166
|
+
"matplotlib",
|
|
167
|
+
"netcdf4",
|
|
168
|
+
"pandas",
|
|
169
|
+
"pint",
|
|
170
|
+
"pooch",
|
|
171
|
+
"regex",
|
|
172
|
+
"rich",
|
|
173
|
+
"scipy",
|
|
174
|
+
"shapely",
|
|
175
|
+
"pyproj",
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
test-no-optional = [
|
|
179
|
+
{include-group = "test-base"},
|
|
180
|
+
"dask",
|
|
181
|
+
"matplotlib",
|
|
182
|
+
"netcdf4",
|
|
183
|
+
"pandas",
|
|
184
|
+
"pooch",
|
|
185
|
+
]
|
|
186
|
+
|
|
187
|
+
test-min-deps = [
|
|
188
|
+
{include-group = "test-base"},
|
|
189
|
+
"dask",
|
|
190
|
+
"flox",
|
|
191
|
+
"lxml",
|
|
192
|
+
"matplotlib",
|
|
193
|
+
"netcdf4",
|
|
194
|
+
"pandas",
|
|
195
|
+
"pint>=0.18",
|
|
196
|
+
"pooch",
|
|
197
|
+
"regex",
|
|
198
|
+
"rich",
|
|
199
|
+
"scipy",
|
|
200
|
+
"shapely",
|
|
201
|
+
"pyproj",
|
|
202
|
+
]
|
|
203
|
+
|
|
204
|
+
docs = [
|
|
205
|
+
"matplotlib",
|
|
206
|
+
"netcdf4",
|
|
207
|
+
"pooch",
|
|
208
|
+
"sphinx",
|
|
209
|
+
"sphinx-copybutton",
|
|
210
|
+
"sphinx-autobuild",
|
|
211
|
+
"numpydoc",
|
|
212
|
+
"sphinx-autosummary-accessors",
|
|
213
|
+
"ipython",
|
|
214
|
+
"ipykernel",
|
|
215
|
+
"ipywidgets",
|
|
216
|
+
"pandas",
|
|
217
|
+
"pint",
|
|
218
|
+
"regex",
|
|
219
|
+
"shapely",
|
|
220
|
+
"furo>=2024",
|
|
221
|
+
"myst-nb",
|
|
222
|
+
"pyproj",
|
|
223
|
+
]
|
|
224
|
+
|
|
225
|
+
test-upstream = [
|
|
226
|
+
{include-group = "test-base"},
|
|
227
|
+
"pytest-reportlog",
|
|
228
|
+
"dask",
|
|
229
|
+
"matplotlib",
|
|
230
|
+
"netcdf4",
|
|
231
|
+
"pandas",
|
|
232
|
+
"pooch",
|
|
233
|
+
"rich",
|
|
234
|
+
"shapely",
|
|
235
|
+
"pyproj",
|
|
236
|
+
"xarray @ git+https://github.com/pydata/xarray.git",
|
|
237
|
+
"flox @ git+https://github.com/dcherian/flox.git",
|
|
238
|
+
"pint @ git+https://github.com/hgrecco/pint.git",
|
|
239
|
+
]
|
|
240
|
+
|
|
241
|
+
typing = [
|
|
242
|
+
"mypy",
|
|
243
|
+
]
|