cf-xarray 0.10.7__tar.gz → 0.10.9__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.
Files changed (99) hide show
  1. cf_xarray-0.10.9/.github/workflows/ci.yaml +107 -0
  2. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.github/workflows/pypi.yaml +7 -7
  3. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.github/workflows/testpypi-release.yaml +4 -4
  4. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.github/workflows/upstream-dev-ci.yaml +14 -17
  5. cf_xarray-0.10.9/.readthedocs.yml +20 -0
  6. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/PKG-INFO +2 -2
  7. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/__init__.py +1 -1
  8. cf_xarray-0.10.9/cf_xarray/_version.py +1 -0
  9. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/accessor.py +345 -22
  10. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/datasets.py +38 -0
  11. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/helpers.py +21 -3
  12. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/__init__.py +1 -0
  13. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/test_accessor.py +201 -3
  14. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/test_helpers.py +35 -0
  15. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray.egg-info/PKG-INFO +2 -2
  16. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray.egg-info/SOURCES.txt +1 -5
  17. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray.egg-info/requires.txt +1 -1
  18. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/api.rst +3 -0
  19. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/grid_mappings.md +83 -18
  20. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/pyproject.toml +93 -1
  21. cf_xarray-0.10.9/uv.lock +3137 -0
  22. cf_xarray-0.10.7/.github/workflows/ci.yaml +0 -118
  23. cf_xarray-0.10.7/.readthedocs.yml +0 -19
  24. cf_xarray-0.10.7/cf_xarray/_version.py +0 -1
  25. cf_xarray-0.10.7/ci/doc.yml +0 -26
  26. cf_xarray-0.10.7/ci/environment-all-min-deps.yml +0 -24
  27. cf_xarray-0.10.7/ci/environment-no-optional-deps.yml +0 -13
  28. cf_xarray-0.10.7/ci/environment.yml +0 -24
  29. cf_xarray-0.10.7/ci/upstream-dev-env.yml +0 -21
  30. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.binder/environment.yml +0 -0
  31. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.deepsource.toml +0 -0
  32. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.github/dependabot.yml +0 -0
  33. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.github/release.yml +0 -0
  34. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.github/workflows/parse_logs.py +0 -0
  35. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.gitignore +0 -0
  36. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.pre-commit-config.yaml +0 -0
  37. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/.tributors +0 -0
  38. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/CITATION.cff +0 -0
  39. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/LICENSE +0 -0
  40. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/README.rst +0 -0
  41. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/coding.py +0 -0
  42. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/criteria.py +0 -0
  43. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/formatting.py +0 -0
  44. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/geometry.py +0 -0
  45. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/groupers.py +0 -0
  46. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/options.py +0 -0
  47. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/parametric.py +0 -0
  48. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/py.typed +0 -0
  49. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/scripts/make_doc.py +0 -0
  50. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/scripts/print_versions.py +0 -0
  51. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/sgrid.py +0 -0
  52. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/conftest.py +0 -0
  53. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/test_coding.py +0 -0
  54. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/test_geometry.py +0 -0
  55. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/test_groupers.py +0 -0
  56. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/test_options.py +0 -0
  57. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/test_parametric.py +0 -0
  58. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/test_scripts.py +0 -0
  59. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/tests/test_units.py +0 -0
  60. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/units.py +0 -0
  61. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray/utils.py +0 -0
  62. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray.egg-info/dependency_links.txt +0 -0
  63. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/cf_xarray.egg-info/top_level.txt +0 -0
  64. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/codecov.yml +0 -0
  65. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/2D_bounds_averaged.png +0 -0
  66. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/2D_bounds_error.png +0 -0
  67. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/2D_bounds_nonunique.png +0 -0
  68. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/Makefile +0 -0
  69. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/_static/dataset-diagram-logo.tex +0 -0
  70. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/_static/full-logo.png +0 -0
  71. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/_static/logo.png +0 -0
  72. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/_static/logo.svg +0 -0
  73. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/_static/rich-repr-example.png +0 -0
  74. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/_static/style.css +0 -0
  75. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/bounds.md +0 -0
  76. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/cartopy_rotated_pole.png +0 -0
  77. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/coding.md +0 -0
  78. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/conf.py +0 -0
  79. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/contributing.rst +0 -0
  80. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/coord_axes.md +0 -0
  81. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/custom-criteria.md +0 -0
  82. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/dsg.md +0 -0
  83. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/examples/introduction.ipynb +0 -0
  84. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/faq.md +0 -0
  85. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/flags.md +0 -0
  86. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/geometry.md +0 -0
  87. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/howtouse.md +0 -0
  88. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/index.rst +0 -0
  89. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/make.bat +0 -0
  90. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/parametricz.md +0 -0
  91. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/plotting.md +0 -0
  92. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/provenance.md +0 -0
  93. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/quickstart.md +0 -0
  94. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/roadmap.rst +0 -0
  95. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/selecting.md +0 -0
  96. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/sgrid_ugrid.md +0 -0
  97. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/units.md +0 -0
  98. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/doc/whats-new.rst +0 -0
  99. {cf_xarray-0.10.7 → cf_xarray-0.10.9}/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@v5
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@v5
43
+ with:
44
+ python-version: ${{ matrix.python-version }}
45
+
46
+ - name: Install uv
47
+ uses: astral-sh/setup-uv@v4
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.0
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@v5
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@v5
82
+ with:
83
+ python-version: ${{ matrix.python-version }}
84
+
85
+ - name: Install uv
86
+ uses: astral-sh/setup-uv@v4
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.0
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@v4
15
+ - uses: actions/checkout@v5
16
16
  with:
17
17
  fetch-depth: 0
18
18
  - uses: actions/setup-python@v5
19
19
  name: Install Python
20
20
  with:
21
- python-version: "3.10"
21
+ python-version: "3.11"
22
22
 
23
23
  - name: Install dependencies
24
24
  run: |
@@ -53,8 +53,8 @@ jobs:
53
53
  - uses: actions/setup-python@v5
54
54
  name: Install Python
55
55
  with:
56
- python-version: "3.10"
57
- - uses: actions/download-artifact@v4
56
+ python-version: "3.11"
57
+ - uses: actions/download-artifact@v5
58
58
  with:
59
59
  name: releases
60
60
  path: dist
@@ -72,7 +72,7 @@ jobs:
72
72
 
73
73
  - name: Publish package to TestPyPI
74
74
  if: github.event_name == 'push'
75
- uses: pypa/gh-action-pypi-publish@v1.12.4
75
+ uses: pypa/gh-action-pypi-publish@v1.13.0
76
76
  with:
77
77
  password: ${{ secrets.TESTPYPI_TOKEN }}
78
78
  repository_url: https://test.pypi.org/legacy/
@@ -91,11 +91,11 @@ jobs:
91
91
  id-token: write
92
92
 
93
93
  steps:
94
- - uses: actions/download-artifact@v4
94
+ - uses: actions/download-artifact@v5
95
95
  with:
96
96
  name: releases
97
97
  path: dist
98
98
  - name: Publish package to PyPI
99
- uses: pypa/gh-action-pypi-publish@v1.12.4
99
+ uses: pypa/gh-action-pypi-publish@v1.13.0
100
100
  with:
101
101
  verbose: true
@@ -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@v4
20
+ - uses: actions/checkout@v5
21
21
  with:
22
22
  fetch-depth: 0
23
23
 
24
24
  - uses: actions/setup-python@v5
25
25
  name: Install Python
26
26
  with:
27
- python-version: "3.10"
27
+ python-version: "3.11"
28
28
 
29
29
  - name: Install dependencies
30
30
  run: |
@@ -65,8 +65,8 @@ jobs:
65
65
  - uses: actions/setup-python@v5
66
66
  name: Install Python
67
67
  with:
68
- python-version: "3.10"
69
- - uses: actions/download-artifact@v4
68
+ python-version: "3.11"
69
+ - uses: actions/download-artifact@v5
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 At 00:00 UTC
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@v4
31
+ - uses: actions/checkout@v5
35
32
  with:
36
33
  fetch-depth: 0 # Fetch all history for all branches and tags.
37
- - name: Set environment variables
38
- run: |
39
- echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
40
- - name: Set up conda environment
41
- uses: mamba-org/setup-micromamba@v2
34
+
35
+ - name: Set up Python
36
+ uses: actions/setup-python@v5
42
37
  with:
43
- environment-file: ci/upstream-dev-env.yml
44
- environment-name: cf_xarray_test
45
- cache-env: False
46
- create-args: >-
47
- python=${{ matrix.python-version }}
48
- - name: Install cf_xarray
38
+ python-version: ${{ matrix.python-version }}
39
+
40
+ - name: Install uv
41
+ uses: astral-sh/setup-uv@v4
42
+
43
+ - name: Install dependencies
49
44
  run: |
50
- python -m pip install --no-deps -e .
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
@@ -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.7
3
+ Version: 0.10.9
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>=2023.09.0
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"
@@ -3,7 +3,7 @@ from packaging.version import Version
3
3
 
4
4
  from . import geometry as geometry
5
5
  from . import sgrid # noqa
6
- from .accessor import CFAccessor # noqa
6
+ from .accessor import CFAccessor, GridMapping # noqa
7
7
  from .coding import ( # noqa
8
8
  decode_compress_to_multi_index,
9
9
  encode_multi_index_as_compress,
@@ -0,0 +1 @@
1
+ __version__ = "0.10.9"