Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5.0.2
with:
fetch-depth: 1
# Full history + tags so hatch-vcs can resolve the package version
# during `uv sync` (the editable install runs the version hook).
fetch-depth: 0
persist-credentials: false

- name: Install a specific version of uv
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ __pycache__/
*.so

# Distribution / packaging
packages/datacube-benchmark/src/datacube_benchmark/_version.py
.Python
env/
.venv/
Expand Down
12 changes: 10 additions & 2 deletions packages/datacube-benchmark/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "datacube-benchmark"
version = "0.1.0"
dynamic = ["version"]
description = "Utilities to benchmark datacubes with various formats, compressions, and chunking schemes."
readme = "README.md"
authors = [
Expand Down Expand Up @@ -31,9 +31,17 @@ dependencies = [
datacube-benchmark = "datacube_benchmark:main"

[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"
# The package lives in a workspace subdirectory; point setuptools-scm at the repo root.
raw-options = { root = "../.." }

[tool.hatch.build.hooks.vcs]
version-file = "src/datacube_benchmark/_version.py"

[tool.numpydoc_validation]
# See https://numpydoc.readthedocs.io/en/latest/validation.html#built-in-validation-checks for list of checks
checks = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@

import numpy as np

try:
from ._version import __version__
except ImportError: # pragma: no cover - _version.py is generated at build time
__version__ = "0.0.0+unknown"

__all__ = [
"__version__",
"Config",
"create_empty_dataarray",
"create_zarr_store",
Expand Down
Loading