zarr-cm 0.1.0__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 (43) hide show
  1. zarr_cm-0.1.0/.copier-answers.yml +13 -0
  2. zarr_cm-0.1.0/.git_archival.txt +3 -0
  3. zarr_cm-0.1.0/.gitattributes +1 -0
  4. zarr_cm-0.1.0/.github/CONTRIBUTING.md +77 -0
  5. zarr_cm-0.1.0/.github/dependabot.yml +11 -0
  6. zarr_cm-0.1.0/.github/release.yml +5 -0
  7. zarr_cm-0.1.0/.github/workflows/cd.yml +56 -0
  8. zarr_cm-0.1.0/.github/workflows/ci.yml +77 -0
  9. zarr_cm-0.1.0/.gitignore +188 -0
  10. zarr_cm-0.1.0/.pre-commit-config.yaml +95 -0
  11. zarr_cm-0.1.0/.readthedocs.yaml +15 -0
  12. zarr_cm-0.1.0/LICENSE +29 -0
  13. zarr_cm-0.1.0/PKG-INFO +131 -0
  14. zarr_cm-0.1.0/README.md +104 -0
  15. zarr_cm-0.1.0/docs/api.md +26 -0
  16. zarr_cm-0.1.0/docs/index.md +75 -0
  17. zarr_cm-0.1.0/mkdocs.yml +55 -0
  18. zarr_cm-0.1.0/noxfile.py +85 -0
  19. zarr_cm-0.1.0/pyproject.toml +180 -0
  20. zarr_cm-0.1.0/src/zarr_cm/__init__.py +44 -0
  21. zarr_cm-0.1.0/src/zarr_cm/_core.py +98 -0
  22. zarr_cm-0.1.0/src/zarr_cm/_version.py +34 -0
  23. zarr_cm-0.1.0/src/zarr_cm/_version.pyi +2 -0
  24. zarr_cm-0.1.0/src/zarr_cm/geo_proj.py +94 -0
  25. zarr_cm-0.1.0/src/zarr_cm/license.py +105 -0
  26. zarr_cm-0.1.0/src/zarr_cm/multiscales.py +116 -0
  27. zarr_cm-0.1.0/src/zarr_cm/py.typed +0 -0
  28. zarr_cm-0.1.0/src/zarr_cm/spatial.py +133 -0
  29. zarr_cm-0.1.0/src/zarr_cm/uom.py +95 -0
  30. zarr_cm-0.1.0/tests/conftest.py +8 -0
  31. zarr_cm-0.1.0/tests/schemas/geo-proj.json +112 -0
  32. zarr_cm-0.1.0/tests/schemas/license.json +123 -0
  33. zarr_cm-0.1.0/tests/schemas/multiscales.json +152 -0
  34. zarr_cm-0.1.0/tests/schemas/spatial.json +226 -0
  35. zarr_cm-0.1.0/tests/schemas/uom.json +108 -0
  36. zarr_cm-0.1.0/tests/schemas/zarr-conventions-schema.json +67 -0
  37. zarr_cm-0.1.0/tests/test_docs.py +12 -0
  38. zarr_cm-0.1.0/tests/test_geo_proj.py +148 -0
  39. zarr_cm-0.1.0/tests/test_license.py +131 -0
  40. zarr_cm-0.1.0/tests/test_multiscales.py +178 -0
  41. zarr_cm-0.1.0/tests/test_package.py +21 -0
  42. zarr_cm-0.1.0/tests/test_spatial.py +174 -0
  43. zarr_cm-0.1.0/tests/test_uom.py +132 -0
@@ -0,0 +1,13 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: 2025.11.21-26-gab443cc
3
+ _src_path: gh:scientific-python/cookie
4
+ backend: hatch
5
+ docs: mkdocs
6
+ email: davis.v.bennett@gmail.com
7
+ full_name: Davis Bennett
8
+ license: BSD
9
+ org: zarr-conventions
10
+ project_name: zarr-cm
11
+ project_short_description: Python implementation of Zarr Conventions Metadata
12
+ url: https://github.com/zarr-conventions/zarr-cm
13
+ vcs: true
@@ -0,0 +1,3 @@
1
+ node: $Format:%H$
2
+ node-date: $Format:%cI$
3
+ describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
@@ -0,0 +1 @@
1
+ .git_archival.txt export-subst
@@ -0,0 +1,77 @@
1
+ See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
2
+ description of best practices for developing scientific packages.
3
+
4
+ [spc-dev-intro]: https://learn.scientific-python.org/development/
5
+
6
+ # Quick development
7
+
8
+ The fastest way to start with development is to use nox. If you don't have nox,
9
+ you can use `uvx nox` to run it without installing, or `uv tool install nox`. If
10
+ you don't have uv, you can
11
+ [install it a variety of ways](https://docs.astral.sh/uv/getting-started/installation/),
12
+ including with pip, pipx, brew, and just downloading the binary (single file).
13
+
14
+ To use, run `nox`. This will lint and test using every installed version of
15
+ Python on your system, skipping ones that are not installed. You can also run
16
+ specific jobs:
17
+
18
+ ```console
19
+ $ nox -s lint # Lint only
20
+ $ nox -s tests # Python tests
21
+ $ nox -s docs # Build and serve the docs
22
+ $ nox -s build # Make an SDist and wheel
23
+ ```
24
+
25
+ Nox handles everything for you, including setting up an temporary virtual
26
+ environment for each run.
27
+
28
+ # Setting up a development environment manually
29
+
30
+ You can set up a development environment by running:
31
+
32
+ ```bash
33
+ uv sync
34
+ ```
35
+
36
+ # Pre-commit
37
+
38
+ You should prepare pre-commit or prek, which will help you by checking that
39
+ commits pass required checks:
40
+
41
+ ```bash
42
+ uv tool install pre-commit # or brew install pre-commit on macOS
43
+ pre-commit install # Will install a pre-commit hook into the git repo
44
+ ```
45
+
46
+ You can also/alternatively run `pre-commit run` (changes only) or
47
+ `pre-commit run --all-files` to check even without installing the hook.
48
+
49
+ # Testing
50
+
51
+ Use pytest to run the unit checks:
52
+
53
+ ```bash
54
+ uv run pytest
55
+ ```
56
+
57
+ # Coverage
58
+
59
+ Use pytest-cov to generate coverage reports:
60
+
61
+ ```bash
62
+ uv run pytest --cov=zarr-cm
63
+ ```
64
+
65
+ # Building docs
66
+
67
+ You can build and serve the docs using:
68
+
69
+ ```bash
70
+ nox -s docs
71
+ ```
72
+
73
+ You can build the docs only with:
74
+
75
+ ```bash
76
+ nox -s docs --non-interactive
77
+ ```
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ # Maintain dependencies for GitHub Actions
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ groups:
9
+ actions:
10
+ patterns:
11
+ - "*"
@@ -0,0 +1,5 @@
1
+ changelog:
2
+ exclude:
3
+ authors:
4
+ - dependabot[bot]
5
+ - pre-commit-ci[bot]
@@ -0,0 +1,56 @@
1
+ name: CD
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+ release:
10
+ types:
11
+ - published
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ env:
18
+ # Many color libraries just need this to be set to any value, but at least
19
+ # one distinguishes color depth, where "3" -> "256-bit color".
20
+ FORCE_COLOR: 3
21
+
22
+ jobs:
23
+ dist:
24
+ name: Distribution build
25
+ runs-on: ubuntu-latest
26
+
27
+ steps:
28
+ - uses: actions/checkout@v6
29
+ with:
30
+ fetch-depth: 0
31
+
32
+ - uses: hynek/build-and-inspect-python-package@v2
33
+
34
+ publish:
35
+ needs: [dist]
36
+ name: Publish to PyPI
37
+ environment: pypi
38
+ permissions:
39
+ id-token: write
40
+ attestations: write
41
+ contents: read
42
+ runs-on: ubuntu-latest
43
+ if: github.event_name == 'release' && github.event.action == 'published'
44
+
45
+ steps:
46
+ - uses: actions/download-artifact@v7
47
+ with:
48
+ name: Packages
49
+ path: dist
50
+
51
+ - name: Generate artifact attestation for sdist and wheel
52
+ uses: actions/attest-build-provenance@v3
53
+ with:
54
+ subject-path: "dist/*"
55
+
56
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,77 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ env:
15
+ # Many color libraries just need this variable to be set to any value.
16
+ # Set it to 3 to support 8-bit color graphics (256 colors per channel)
17
+ # for libraries that care about the value set.
18
+ FORCE_COLOR: 3
19
+
20
+ jobs:
21
+ pre-commit:
22
+ name: Format
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v6
26
+ with:
27
+ fetch-depth: 0
28
+ - uses: actions/setup-python@v6
29
+ with:
30
+ python-version: "3.x"
31
+
32
+ - uses: astral-sh/setup-uv@v7
33
+
34
+ - uses: pre-commit/action@v3.0.1
35
+ with:
36
+ extra_args: --hook-stage manual --all-files
37
+ - name: Run Pylint
38
+ run: uvx nox -s pylint -- --output-format=github
39
+
40
+ checks:
41
+ name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
42
+ runs-on: ${{ matrix.runs-on }}
43
+ needs: [pre-commit]
44
+ strategy:
45
+ fail-fast: false
46
+ matrix:
47
+ python-version: ["3.11", "3.14"]
48
+ runs-on: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]
49
+
50
+ include:
51
+ - python-version: "pypy-3.11"
52
+ runs-on: ubuntu-latest
53
+
54
+ steps:
55
+ - uses: actions/checkout@v6
56
+ with:
57
+ fetch-depth: 0
58
+
59
+ - uses: actions/setup-python@v6
60
+ with:
61
+ python-version: ${{ matrix.python-version }}
62
+ allow-prereleases: true
63
+
64
+ - uses: astral-sh/setup-uv@v7
65
+
66
+ - name: Install package
67
+ run: uv sync
68
+
69
+ - name: Test package
70
+ run: >-
71
+ uv run pytest -ra --cov --cov-report=xml --cov-report=term
72
+ --durations=20
73
+
74
+ - name: Upload coverage report
75
+ uses: codecov/codecov-action@v5
76
+ with:
77
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,188 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # setuptools_scm
171
+ src/*/_version.py
172
+
173
+
174
+ # ruff
175
+ .ruff_cache/
176
+
177
+ # OS specific stuff
178
+ .DS_Store
179
+ .DS_Store?
180
+ ._*
181
+ .Spotlight-V100
182
+ .Trashes
183
+ ehthumbs.db
184
+ Thumbs.db
185
+
186
+ # Common editor files
187
+ *~
188
+ *.swp
@@ -0,0 +1,95 @@
1
+ ci:
2
+ autoupdate_commit_msg: "chore(deps): update pre-commit hooks"
3
+ autofix_commit_msg: "style: pre-commit fixes"
4
+ autoupdate_schedule: "monthly"
5
+
6
+ exclude: ^.cruft.json|.copier-answers.yml$
7
+
8
+ repos:
9
+ - repo: https://github.com/adamchainz/blacken-docs
10
+ rev: "1.20.0"
11
+ hooks:
12
+ - id: blacken-docs
13
+ additional_dependencies: [black==25.*]
14
+
15
+ - repo: https://github.com/pre-commit/pre-commit-hooks
16
+ rev: "v6.0.0"
17
+ hooks:
18
+ - id: check-added-large-files
19
+ - id: check-case-conflict
20
+ - id: check-merge-conflict
21
+ - id: check-symlinks
22
+ - id: check-yaml
23
+ - id: debug-statements
24
+ - id: end-of-file-fixer
25
+ - id: mixed-line-ending
26
+ - id: name-tests-test
27
+ args: ["--pytest-test-first"]
28
+ - id: requirements-txt-fixer
29
+ - id: trailing-whitespace
30
+
31
+ - repo: https://github.com/pre-commit/pygrep-hooks
32
+ rev: "v1.10.0"
33
+ hooks:
34
+ - id: rst-backticks
35
+ - id: rst-directive-colons
36
+ - id: rst-inline-touching-normal
37
+
38
+ - repo: https://github.com/rbubley/mirrors-prettier
39
+ rev: "v3.7.4"
40
+ hooks:
41
+ - id: prettier
42
+ types_or: [yaml, markdown, html, css, scss, javascript, json]
43
+ args: [--prose-wrap=always]
44
+
45
+ - repo: https://github.com/astral-sh/ruff-pre-commit
46
+ rev: "v0.14.11"
47
+ hooks:
48
+ - id: ruff-check
49
+ args: ["--fix", "--show-fixes"]
50
+ - id: ruff-format
51
+
52
+ - repo: https://github.com/pre-commit/mirrors-mypy
53
+ rev: "v1.19.1"
54
+ hooks:
55
+ - id: mypy
56
+ files: src|tests|noxfile.py
57
+ args: []
58
+ additional_dependencies:
59
+ - nox
60
+ - pytest
61
+ - pytest-examples
62
+ - types-jsonschema
63
+
64
+ - repo: https://github.com/codespell-project/codespell
65
+ rev: "v2.4.1"
66
+ hooks:
67
+ - id: codespell
68
+ additional_dependencies:
69
+ - tomli; python_version<'3.11'
70
+
71
+ - repo: https://github.com/shellcheck-py/shellcheck-py
72
+ rev: "v0.11.0.1"
73
+ hooks:
74
+ - id: shellcheck
75
+
76
+ - repo: local
77
+ hooks:
78
+ - id: disallow-caps
79
+ name: Disallow improper capitalization
80
+ language: pygrep
81
+ entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
82
+ exclude: .pre-commit-config.yaml
83
+
84
+ - repo: https://github.com/abravalheri/validate-pyproject
85
+ rev: "v0.24.1"
86
+ hooks:
87
+ - id: validate-pyproject
88
+ additional_dependencies: ["validate-pyproject-schema-store[all]"]
89
+
90
+ - repo: https://github.com/python-jsonschema/check-jsonschema
91
+ rev: "0.36.0"
92
+ hooks:
93
+ - id: check-dependabot
94
+ - id: check-github-workflows
95
+ - id: check-readthedocs
@@ -0,0 +1,15 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ version: 2
5
+
6
+ build:
7
+ os: ubuntu-24.04
8
+ tools:
9
+ python: "3.13"
10
+ commands:
11
+ - asdf plugin add uv
12
+ - asdf install uv latest
13
+ - asdf global uv latest
14
+ - uv sync --group docs
15
+ - uv run mkdocs build --site-dir $READTHEDOCS_OUTPUT/html
zarr_cm-0.1.0/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Davis Bennett.
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of the vector package developers nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.