zarr-vectors 0.2.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.
- zarr_vectors-0.2.0/.github/workflows/release.yml +140 -0
- zarr_vectors-0.2.0/.github/workflows/tests.yml +67 -0
- zarr_vectors-0.2.0/.gitignore +38 -0
- zarr_vectors-0.2.0/.readthedocs.yaml +19 -0
- zarr_vectors-0.2.0/LICENSE +11 -0
- zarr_vectors-0.2.0/PKG-INFO +103 -0
- zarr_vectors-0.2.0/README.md +53 -0
- zarr_vectors-0.2.0/assets/zarr-vectors-explainer.webm +0 -0
- zarr_vectors-0.2.0/assets/zarr-vectors-planning.pdf +0 -0
- zarr_vectors-0.2.0/assets/zarr-vectors.png +0 -0
- zarr_vectors-0.2.0/benchmarks/01_size_scaling.ipynb +333 -0
- zarr_vectors-0.2.0/benchmarks/02_data_types.ipynb +409 -0
- zarr_vectors-0.2.0/benchmarks/03_backends.ipynb +230 -0
- zarr_vectors-0.2.0/benchmarks/README.md +61 -0
- zarr_vectors-0.2.0/benchmarks/_build.py +698 -0
- zarr_vectors-0.2.0/docs/_static/custom.css +120 -0
- zarr_vectors-0.2.0/docs/_static/zarr-vectors-logo.png +0 -0
- zarr_vectors-0.2.0/docs/api/constants.rst +42 -0
- zarr_vectors-0.2.0/docs/api/index.rst +17 -0
- zarr_vectors-0.2.0/docs/api/ingest.rst +9 -0
- zarr_vectors-0.2.0/docs/api/lazy.rst +29 -0
- zarr_vectors-0.2.0/docs/api/spatial.rst +31 -0
- zarr_vectors-0.2.0/docs/api/types.rst +60 -0
- zarr_vectors-0.2.0/docs/api/typing.rst +51 -0
- zarr_vectors-0.2.0/docs/api/validate.rst +41 -0
- zarr_vectors-0.2.0/docs/api/zarr_vectors.rst +36 -0
- zarr_vectors-0.2.0/docs/benchmarks/index.md +84 -0
- zarr_vectors-0.2.0/docs/conf.py +118 -0
- zarr_vectors-0.2.0/docs/explainer.html +190 -0
- zarr_vectors-0.2.0/docs/getting_started/concepts.md +278 -0
- zarr_vectors-0.2.0/docs/getting_started/faq.md +182 -0
- zarr_vectors-0.2.0/docs/getting_started/installation.md +93 -0
- zarr_vectors-0.2.0/docs/getting_started/quickstart.md +155 -0
- zarr_vectors-0.2.0/docs/how_to/choose_chunk_and_bin.md +212 -0
- zarr_vectors-0.2.0/docs/how_to/cite.md +73 -0
- zarr_vectors-0.2.0/docs/how_to/hpc_pipelines.md +244 -0
- zarr_vectors-0.2.0/docs/how_to/memory_efficient_writes.md +174 -0
- zarr_vectors-0.2.0/docs/index.rst +108 -0
- zarr_vectors-0.2.0/docs/requirements-docs.txt +18 -0
- zarr_vectors-0.2.0/docs/spec/chunking/attribute_chunking.md +202 -0
- zarr_vectors-0.2.0/docs/spec/chunking/bin_shape.md +223 -0
- zarr_vectors-0.2.0/docs/spec/chunking/chunk_shape.md +205 -0
- zarr_vectors-0.2.0/docs/spec/chunking/chunk_vs_bin.md +191 -0
- zarr_vectors-0.2.0/docs/spec/chunking/rechunking.md +208 -0
- zarr_vectors-0.2.0/docs/spec/chunking/sharding.md +196 -0
- zarr_vectors-0.2.0/docs/spec/comparisons/neuroglancer_precomputed.md +195 -0
- zarr_vectors-0.2.0/docs/spec/comparisons/ome_zarr.md +165 -0
- zarr_vectors-0.2.0/docs/spec/comparisons/trx_format.md +153 -0
- zarr_vectors-0.2.0/docs/spec/contributing/adding_geometry_types.md +302 -0
- zarr_vectors-0.2.0/docs/spec/contributing/spec_change_process.md +157 -0
- zarr_vectors-0.2.0/docs/spec/contributing/test_compliance.md +239 -0
- zarr_vectors-0.2.0/docs/spec/foundations/codec_pipeline.md +222 -0
- zarr_vectors-0.2.0/docs/spec/foundations/dimensionality.md +232 -0
- zarr_vectors-0.2.0/docs/spec/foundations/store_types.md +306 -0
- zarr_vectors-0.2.0/docs/spec/foundations/zarr_v3_primer.md +182 -0
- zarr_vectors-0.2.0/docs/spec/geometry_types/graph.md +199 -0
- zarr_vectors-0.2.0/docs/spec/geometry_types/index.md +64 -0
- zarr_vectors-0.2.0/docs/spec/geometry_types/line.md +157 -0
- zarr_vectors-0.2.0/docs/spec/geometry_types/mesh.md +200 -0
- zarr_vectors-0.2.0/docs/spec/geometry_types/point_cloud.md +156 -0
- zarr_vectors-0.2.0/docs/spec/geometry_types/polyline.md +183 -0
- zarr_vectors-0.2.0/docs/spec/geometry_types/skeleton.md +178 -0
- zarr_vectors-0.2.0/docs/spec/geometry_types/streamline.md +180 -0
- zarr_vectors-0.2.0/docs/spec/index.md +96 -0
- zarr_vectors-0.2.0/docs/spec/layout/chunk_arrays.md +230 -0
- zarr_vectors-0.2.0/docs/spec/layout/directory_structure.md +264 -0
- zarr_vectors-0.2.0/docs/spec/layout/level_groups.md +198 -0
- zarr_vectors-0.2.0/docs/spec/layout/root_metadata.md +186 -0
- zarr_vectors-0.2.0/docs/spec/layout/vg_index_arrays.md +548 -0
- zarr_vectors-0.2.0/docs/spec/multiscale/multiscale_metadata.md +230 -0
- zarr_vectors-0.2.0/docs/spec/multiscale/pyramid_construction.md +326 -0
- zarr_vectors-0.2.0/docs/spec/multiscale/sparsity.md +239 -0
- zarr_vectors-0.2.0/docs/spec/object_model/cross_chunk_links.md +327 -0
- zarr_vectors-0.2.0/docs/spec/object_model/object_attributes.md +258 -0
- zarr_vectors-0.2.0/docs/spec/object_model/object_manifest.md +403 -0
- zarr_vectors-0.2.0/docs/spec/object_model/vertex_groups.md +262 -0
- zarr_vectors-0.2.0/docs/spec/schema.md +28 -0
- zarr_vectors-0.2.0/docs/spec/validation/l1_structural.md +120 -0
- zarr_vectors-0.2.0/docs/spec/validation/l2_metadata.md +133 -0
- zarr_vectors-0.2.0/docs/spec/validation/l3_consistency.md +161 -0
- zarr_vectors-0.2.0/docs/spec/validation/overview.md +145 -0
- zarr_vectors-0.2.0/docs/tutorials/data_types/graphs_skeletons.md +260 -0
- zarr_vectors-0.2.0/docs/tutorials/data_types/meshes.md +284 -0
- zarr_vectors-0.2.0/docs/tutorials/data_types/point_clouds.md +278 -0
- zarr_vectors-0.2.0/docs/tutorials/data_types/polylines_streamlines.md +259 -0
- zarr_vectors-0.2.0/docs/tutorials/io/cloud_stores.md +335 -0
- zarr_vectors-0.2.0/docs/tutorials/io/ingest_formats.md +12 -0
- zarr_vectors-0.2.0/docs/tutorials/io/validation_and_repair.md +321 -0
- zarr_vectors-0.2.0/docs/tutorials/multiscale/building_pyramids.md +382 -0
- zarr_vectors-0.2.0/docs/tutorials/multiscale/lazy_loading.md +308 -0
- zarr_vectors-0.2.0/docs/tutorials/neuroglancer/layer_api.md +343 -0
- zarr_vectors-0.2.0/docs/tutorials/neuroglancer/local_viewer.md +375 -0
- zarr_vectors-0.2.0/docs/tutorials/neuroglancer/overview.md +153 -0
- zarr_vectors-0.2.0/docs/tutorials/neuroglancer/precomputed_export.md +11 -0
- zarr_vectors-0.2.0/docs/tutorials/neuroglancer/shell_console.md +393 -0
- zarr_vectors-0.2.0/docs/tutorials/neuroglancer/zv_ngtools_install.md +177 -0
- zarr_vectors-0.2.0/docs/zarr-vectors.png +0 -0
- zarr_vectors-0.2.0/examples/01_point_clouds.ipynb +432 -0
- zarr_vectors-0.2.0/examples/02_lines.ipynb +146 -0
- zarr_vectors-0.2.0/examples/03_polylines_streamlines.ipynb +479 -0
- zarr_vectors-0.2.0/examples/04_graphs.ipynb +316 -0
- zarr_vectors-0.2.0/examples/05_skeletons.ipynb +32 -0
- zarr_vectors-0.2.0/examples/06_meshes.ipynb +32 -0
- zarr_vectors-0.2.0/examples/07_multiscale_links.ipynb +557 -0
- zarr_vectors-0.2.0/pyproject.toml +111 -0
- zarr_vectors-0.2.0/schema/README.md +112 -0
- zarr_vectors-0.2.0/schema/reference.md +9790 -0
- zarr_vectors-0.2.0/schema/regen.py +124 -0
- zarr_vectors-0.2.0/schema/zarr_vectors.linkml.yaml +598 -0
- zarr_vectors-0.2.0/schema/zarr_vectors.schema.json +704 -0
- zarr_vectors-0.2.0/setup.cfg +4 -0
- zarr_vectors-0.2.0/tests/__init__.py +0 -0
- zarr_vectors-0.2.0/tests/conftest.py +268 -0
- zarr_vectors-0.2.0/tests/fixtures/__init__.py +0 -0
- zarr_vectors-0.2.0/tests/integration/__init__.py +0 -0
- zarr_vectors-0.2.0/tests/integration/test_binning_sparsity.py +288 -0
- zarr_vectors-0.2.0/tests/integration/test_lazy_sharding_rechunk.py +359 -0
- zarr_vectors-0.2.0/tests/test_arrays.py +568 -0
- zarr_vectors-0.2.0/tests/test_async_backend.py +123 -0
- zarr_vectors-0.2.0/tests/test_attr_chunking.py +492 -0
- zarr_vectors-0.2.0/tests/test_backends.py +302 -0
- zarr_vectors-0.2.0/tests/test_batched_reads.py +161 -0
- zarr_vectors-0.2.0/tests/test_batched_writes.py +159 -0
- zarr_vectors-0.2.0/tests/test_chunk_helpers.py +97 -0
- zarr_vectors-0.2.0/tests/test_core.py +762 -0
- zarr_vectors-0.2.0/tests/test_cross_chunk_faces.py +76 -0
- zarr_vectors-0.2.0/tests/test_encoding.py +206 -0
- zarr_vectors-0.2.0/tests/test_fragments.py +279 -0
- zarr_vectors-0.2.0/tests/test_graphs.py +86 -0
- zarr_vectors-0.2.0/tests/test_headers.py +89 -0
- zarr_vectors-0.2.0/tests/test_icechunk_backend.py +229 -0
- zarr_vectors-0.2.0/tests/test_lazy_writer.py +192 -0
- zarr_vectors-0.2.0/tests/test_lines_parametric.py +326 -0
- zarr_vectors-0.2.0/tests/test_linkml_schema.py +277 -0
- zarr_vectors-0.2.0/tests/test_meshes.py +85 -0
- zarr_vectors-0.2.0/tests/test_multiscale_links.py +383 -0
- zarr_vectors-0.2.0/tests/test_object_index_blocks.py +179 -0
- zarr_vectors-0.2.0/tests/test_object_index_layout.py +155 -0
- zarr_vectors-0.2.0/tests/test_paths.py +55 -0
- zarr_vectors-0.2.0/tests/test_per_level_chunk_shape.py +305 -0
- zarr_vectors-0.2.0/tests/test_per_object_pyramid.py +300 -0
- zarr_vectors-0.2.0/tests/test_perf_writes.py +145 -0
- zarr_vectors-0.2.0/tests/test_points.py +462 -0
- zarr_vectors-0.2.0/tests/test_polylines.py +306 -0
- zarr_vectors-0.2.0/tests/test_rechunk_by_attribute.py +152 -0
- zarr_vectors-0.2.0/tests/test_scaffolding.py +136 -0
- zarr_vectors-0.2.0/tests/test_spatial.py +435 -0
- zarr_vectors-0.2.0/tests/test_zarr_store_dispatch.py +142 -0
- zarr_vectors-0.2.0/tests/test_zv_rename.py +104 -0
- zarr_vectors-0.2.0/uv.lock +3960 -0
- zarr_vectors-0.2.0/zarr_vectors/__init__.py +52 -0
- zarr_vectors-0.2.0/zarr_vectors/_version.py +24 -0
- zarr_vectors-0.2.0/zarr_vectors/composite.py +486 -0
- zarr_vectors-0.2.0/zarr_vectors/constants.py +330 -0
- zarr_vectors-0.2.0/zarr_vectors/core/__init__.py +0 -0
- zarr_vectors-0.2.0/zarr_vectors/core/_batch_reader.py +143 -0
- zarr_vectors-0.2.0/zarr_vectors/core/_batch_writer.py +240 -0
- zarr_vectors-0.2.0/zarr_vectors/core/arrays.py +1786 -0
- zarr_vectors-0.2.0/zarr_vectors/core/attr_chunking.py +118 -0
- zarr_vectors-0.2.0/zarr_vectors/core/backends/__init__.py +203 -0
- zarr_vectors-0.2.0/zarr_vectors/core/backends/async_base.py +84 -0
- zarr_vectors-0.2.0/zarr_vectors/core/backends/base.py +84 -0
- zarr_vectors-0.2.0/zarr_vectors/core/backends/fsspec_backend.py +226 -0
- zarr_vectors-0.2.0/zarr_vectors/core/backends/icechunk_backend.py +183 -0
- zarr_vectors-0.2.0/zarr_vectors/core/backends/local.py +175 -0
- zarr_vectors-0.2.0/zarr_vectors/core/backends/obstore_backend.py +265 -0
- zarr_vectors-0.2.0/zarr_vectors/core/group.py +546 -0
- zarr_vectors-0.2.0/zarr_vectors/core/metadata.py +1125 -0
- zarr_vectors-0.2.0/zarr_vectors/core/multiscale.py +281 -0
- zarr_vectors-0.2.0/zarr_vectors/core/paths.py +75 -0
- zarr_vectors-0.2.0/zarr_vectors/core/store.py +1429 -0
- zarr_vectors-0.2.0/zarr_vectors/encoding/__init__.py +0 -0
- zarr_vectors-0.2.0/zarr_vectors/encoding/categorical.py +185 -0
- zarr_vectors-0.2.0/zarr_vectors/encoding/compression.py +148 -0
- zarr_vectors-0.2.0/zarr_vectors/encoding/draco.py +264 -0
- zarr_vectors-0.2.0/zarr_vectors/encoding/fragments.py +682 -0
- zarr_vectors-0.2.0/zarr_vectors/encoding/ragged.py +234 -0
- zarr_vectors-0.2.0/zarr_vectors/exceptions.py +63 -0
- zarr_vectors-0.2.0/zarr_vectors/headers/__init__.py +11 -0
- zarr_vectors-0.2.0/zarr_vectors/headers/registry.py +116 -0
- zarr_vectors-0.2.0/zarr_vectors/lazy/__init__.py +20 -0
- zarr_vectors-0.2.0/zarr_vectors/lazy/arrays.py +363 -0
- zarr_vectors-0.2.0/zarr_vectors/lazy/level.py +403 -0
- zarr_vectors-0.2.0/zarr_vectors/lazy/store.py +218 -0
- zarr_vectors-0.2.0/zarr_vectors/lazy/views.py +522 -0
- zarr_vectors-0.2.0/zarr_vectors/lazy/writer.py +663 -0
- zarr_vectors-0.2.0/zarr_vectors/multiresolution/__init__.py +0 -0
- zarr_vectors-0.2.0/zarr_vectors/multiresolution/coarsen.py +957 -0
- zarr_vectors-0.2.0/zarr_vectors/multiresolution/metanodes.py +127 -0
- zarr_vectors-0.2.0/zarr_vectors/multiresolution/object_selection.py +406 -0
- zarr_vectors-0.2.0/zarr_vectors/multiresolution/strategies/__init__.py +0 -0
- zarr_vectors-0.2.0/zarr_vectors/multiresolution/strategies/graphs.py +280 -0
- zarr_vectors-0.2.0/zarr_vectors/multiresolution/strategies/meshes.py +229 -0
- zarr_vectors-0.2.0/zarr_vectors/multiresolution/strategies/points.py +196 -0
- zarr_vectors-0.2.0/zarr_vectors/multiresolution/strategies/polylines.py +282 -0
- zarr_vectors-0.2.0/zarr_vectors/ops/__init__.py +0 -0
- zarr_vectors-0.2.0/zarr_vectors/rechunk/__init__.py +61 -0
- zarr_vectors-0.2.0/zarr_vectors/rechunk/engine.py +349 -0
- zarr_vectors-0.2.0/zarr_vectors/rechunk/rebin.py +200 -0
- zarr_vectors-0.2.0/zarr_vectors/rechunk/spec.py +181 -0
- zarr_vectors-0.2.0/zarr_vectors/sharding/__init__.py +16 -0
- zarr_vectors-0.2.0/zarr_vectors/sharding/hilbert.py +140 -0
- zarr_vectors-0.2.0/zarr_vectors/sharding/io.py +321 -0
- zarr_vectors-0.2.0/zarr_vectors/sharding/layout.py +98 -0
- zarr_vectors-0.2.0/zarr_vectors/sharding/morton.py +69 -0
- zarr_vectors-0.2.0/zarr_vectors/spatial/__init__.py +0 -0
- zarr_vectors-0.2.0/zarr_vectors/spatial/boundary.py +444 -0
- zarr_vectors-0.2.0/zarr_vectors/spatial/chunking.py +429 -0
- zarr_vectors-0.2.0/zarr_vectors/types/__init__.py +0 -0
- zarr_vectors-0.2.0/zarr_vectors/types/graphs.py +854 -0
- zarr_vectors-0.2.0/zarr_vectors/types/lines.py +515 -0
- zarr_vectors-0.2.0/zarr_vectors/types/meshes.py +591 -0
- zarr_vectors-0.2.0/zarr_vectors/types/parametric.py +317 -0
- zarr_vectors-0.2.0/zarr_vectors/types/points.py +830 -0
- zarr_vectors-0.2.0/zarr_vectors/types/polylines.py +691 -0
- zarr_vectors-0.2.0/zarr_vectors/typing.py +104 -0
- zarr_vectors-0.2.0/zarr_vectors/validate/__init__.py +40 -0
- zarr_vectors-0.2.0/zarr_vectors/validate/conformance.py +192 -0
- zarr_vectors-0.2.0/zarr_vectors/validate/consistency.py +204 -0
- zarr_vectors-0.2.0/zarr_vectors/validate/metadata.py +170 -0
- zarr_vectors-0.2.0/zarr_vectors/validate/structure.py +125 -0
- zarr_vectors-0.2.0/zarr_vectors.egg-info/PKG-INFO +103 -0
- zarr_vectors-0.2.0/zarr_vectors.egg-info/SOURCES.txt +224 -0
- zarr_vectors-0.2.0/zarr_vectors.egg-info/dependency_links.txt +1 -0
- zarr_vectors-0.2.0/zarr_vectors.egg-info/requires.txt +38 -0
- zarr_vectors-0.2.0/zarr_vectors.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Manually-triggered release: bump the version (patch / minor / major)
|
|
4
|
+
# from the latest ``v*`` git tag, create and push the new tag, build
|
|
5
|
+
# sdist + wheel from that tagged commit, and publish to PyPI via
|
|
6
|
+
# Trusted Publishing (OIDC — no API token in secrets).
|
|
7
|
+
#
|
|
8
|
+
# Before the first run, configure PyPI Trusted Publishing for project
|
|
9
|
+
# ``zarr-vectors``:
|
|
10
|
+
# https://pypi.org/manage/account/publishing/
|
|
11
|
+
# Pending publisher fields:
|
|
12
|
+
# PyPI project name: zarr-vectors
|
|
13
|
+
# Owner: AllenInstitute
|
|
14
|
+
# Repository name: zarr-vectors-py
|
|
15
|
+
# Workflow filename: release.yml
|
|
16
|
+
# Environment name: pypi
|
|
17
|
+
# Then create a ``pypi`` environment on the repo (Settings → Environments)
|
|
18
|
+
# — empty deployment-protection rules are fine to start; add required
|
|
19
|
+
# reviewers once you want a human approval gate before each upload.
|
|
20
|
+
|
|
21
|
+
on:
|
|
22
|
+
workflow_dispatch:
|
|
23
|
+
inputs:
|
|
24
|
+
bump:
|
|
25
|
+
description: "Version bump"
|
|
26
|
+
required: true
|
|
27
|
+
type: choice
|
|
28
|
+
options: [patch, minor, major]
|
|
29
|
+
dry-run:
|
|
30
|
+
description: "Compute version + build, but skip tag push and PyPI upload"
|
|
31
|
+
required: true
|
|
32
|
+
default: 'false'
|
|
33
|
+
type: choice
|
|
34
|
+
options: ['false', 'true']
|
|
35
|
+
|
|
36
|
+
permissions:
|
|
37
|
+
contents: write # to create + push the new tag and the GitHub release
|
|
38
|
+
id-token: write # to authenticate to PyPI via OIDC (Trusted Publishing)
|
|
39
|
+
|
|
40
|
+
concurrency:
|
|
41
|
+
group: release
|
|
42
|
+
cancel-in-progress: false
|
|
43
|
+
|
|
44
|
+
jobs:
|
|
45
|
+
release:
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
environment: pypi # required by PyPI Trusted Publishing
|
|
48
|
+
steps:
|
|
49
|
+
- name: Checkout (full history for setuptools-scm)
|
|
50
|
+
uses: actions/checkout@v4
|
|
51
|
+
with:
|
|
52
|
+
fetch-depth: 0
|
|
53
|
+
# Tags don't fetch by default with shallow clones; depth: 0
|
|
54
|
+
# pulls the full ref history + tags so setuptools-scm can
|
|
55
|
+
# resolve the latest tag.
|
|
56
|
+
|
|
57
|
+
- name: Set up Python
|
|
58
|
+
uses: actions/setup-python@v5
|
|
59
|
+
with:
|
|
60
|
+
python-version: "3.12"
|
|
61
|
+
|
|
62
|
+
- name: Compute next version
|
|
63
|
+
id: bump
|
|
64
|
+
run: |
|
|
65
|
+
set -euo pipefail
|
|
66
|
+
# Latest ``v*`` tag, sorted by semver (refname desc). Default
|
|
67
|
+
# to ``v0.0.0`` when no release tags exist yet so the first
|
|
68
|
+
# patch bump produces ``v0.0.1``, first minor ``v0.1.0``,
|
|
69
|
+
# first major ``v1.0.0``.
|
|
70
|
+
LAST_TAG="$(git tag --list 'v*' --sort=-v:refname | head -n1)"
|
|
71
|
+
LAST_TAG="${LAST_TAG:-v0.0.0}"
|
|
72
|
+
VERSION="${LAST_TAG#v}"
|
|
73
|
+
IFS='.' read -r MAJOR MINOR PATCH <<<"$VERSION"
|
|
74
|
+
case "${{ inputs.bump }}" in
|
|
75
|
+
major) MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0 ;;
|
|
76
|
+
minor) MINOR=$((MINOR + 1)); PATCH=0 ;;
|
|
77
|
+
patch) PATCH=$((PATCH + 1)) ;;
|
|
78
|
+
esac
|
|
79
|
+
NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
|
80
|
+
NEW_TAG="v${NEW_VERSION}"
|
|
81
|
+
echo "last_tag=${LAST_TAG}"
|
|
82
|
+
echo "Computed new tag: ${NEW_TAG}"
|
|
83
|
+
{
|
|
84
|
+
echo "new_version=${NEW_VERSION}"
|
|
85
|
+
echo "new_tag=${NEW_TAG}"
|
|
86
|
+
echo "last_tag=${LAST_TAG}"
|
|
87
|
+
} >>"$GITHUB_OUTPUT"
|
|
88
|
+
|
|
89
|
+
- name: Create and push tag
|
|
90
|
+
if: inputs.dry-run != 'true'
|
|
91
|
+
run: |
|
|
92
|
+
set -euo pipefail
|
|
93
|
+
git config user.name "github-actions[bot]"
|
|
94
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
95
|
+
git tag -a "${{ steps.bump.outputs.new_tag }}" \
|
|
96
|
+
-m "Release ${{ steps.bump.outputs.new_tag }}"
|
|
97
|
+
git push origin "${{ steps.bump.outputs.new_tag }}"
|
|
98
|
+
|
|
99
|
+
- name: Install build tooling
|
|
100
|
+
run: python -m pip install --upgrade build
|
|
101
|
+
|
|
102
|
+
- name: Build sdist + wheel
|
|
103
|
+
run: |
|
|
104
|
+
set -euo pipefail
|
|
105
|
+
rm -rf dist build *.egg-info
|
|
106
|
+
python -m build
|
|
107
|
+
|
|
108
|
+
- name: Verify built version matches the new tag
|
|
109
|
+
run: |
|
|
110
|
+
set -euo pipefail
|
|
111
|
+
# The sdist filename contains the version setuptools-scm resolved.
|
|
112
|
+
# On dry-run runs the tag isn't pushed, but it's been created
|
|
113
|
+
# locally and setuptools-scm still picks it up from the working
|
|
114
|
+
# tree; the only way the assertion fails is if the build saw a
|
|
115
|
+
# stale tag, which would indicate setuptools_scm misconfiguration.
|
|
116
|
+
BUILT="$(ls dist/zarr_vectors-*.tar.gz | head -n1 | sed -E 's/.*zarr_vectors-(.+)\.tar\.gz/\1/')"
|
|
117
|
+
EXPECTED="${{ steps.bump.outputs.new_version }}"
|
|
118
|
+
echo "Built version: ${BUILT}"
|
|
119
|
+
echo "Expected: ${EXPECTED}"
|
|
120
|
+
if [ "${BUILT}" != "${EXPECTED}" ]; then
|
|
121
|
+
echo "::error::Built version ${BUILT} does not match expected ${EXPECTED}" >&2
|
|
122
|
+
exit 1
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
- name: Publish to PyPI (Trusted Publishing)
|
|
126
|
+
if: inputs.dry-run != 'true'
|
|
127
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
128
|
+
# No ``with:`` block. Trusted Publishing reads the OIDC token
|
|
129
|
+
# via ``id-token: write`` above and verifies the GitHub
|
|
130
|
+
# repo/workflow/environment matches the pending publisher
|
|
131
|
+
# configured at https://pypi.org/manage/account/publishing/.
|
|
132
|
+
|
|
133
|
+
- name: Create GitHub release
|
|
134
|
+
if: inputs.dry-run != 'true'
|
|
135
|
+
uses: softprops/action-gh-release@v2
|
|
136
|
+
with:
|
|
137
|
+
tag_name: ${{ steps.bump.outputs.new_tag }}
|
|
138
|
+
name: ${{ steps.bump.outputs.new_tag }}
|
|
139
|
+
files: dist/*
|
|
140
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
# Runs on every push to main and on PRs. PRs from OWNER / MEMBER /
|
|
4
|
+
# COLLABORATOR auto-run; PRs from outside contributors require a
|
|
5
|
+
# maintainer to add the `ci-approved` label before tests will run.
|
|
6
|
+
# Re-running after the label is added is automatic (the `labeled`
|
|
7
|
+
# trigger re-evaluates the gate).
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
push:
|
|
11
|
+
branches: [main]
|
|
12
|
+
pull_request:
|
|
13
|
+
types: [opened, synchronize, reopened, labeled]
|
|
14
|
+
|
|
15
|
+
# Cancel superseded runs on the same ref (avoids piling up jobs when a
|
|
16
|
+
# PR is force-pushed several times in a row).
|
|
17
|
+
concurrency:
|
|
18
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: true
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
gate:
|
|
23
|
+
# Auto-pass for push events and trusted PR authors. Outside
|
|
24
|
+
# contributors wait for a maintainer to apply the `ci-approved`
|
|
25
|
+
# label, at which point the `labeled` event re-triggers this
|
|
26
|
+
# workflow and the gate passes.
|
|
27
|
+
name: Approval gate
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
if: >-
|
|
30
|
+
github.event_name == 'push' ||
|
|
31
|
+
github.event.pull_request.author_association == 'OWNER' ||
|
|
32
|
+
github.event.pull_request.author_association == 'MEMBER' ||
|
|
33
|
+
github.event.pull_request.author_association == 'COLLABORATOR' ||
|
|
34
|
+
contains(github.event.pull_request.labels.*.name, 'ci-approved')
|
|
35
|
+
steps:
|
|
36
|
+
- name: Record gate decision
|
|
37
|
+
run: |
|
|
38
|
+
echo "Event: ${{ github.event_name }}"
|
|
39
|
+
echo "Author association: ${{ github.event.pull_request.author_association }}"
|
|
40
|
+
echo "Labels: ${{ join(github.event.pull_request.labels.*.name, ', ') }}"
|
|
41
|
+
|
|
42
|
+
test:
|
|
43
|
+
name: pytest (py${{ matrix.python-version }})
|
|
44
|
+
needs: gate
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
strategy:
|
|
47
|
+
fail-fast: false
|
|
48
|
+
matrix:
|
|
49
|
+
python-version: ['3.11', '3.12']
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
|
|
53
|
+
# Installs uv and caches the resolved environment keyed on the
|
|
54
|
+
# contents of uv.lock. The cache restores on a hit, so cold
|
|
55
|
+
# runs are the only ones that pay the install cost.
|
|
56
|
+
- name: Install uv
|
|
57
|
+
uses: astral-sh/setup-uv@v4
|
|
58
|
+
with:
|
|
59
|
+
enable-cache: true
|
|
60
|
+
cache-dependency-glob: uv.lock
|
|
61
|
+
python-version: ${{ matrix.python-version }}
|
|
62
|
+
|
|
63
|
+
- name: Sync dependencies (frozen, all extras + dev)
|
|
64
|
+
run: uv sync --frozen --extra all --extra dev
|
|
65
|
+
|
|
66
|
+
- name: Run tests
|
|
67
|
+
run: uv run pytest tests/ --ignore=tests/integration -v
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Python bytecode / caches
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
*.egg-info/
|
|
6
|
+
|
|
7
|
+
# Build / distribution
|
|
8
|
+
build/
|
|
9
|
+
dist/
|
|
10
|
+
*.egg
|
|
11
|
+
|
|
12
|
+
# setuptools-scm writes the resolved version here at build time; the
|
|
13
|
+
# git tag is the single source of truth so this file is never checked
|
|
14
|
+
# in.
|
|
15
|
+
zarr_vectors/_version.py
|
|
16
|
+
|
|
17
|
+
# Virtual envs
|
|
18
|
+
.venv/
|
|
19
|
+
venv/
|
|
20
|
+
env/
|
|
21
|
+
|
|
22
|
+
# Editor / OS noise
|
|
23
|
+
.vscode/
|
|
24
|
+
.idea/
|
|
25
|
+
.DS_Store
|
|
26
|
+
Thumbs.db
|
|
27
|
+
|
|
28
|
+
# Test caches
|
|
29
|
+
.pytest_cache/
|
|
30
|
+
.mypy_cache/
|
|
31
|
+
.ruff_cache/
|
|
32
|
+
.coverage
|
|
33
|
+
htmlcov/
|
|
34
|
+
.ipynb_checkpoints
|
|
35
|
+
.claude/
|
|
36
|
+
|
|
37
|
+
docs/_build
|
|
38
|
+
*.prof
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-22.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.11"
|
|
7
|
+
|
|
8
|
+
sphinx:
|
|
9
|
+
builder: html
|
|
10
|
+
configuration: docs/conf.py
|
|
11
|
+
fail_on_warning: false
|
|
12
|
+
|
|
13
|
+
python:
|
|
14
|
+
install:
|
|
15
|
+
- method: pip
|
|
16
|
+
path: .
|
|
17
|
+
extra_requirements:
|
|
18
|
+
- all # zarr-vectors[all] for full autodoc coverage
|
|
19
|
+
- requirements: docs/requirements-docs.txt
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Copyright 2026 Allen Institute
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
4
|
+
|
|
5
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
6
|
+
|
|
7
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
+
|
|
9
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
10
|
+
|
|
11
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: zarr-vectors
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Python utilities for the Zarr Vector Format (ZVF) — cloud-native storage for points, lines, streamlines, graphs, and meshes.
|
|
5
|
+
Author: Andrew Keenlyside, Forrest Collman
|
|
6
|
+
License: BSD-3-Clause
|
|
7
|
+
Project-URL: Homepage, https://github.com/AllenInstitute/zarr-vectors-py
|
|
8
|
+
Project-URL: Documentation, https://zarr-vectors-py.readthedocs.io
|
|
9
|
+
Project-URL: Repository, https://github.com/AllenInstitute/zarr-vectors-py
|
|
10
|
+
Project-URL: Issues, https://github.com/AllenInstitute/zarr-vectors-py/issues
|
|
11
|
+
Project-URL: Specification, https://github.com/AllenInstitute/zarr_vectors
|
|
12
|
+
Keywords: zarr,point-cloud,mesh,skeleton,streamline,connectomics,spatial
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: numpy>=1.24
|
|
25
|
+
Requires-Dist: numcodecs>=0.12
|
|
26
|
+
Requires-Dist: zarr>=3.0; python_version >= "3.11"
|
|
27
|
+
Requires-Dist: zarr<3,>=2.18; python_version < "3.11"
|
|
28
|
+
Provides-Extra: draco
|
|
29
|
+
Requires-Dist: DracoPy>=1.3; extra == "draco"
|
|
30
|
+
Provides-Extra: obstore
|
|
31
|
+
Requires-Dist: obstore>=0.3; extra == "obstore"
|
|
32
|
+
Provides-Extra: fsspec
|
|
33
|
+
Requires-Dist: fsspec>=2024.0; extra == "fsspec"
|
|
34
|
+
Requires-Dist: s3fs>=2024.0; extra == "fsspec"
|
|
35
|
+
Requires-Dist: gcsfs>=2024.0; extra == "fsspec"
|
|
36
|
+
Requires-Dist: adlfs>=2024.0; extra == "fsspec"
|
|
37
|
+
Provides-Extra: icechunk
|
|
38
|
+
Requires-Dist: icechunk>=2; python_version >= "3.12" and extra == "icechunk"
|
|
39
|
+
Provides-Extra: cloud
|
|
40
|
+
Requires-Dist: zarr-vectors[obstore]; extra == "cloud"
|
|
41
|
+
Provides-Extra: all
|
|
42
|
+
Requires-Dist: zarr-vectors[draco,fsspec,icechunk,obstore]; extra == "all"
|
|
43
|
+
Provides-Extra: dev
|
|
44
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
45
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
46
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
47
|
+
Requires-Dist: linkml<2,>=1.7; extra == "dev"
|
|
48
|
+
Requires-Dist: jsonschema<5,>=4.0; extra == "dev"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
> [!NOTE]
|
|
52
|
+
> This package is under active development.
|
|
53
|
+
|
|
54
|
+
<img src="assets/zarr-vectors.png" alt="zarr-vectors" width="60%" />
|
|
55
|
+
|
|
56
|
+
**Tools for Zarr Vectors Data**
|
|
57
|
+
|
|
58
|
+
`zarr-vectors-py` is a Python package for reading, writing, and managing large-scale vector geometry data in the zarr vectors format — a chunked, cloud-native format built on Zarr v3 for multiscale points, lines, streamlines, graphs, skeletons, and meshes.
|
|
59
|
+
|
|
60
|
+
The package supports supervoxel-level spatial binning with separated chunk and bin sizes, per-level object sparsity for balanced multi-resolution pyramids, and OME-Zarr-compatible multiscale metadata.
|
|
61
|
+
|
|
62
|
+
*Aligned to the Zarr Vectors specification by Forrest Collman, Allen Institute for Brain Sciences*
|
|
63
|
+
[Link to specification GitHub](https://github.com/AllenInstitute/zarr_vectors)
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
## Documentation
|
|
67
|
+
|
|
68
|
+
**link to readthedocs:** https://zarr-vectors-py.readthedocs.io/en/latest
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Install
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install zarr-vectors
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Store Layout
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
dataset.zarrvectors/
|
|
84
|
+
├── .zattrs # root metadata: SID, CRS, conventions, base_bin_shape
|
|
85
|
+
├── 0/ # full resolution (bin_ratio = 1,1,1)
|
|
86
|
+
│ ├── vertices/ # spatial positions (ragged per bin)
|
|
87
|
+
│ ├── vertex_group_offsets/ # byte offsets for sub-bin random access
|
|
88
|
+
│ ├── links/ # connectivity (edges, faces, parents)
|
|
89
|
+
│ ├── attributes/ # per-vertex data
|
|
90
|
+
│ │ ├── intensity/
|
|
91
|
+
│ │ └── gene_expression/
|
|
92
|
+
│ ├── object_index/ # object ID → (chunk, vertex_group) mapping
|
|
93
|
+
│ ├── object_attributes/ # per-object metadata
|
|
94
|
+
│ ├── groupings/ # group ID → [object IDs]
|
|
95
|
+
│ ├── groupings_attributes/ # per-group metadata
|
|
96
|
+
│ └── cross_chunk_links/ # connectivity across chunk boundaries
|
|
97
|
+
├── 1/ # coarsened (bin_ratio, object_sparsity in .zattrs)
|
|
98
|
+
│ └── [same arrays]
|
|
99
|
+
├── parametric/ # algebraic objects (planes, spheres)
|
|
100
|
+
│ ├── objects/
|
|
101
|
+
│ └── object_attributes/
|
|
102
|
+
└── metadata.json
|
|
103
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
> [!NOTE]
|
|
2
|
+
> This package is under active development.
|
|
3
|
+
|
|
4
|
+
<img src="assets/zarr-vectors.png" alt="zarr-vectors" width="60%" />
|
|
5
|
+
|
|
6
|
+
**Tools for Zarr Vectors Data**
|
|
7
|
+
|
|
8
|
+
`zarr-vectors-py` is a Python package for reading, writing, and managing large-scale vector geometry data in the zarr vectors format — a chunked, cloud-native format built on Zarr v3 for multiscale points, lines, streamlines, graphs, skeletons, and meshes.
|
|
9
|
+
|
|
10
|
+
The package supports supervoxel-level spatial binning with separated chunk and bin sizes, per-level object sparsity for balanced multi-resolution pyramids, and OME-Zarr-compatible multiscale metadata.
|
|
11
|
+
|
|
12
|
+
*Aligned to the Zarr Vectors specification by Forrest Collman, Allen Institute for Brain Sciences*
|
|
13
|
+
[Link to specification GitHub](https://github.com/AllenInstitute/zarr_vectors)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
## Documentation
|
|
17
|
+
|
|
18
|
+
**link to readthedocs:** https://zarr-vectors-py.readthedocs.io/en/latest
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install zarr-vectors
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Store Layout
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
dataset.zarrvectors/
|
|
34
|
+
├── .zattrs # root metadata: SID, CRS, conventions, base_bin_shape
|
|
35
|
+
├── 0/ # full resolution (bin_ratio = 1,1,1)
|
|
36
|
+
│ ├── vertices/ # spatial positions (ragged per bin)
|
|
37
|
+
│ ├── vertex_group_offsets/ # byte offsets for sub-bin random access
|
|
38
|
+
│ ├── links/ # connectivity (edges, faces, parents)
|
|
39
|
+
│ ├── attributes/ # per-vertex data
|
|
40
|
+
│ │ ├── intensity/
|
|
41
|
+
│ │ └── gene_expression/
|
|
42
|
+
│ ├── object_index/ # object ID → (chunk, vertex_group) mapping
|
|
43
|
+
│ ├── object_attributes/ # per-object metadata
|
|
44
|
+
│ ├── groupings/ # group ID → [object IDs]
|
|
45
|
+
│ ├── groupings_attributes/ # per-group metadata
|
|
46
|
+
│ └── cross_chunk_links/ # connectivity across chunk boundaries
|
|
47
|
+
├── 1/ # coarsened (bin_ratio, object_sparsity in .zattrs)
|
|
48
|
+
│ └── [same arrays]
|
|
49
|
+
├── parametric/ # algebraic objects (planes, spheres)
|
|
50
|
+
│ ├── objects/
|
|
51
|
+
│ └── object_attributes/
|
|
52
|
+
└── metadata.json
|
|
53
|
+
```
|
|
Binary file
|
|
Binary file
|
|
Binary file
|