zarr-vectors-tools 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.
Files changed (404) hide show
  1. zarr_vectors_tools-0.2.0/.github/actions/install-for-tests/action.yml +100 -0
  2. zarr_vectors_tools-0.2.0/.github/workflows/tests.yml +141 -0
  3. zarr_vectors_tools-0.2.0/.gitignore +23 -0
  4. zarr_vectors_tools-0.2.0/.readthedocs.yaml +20 -0
  5. zarr_vectors_tools-0.2.0/PKG-INFO +181 -0
  6. zarr_vectors_tools-0.2.0/README.md +109 -0
  7. zarr_vectors_tools-0.2.0/assets/zarr-vectors.png +0 -0
  8. zarr_vectors_tools-0.2.0/benchmarks/README.md +74 -0
  9. zarr_vectors_tools-0.2.0/benchmarks/formats/01_size_scaling.ipynb +924 -0
  10. zarr_vectors_tools-0.2.0/benchmarks/formats/02_data_types.ipynb +624 -0
  11. zarr_vectors_tools-0.2.0/benchmarks/formats/03_filtering.ipynb +470 -0
  12. zarr_vectors_tools-0.2.0/benchmarks/formats/README.md +90 -0
  13. zarr_vectors_tools-0.2.0/benchmarks/formats/_build.py +1050 -0
  14. zarr_vectors_tools-0.2.0/benchmarks/internals/01_size_scaling.ipynb +311 -0
  15. zarr_vectors_tools-0.2.0/benchmarks/internals/02_data_types.ipynb +409 -0
  16. zarr_vectors_tools-0.2.0/benchmarks/internals/03_backends.ipynb +230 -0
  17. zarr_vectors_tools-0.2.0/benchmarks/internals/04_pyramid_scaling.ipynb +391 -0
  18. zarr_vectors_tools-0.2.0/benchmarks/internals/05_bbox_queries.ipynb +341 -0
  19. zarr_vectors_tools-0.2.0/benchmarks/internals/06_chunk_shape.ipynb +265 -0
  20. zarr_vectors_tools-0.2.0/benchmarks/internals/07_compression.ipynb +328 -0
  21. zarr_vectors_tools-0.2.0/benchmarks/internals/08_edit_operations.ipynb +883 -0
  22. zarr_vectors_tools-0.2.0/benchmarks/internals/README.md +101 -0
  23. zarr_vectors_tools-0.2.0/benchmarks/internals/_build.py +1883 -0
  24. zarr_vectors_tools-0.2.0/benchmarks/paper/README.md +634 -0
  25. zarr_vectors_tools-0.2.0/benchmarks/paper/_formats.py +676 -0
  26. zarr_vectors_tools-0.2.0/benchmarks/paper/_harness.py +478 -0
  27. zarr_vectors_tools-0.2.0/benchmarks/paper/make_figure.py +1354 -0
  28. zarr_vectors_tools-0.2.0/benchmarks/paper/profile_hotspots.py +388 -0
  29. zarr_vectors_tools-0.2.0/benchmarks/paper/results/environment.json +76 -0
  30. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/environment.json +69 -0
  31. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/measurements.csv +509 -0
  32. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/A_storage_per_vertex.pdf +0 -0
  33. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/A_storage_per_vertex.png +0 -0
  34. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/A_storage_per_vertex_key.pdf +0 -0
  35. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/A_storage_per_vertex_key.png +0 -0
  36. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/B_size_ratio.pdf +0 -0
  37. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/B_size_ratio.png +0 -0
  38. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/B_size_ratio_key.pdf +0 -0
  39. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/B_size_ratio_key.png +0 -0
  40. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/C_write_all.pdf +0 -0
  41. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/C_write_all.png +0 -0
  42. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/C_write_all_key.pdf +0 -0
  43. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/C_write_all_key.png +0 -0
  44. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/D_read_all.pdf +0 -0
  45. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/D_read_all.png +0 -0
  46. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/D_read_all_key.pdf +0 -0
  47. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/D_read_all_key.png +0 -0
  48. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/E_read_one.pdf +0 -0
  49. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/E_read_one.png +0 -0
  50. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/E_read_one_key.pdf +0 -0
  51. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/E_read_one_key.png +0 -0
  52. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/F2_read_region_equal_box.pdf +0 -0
  53. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/F2_read_region_equal_box.png +0 -0
  54. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/F2_read_region_equal_box_key.pdf +0 -0
  55. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/F2_read_region_equal_box_key.png +0 -0
  56. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/F_read_region.pdf +0 -0
  57. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/F_read_region.png +0 -0
  58. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/F_read_region_key.pdf +0 -0
  59. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/F_read_region_key.png +0 -0
  60. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/G_vs_precomputed.pdf +0 -0
  61. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/G_vs_precomputed.png +0 -0
  62. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/G_vs_precomputed_key.pdf +0 -0
  63. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/G_vs_precomputed_key.png +0 -0
  64. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/H2_read_one_vs_fragments.pdf +0 -0
  65. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/H2_read_one_vs_fragments.png +0 -0
  66. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/H2_read_one_vs_fragments_key.pdf +0 -0
  67. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/H2_read_one_vs_fragments_key.png +0 -0
  68. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/H_read_one_vs_chunks.pdf +0 -0
  69. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/H_read_one_vs_chunks.png +0 -0
  70. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/H_read_one_vs_chunks_key.pdf +0 -0
  71. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/panels/H_read_one_vs_chunks_key.png +0 -0
  72. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/run_large.log +41 -0
  73. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/supplementary_table.csv +448 -0
  74. zarr_vectors_tools-0.2.0/benchmarks/paper/results/large/supplementary_table.md +471 -0
  75. zarr_vectors_tools-0.2.0/benchmarks/paper/results/measurements.csv +432 -0
  76. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/A_storage_per_vertex.pdf +0 -0
  77. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/A_storage_per_vertex.png +0 -0
  78. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/A_storage_per_vertex_key.pdf +0 -0
  79. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/A_storage_per_vertex_key.png +0 -0
  80. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/B_size_ratio.pdf +0 -0
  81. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/B_size_ratio.png +0 -0
  82. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/B_size_ratio_key.pdf +0 -0
  83. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/B_size_ratio_key.png +0 -0
  84. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/C_write_all.pdf +0 -0
  85. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/C_write_all.png +0 -0
  86. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/C_write_all_key.pdf +0 -0
  87. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/C_write_all_key.png +0 -0
  88. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/D_read_all.pdf +0 -0
  89. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/D_read_all.png +0 -0
  90. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/D_read_all_key.pdf +0 -0
  91. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/D_read_all_key.png +0 -0
  92. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/E_read_one.pdf +0 -0
  93. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/E_read_one.png +0 -0
  94. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/E_read_one_key.pdf +0 -0
  95. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/E_read_one_key.png +0 -0
  96. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/F2_read_region_equal_box.pdf +0 -0
  97. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/F2_read_region_equal_box.png +0 -0
  98. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/F2_read_region_equal_box_key.pdf +0 -0
  99. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/F2_read_region_equal_box_key.png +0 -0
  100. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/F_read_region.pdf +0 -0
  101. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/F_read_region.png +0 -0
  102. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/F_read_region_key.pdf +0 -0
  103. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/F_read_region_key.png +0 -0
  104. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/G_vs_precomputed.pdf +0 -0
  105. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/G_vs_precomputed.png +0 -0
  106. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/G_vs_precomputed_key.pdf +0 -0
  107. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/G_vs_precomputed_key.png +0 -0
  108. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/H2_read_one_vs_fragments.pdf +0 -0
  109. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/H2_read_one_vs_fragments.png +0 -0
  110. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/H2_read_one_vs_fragments_key.pdf +0 -0
  111. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/H2_read_one_vs_fragments_key.png +0 -0
  112. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/H_read_one_vs_chunks.pdf +0 -0
  113. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/H_read_one_vs_chunks.png +0 -0
  114. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/H_read_one_vs_chunks_key.pdf +0 -0
  115. zarr_vectors_tools-0.2.0/benchmarks/paper/results/panels/H_read_one_vs_chunks_key.png +0 -0
  116. zarr_vectors_tools-0.2.0/benchmarks/paper/results/rerun/sweep.log +27 -0
  117. zarr_vectors_tools-0.2.0/benchmarks/paper/results/supplementary_table.csv +380 -0
  118. zarr_vectors_tools-0.2.0/benchmarks/paper/results/supplementary_table.md +403 -0
  119. zarr_vectors_tools-0.2.0/benchmarks/paper/run_large.py +345 -0
  120. zarr_vectors_tools-0.2.0/benchmarks/paper/run_sweep.py +1310 -0
  121. zarr_vectors_tools-0.2.0/docs/_static/custom.css +95 -0
  122. zarr_vectors_tools-0.2.0/docs/_static/favicon.png +0 -0
  123. zarr_vectors_tools-0.2.0/docs/_static/logo.png +0 -0
  124. zarr_vectors_tools-0.2.0/docs/algorithms/graph_clustering.md +119 -0
  125. zarr_vectors_tools-0.2.0/docs/algorithms/graph_components.md +60 -0
  126. zarr_vectors_tools-0.2.0/docs/algorithms/graph_search.md +94 -0
  127. zarr_vectors_tools-0.2.0/docs/algorithms/index.md +138 -0
  128. zarr_vectors_tools-0.2.0/docs/algorithms/mesh_attributes.md +77 -0
  129. zarr_vectors_tools-0.2.0/docs/algorithms/mesh_query.md +92 -0
  130. zarr_vectors_tools-0.2.0/docs/algorithms/mesh_summary.md +81 -0
  131. zarr_vectors_tools-0.2.0/docs/api/algorithms.rst +100 -0
  132. zarr_vectors_tools-0.2.0/docs/api/cli.rst +38 -0
  133. zarr_vectors_tools-0.2.0/docs/api/export.rst +69 -0
  134. zarr_vectors_tools-0.2.0/docs/api/headers.rst +21 -0
  135. zarr_vectors_tools-0.2.0/docs/api/index.rst +17 -0
  136. zarr_vectors_tools-0.2.0/docs/api/ingest.rst +149 -0
  137. zarr_vectors_tools-0.2.0/docs/api/multiresolution.rst +119 -0
  138. zarr_vectors_tools-0.2.0/docs/benchmarks/index.md +232 -0
  139. zarr_vectors_tools-0.2.0/docs/benchmarks/vertex_scaling_benchmarking.png +0 -0
  140. zarr_vectors_tools-0.2.0/docs/compose/index.md +280 -0
  141. zarr_vectors_tools-0.2.0/docs/conf.py +162 -0
  142. zarr_vectors_tools-0.2.0/docs/enrichments.md +123 -0
  143. zarr_vectors_tools-0.2.0/docs/examples.md +37 -0
  144. zarr_vectors_tools-0.2.0/docs/export/index.md +146 -0
  145. zarr_vectors_tools-0.2.0/docs/export/meshes.md +78 -0
  146. zarr_vectors_tools-0.2.0/docs/export/point_clouds.md +71 -0
  147. zarr_vectors_tools-0.2.0/docs/export/single_cell.md +88 -0
  148. zarr_vectors_tools-0.2.0/docs/export/skeletons.md +107 -0
  149. zarr_vectors_tools-0.2.0/docs/export/streamlines.md +156 -0
  150. zarr_vectors_tools-0.2.0/docs/export/surfaces.md +68 -0
  151. zarr_vectors_tools-0.2.0/docs/getting_started/cli.md +437 -0
  152. zarr_vectors_tools-0.2.0/docs/getting_started/concepts.md +200 -0
  153. zarr_vectors_tools-0.2.0/docs/getting_started/installation.md +130 -0
  154. zarr_vectors_tools-0.2.0/docs/getting_started/quickstart.md +186 -0
  155. zarr_vectors_tools-0.2.0/docs/getting_started/zarr_vectors.md +112 -0
  156. zarr_vectors_tools-0.2.0/docs/headers.md +172 -0
  157. zarr_vectors_tools-0.2.0/docs/how_to/choose_chunk_and_bin.md +87 -0
  158. zarr_vectors_tools-0.2.0/docs/how_to/compressors.md +130 -0
  159. zarr_vectors_tools-0.2.0/docs/how_to/large_scale_pipelines.md +222 -0
  160. zarr_vectors_tools-0.2.0/docs/how_to/linc_trk.md +221 -0
  161. zarr_vectors_tools-0.2.0/docs/how_to/parallelism.md +194 -0
  162. zarr_vectors_tools-0.2.0/docs/index.rst +210 -0
  163. zarr_vectors_tools-0.2.0/docs/ingest/em_skeletons.md +342 -0
  164. zarr_vectors_tools-0.2.0/docs/ingest/graphs.md +116 -0
  165. zarr_vectors_tools-0.2.0/docs/ingest/index.md +141 -0
  166. zarr_vectors_tools-0.2.0/docs/ingest/lines.md +59 -0
  167. zarr_vectors_tools-0.2.0/docs/ingest/meshes.md +145 -0
  168. zarr_vectors_tools-0.2.0/docs/ingest/point_clouds.md +130 -0
  169. zarr_vectors_tools-0.2.0/docs/ingest/single_cell.md +240 -0
  170. zarr_vectors_tools-0.2.0/docs/ingest/skeletons.md +110 -0
  171. zarr_vectors_tools-0.2.0/docs/ingest/surfaces.md +371 -0
  172. zarr_vectors_tools-0.2.0/docs/ingest/tractography.md +259 -0
  173. zarr_vectors_tools-0.2.0/docs/ingest/tractography_at_scale.md +197 -0
  174. zarr_vectors_tools-0.2.0/docs/modules/index.md +221 -0
  175. zarr_vectors_tools-0.2.0/docs/multiresolution/building_pyramids.md +191 -0
  176. zarr_vectors_tools-0.2.0/docs/multiresolution/concepts.md +222 -0
  177. zarr_vectors_tools-0.2.0/docs/multiresolution/cross_level_links.md +126 -0
  178. zarr_vectors_tools-0.2.0/docs/multiresolution/index.md +103 -0
  179. zarr_vectors_tools-0.2.0/docs/multiresolution/object_selection.md +156 -0
  180. zarr_vectors_tools-0.2.0/docs/multiresolution/refresh.md +131 -0
  181. zarr_vectors_tools-0.2.0/docs/multiresolution/strategies.md +337 -0
  182. zarr_vectors_tools-0.2.0/docs/requirements-docs.txt +15 -0
  183. zarr_vectors_tools-0.2.0/docs/upstream/links-merge-findings.md +150 -0
  184. zarr_vectors_tools-0.2.0/docs/zarr-vectors.png +0 -0
  185. zarr_vectors_tools-0.2.0/examples/01_point_clouds.ipynb +523 -0
  186. zarr_vectors_tools-0.2.0/examples/02_lines.ipynb +146 -0
  187. zarr_vectors_tools-0.2.0/examples/03_polylines_streamlines.ipynb +517 -0
  188. zarr_vectors_tools-0.2.0/examples/04_graphs.ipynb +363 -0
  189. zarr_vectors_tools-0.2.0/examples/05_skeletons.ipynb +178 -0
  190. zarr_vectors_tools-0.2.0/examples/06_meshes.ipynb +471 -0
  191. zarr_vectors_tools-0.2.0/examples/07_network_metrics.ipynb +320 -0
  192. zarr_vectors_tools-0.2.0/examples/08_network_search.ipynb +344 -0
  193. zarr_vectors_tools-0.2.0/examples/09_mesh_algorithms.ipynb +437 -0
  194. zarr_vectors_tools-0.2.0/examples/10_graph_clustering.ipynb +396 -0
  195. zarr_vectors_tools-0.2.0/examples/recipes/cells.toml +35 -0
  196. zarr_vectors_tools-0.2.0/examples/recipes/em_skeletons.yaml +25 -0
  197. zarr_vectors_tools-0.2.0/examples/recipes/surfaces.yaml +28 -0
  198. zarr_vectors_tools-0.2.0/examples/recipes/tractography.yaml +28 -0
  199. zarr_vectors_tools-0.2.0/examples/tractogram_to_zarrvectors.ipynb +571 -0
  200. zarr_vectors_tools-0.2.0/pyproject.toml +156 -0
  201. zarr_vectors_tools-0.2.0/scripts/ingest_cutout.py +204 -0
  202. zarr_vectors_tools-0.2.0/scripts/ingest_cutout_parralel.py +46 -0
  203. zarr_vectors_tools-0.2.0/scripts/ingest_mouselight.py +98 -0
  204. zarr_vectors_tools-0.2.0/scripts/ingest_trk_parallel.py +150 -0
  205. zarr_vectors_tools-0.2.0/scripts/resume_trk_pyramid.py +140 -0
  206. zarr_vectors_tools-0.2.0/scripts/single_chunk_object_attributes.py +214 -0
  207. zarr_vectors_tools-0.2.0/scripts/volume_to_ome_zarr.py +259 -0
  208. zarr_vectors_tools-0.2.0/setup.cfg +4 -0
  209. zarr_vectors_tools-0.2.0/tests/__init__.py +0 -0
  210. zarr_vectors_tools-0.2.0/tests/_source_helpers.py +62 -0
  211. zarr_vectors_tools-0.2.0/tests/_surface_fixtures.py +325 -0
  212. zarr_vectors_tools-0.2.0/tests/conftest.py +12 -0
  213. zarr_vectors_tools-0.2.0/tests/integration/test_binning_sparsity.py +298 -0
  214. zarr_vectors_tools-0.2.0/tests/integration/test_lazy_sharding_rechunk.py +384 -0
  215. zarr_vectors_tools-0.2.0/tests/test_algorithm_helpers.py +151 -0
  216. zarr_vectors_tools-0.2.0/tests/test_attach.py +493 -0
  217. zarr_vectors_tools-0.2.0/tests/test_bundle_summary.py +460 -0
  218. zarr_vectors_tools-0.2.0/tests/test_chunk_cell_limit.py +165 -0
  219. zarr_vectors_tools-0.2.0/tests/test_cli.py +517 -0
  220. zarr_vectors_tools-0.2.0/tests/test_cli_convert_export.py +259 -0
  221. zarr_vectors_tools-0.2.0/tests/test_cli_cross_level_flags.py +64 -0
  222. zarr_vectors_tools-0.2.0/tests/test_coarsen_implicit_sequential.py +416 -0
  223. zarr_vectors_tools-0.2.0/tests/test_coarsener_speed.py +215 -0
  224. zarr_vectors_tools-0.2.0/tests/test_compose.py +1039 -0
  225. zarr_vectors_tools-0.2.0/tests/test_cross_level_speed.py +136 -0
  226. zarr_vectors_tools-0.2.0/tests/test_csv_points.py +148 -0
  227. zarr_vectors_tools-0.2.0/tests/test_edgelist.py +77 -0
  228. zarr_vectors_tools-0.2.0/tests/test_edit_pyramid_refresh.py +136 -0
  229. zarr_vectors_tools-0.2.0/tests/test_enrichments_graphs.py +102 -0
  230. zarr_vectors_tools-0.2.0/tests/test_enrichments_points.py +144 -0
  231. zarr_vectors_tools-0.2.0/tests/test_enrichments_polylines.py +157 -0
  232. zarr_vectors_tools-0.2.0/tests/test_enrichments_swc.py +139 -0
  233. zarr_vectors_tools-0.2.0/tests/test_export_fidelity.py +238 -0
  234. zarr_vectors_tools-0.2.0/tests/test_forest_vectorized.py +139 -0
  235. zarr_vectors_tools-0.2.0/tests/test_gifti_export.py +562 -0
  236. zarr_vectors_tools-0.2.0/tests/test_graph_clustering.py +234 -0
  237. zarr_vectors_tools-0.2.0/tests/test_graph_components.py +116 -0
  238. zarr_vectors_tools-0.2.0/tests/test_graph_kernels.py +187 -0
  239. zarr_vectors_tools-0.2.0/tests/test_graph_search.py +202 -0
  240. zarr_vectors_tools-0.2.0/tests/test_h5ad.py +396 -0
  241. zarr_vectors_tools-0.2.0/tests/test_lines.py +77 -0
  242. zarr_vectors_tools-0.2.0/tests/test_link_trk.py +78 -0
  243. zarr_vectors_tools-0.2.0/tests/test_mesh_attributes.py +180 -0
  244. zarr_vectors_tools-0.2.0/tests/test_mesh_coarsen.py +156 -0
  245. zarr_vectors_tools-0.2.0/tests/test_mesh_parsers.py +698 -0
  246. zarr_vectors_tools-0.2.0/tests/test_mesh_pyramid_attributes.py +146 -0
  247. zarr_vectors_tools-0.2.0/tests/test_mesh_query.py +222 -0
  248. zarr_vectors_tools-0.2.0/tests/test_mesh_summary.py +208 -0
  249. zarr_vectors_tools-0.2.0/tests/test_meshes.py +105 -0
  250. zarr_vectors_tools-0.2.0/tests/test_multiscale_links.py +596 -0
  251. zarr_vectors_tools-0.2.0/tests/test_obj_object_id.py +51 -0
  252. zarr_vectors_tools-0.2.0/tests/test_object_selection.py +123 -0
  253. zarr_vectors_tools-0.2.0/tests/test_parallel_executor.py +82 -0
  254. zarr_vectors_tools-0.2.0/tests/test_parcels.py +131 -0
  255. zarr_vectors_tools-0.2.0/tests/test_per_fragment_pyramid.py +421 -0
  256. zarr_vectors_tools-0.2.0/tests/test_per_level_chunk_shape.py +303 -0
  257. zarr_vectors_tools-0.2.0/tests/test_per_object_pyramid.py +343 -0
  258. zarr_vectors_tools-0.2.0/tests/test_pipelines.py +197 -0
  259. zarr_vectors_tools-0.2.0/tests/test_plain_precomputed_batches.py +123 -0
  260. zarr_vectors_tools-0.2.0/tests/test_point_subset_pyramid.py +269 -0
  261. zarr_vectors_tools-0.2.0/tests/test_polyline_coarsen_chunk_local.py +363 -0
  262. zarr_vectors_tools-0.2.0/tests/test_polyline_decimate.py +256 -0
  263. zarr_vectors_tools-0.2.0/tests/test_polylines.py +67 -0
  264. zarr_vectors_tools-0.2.0/tests/test_precomputed_convert.py +354 -0
  265. zarr_vectors_tools-0.2.0/tests/test_precomputed_export.py +577 -0
  266. zarr_vectors_tools-0.2.0/tests/test_precomputed_meshes.py +426 -0
  267. zarr_vectors_tools-0.2.0/tests/test_precomputed_skeletons.py +311 -0
  268. zarr_vectors_tools-0.2.0/tests/test_pyramid_factor_compounding.py +123 -0
  269. zarr_vectors_tools-0.2.0/tests/test_pyramid_fidelity.py +341 -0
  270. zarr_vectors_tools-0.2.0/tests/test_pyramid_scaling.py +319 -0
  271. zarr_vectors_tools-0.2.0/tests/test_rdp_tolerance.py +647 -0
  272. zarr_vectors_tools-0.2.0/tests/test_recipe_runner.py +191 -0
  273. zarr_vectors_tools-0.2.0/tests/test_segment_link.py +175 -0
  274. zarr_vectors_tools-0.2.0/tests/test_single_array_enumeration.py +213 -0
  275. zarr_vectors_tools-0.2.0/tests/test_skeleton_bins.py +231 -0
  276. zarr_vectors_tools-0.2.0/tests/test_skeleton_coarsen.py +514 -0
  277. zarr_vectors_tools-0.2.0/tests/test_skeleton_metrics.py +651 -0
  278. zarr_vectors_tools-0.2.0/tests/test_streaming_exports.py +113 -0
  279. zarr_vectors_tools-0.2.0/tests/test_streamline_ingest_pyramid.py +113 -0
  280. zarr_vectors_tools-0.2.0/tests/test_streamline_roundtrip.py +398 -0
  281. zarr_vectors_tools-0.2.0/tests/test_streamline_select.py +167 -0
  282. zarr_vectors_tools-0.2.0/tests/test_surface_pyramid_topology.py +92 -0
  283. zarr_vectors_tools-0.2.0/tests/test_surface_read.py +99 -0
  284. zarr_vectors_tools-0.2.0/tests/test_surfaces.py +717 -0
  285. zarr_vectors_tools-0.2.0/tests/test_swc.py +59 -0
  286. zarr_vectors_tools-0.2.0/tests/test_swc_per_object.py +206 -0
  287. zarr_vectors_tools-0.2.0/tests/test_synapses.py +184 -0
  288. zarr_vectors_tools-0.2.0/tests/test_trk_grid_from_data.py +212 -0
  289. zarr_vectors_tools-0.2.0/tests/test_trk_parallel_speed.py +85 -0
  290. zarr_vectors_tools-0.2.0/tests/test_trk_registration.py +151 -0
  291. zarr_vectors_tools-0.2.0/tests/test_trk_resume.py +179 -0
  292. zarr_vectors_tools-0.2.0/zarr_vectors_tools/__init__.py +93 -0
  293. zarr_vectors_tools-0.2.0/zarr_vectors_tools/__main__.py +6 -0
  294. zarr_vectors_tools-0.2.0/zarr_vectors_tools/_attributes.py +134 -0
  295. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/__init__.py +50 -0
  296. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/_chunk_neighbours.py +54 -0
  297. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/_graph_edges.py +342 -0
  298. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/_links.py +426 -0
  299. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/bundles.py +745 -0
  300. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/graph_clustering.py +312 -0
  301. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/graph_components.py +74 -0
  302. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/graph_search.py +158 -0
  303. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/mesh_attributes.py +276 -0
  304. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/mesh_query.py +485 -0
  305. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/mesh_summary.py +386 -0
  306. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/parcels.py +263 -0
  307. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/segment_link.py +258 -0
  308. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/skeleton_metrics.py +1189 -0
  309. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/streamline_select.py +282 -0
  310. zarr_vectors_tools-0.2.0/zarr_vectors_tools/algorithms/surfaces.py +165 -0
  311. zarr_vectors_tools-0.2.0/zarr_vectors_tools/cli/__init__.py +675 -0
  312. zarr_vectors_tools-0.2.0/zarr_vectors_tools/cli/_args.py +396 -0
  313. zarr_vectors_tools-0.2.0/zarr_vectors_tools/cli/attach.py +127 -0
  314. zarr_vectors_tools-0.2.0/zarr_vectors_tools/cli/compose.py +154 -0
  315. zarr_vectors_tools-0.2.0/zarr_vectors_tools/cli/convert.py +651 -0
  316. zarr_vectors_tools-0.2.0/zarr_vectors_tools/cli/pipeline.py +311 -0
  317. zarr_vectors_tools-0.2.0/zarr_vectors_tools/cli/pyramid.py +113 -0
  318. zarr_vectors_tools-0.2.0/zarr_vectors_tools/compose/__init__.py +90 -0
  319. zarr_vectors_tools-0.2.0/zarr_vectors_tools/compose/_carry.py +558 -0
  320. zarr_vectors_tools-0.2.0/zarr_vectors_tools/compose/merge.py +982 -0
  321. zarr_vectors_tools-0.2.0/zarr_vectors_tools/compose/readers.py +610 -0
  322. zarr_vectors_tools-0.2.0/zarr_vectors_tools/compose/sources.py +892 -0
  323. zarr_vectors_tools-0.2.0/zarr_vectors_tools/compose/split.py +339 -0
  324. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/__init__.py +17 -0
  325. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/__init__.py +0 -0
  326. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/_point_batches.py +137 -0
  327. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/_streamlines.py +217 -0
  328. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/csv_points.py +112 -0
  329. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/gifti.py +701 -0
  330. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/h5ad.py +243 -0
  331. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/obj.py +83 -0
  332. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/ply.py +144 -0
  333. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/precomputed.py +1416 -0
  334. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/swc.py +426 -0
  335. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/trk.py +185 -0
  336. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/export/trx.py +235 -0
  337. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/__init__.py +0 -0
  338. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_attribute_widths.py +53 -0
  339. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_cell_limits.py +128 -0
  340. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_parallel.py +210 -0
  341. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_point_enrichments.py +60 -0
  342. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_polyline_enrichments.py +183 -0
  343. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_segment_ids.py +64 -0
  344. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_surface_store.py +444 -0
  345. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_tabular.py +67 -0
  346. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_text_tokens.py +182 -0
  347. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_tree_enrichments.py +90 -0
  348. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/_trk_names.py +59 -0
  349. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/attach.py +394 -0
  350. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/cell_table.py +373 -0
  351. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/cifti.py +303 -0
  352. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/csv_points.py +298 -0
  353. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/edgelist.py +245 -0
  354. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/freesurfer.py +436 -0
  355. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/gifti.py +450 -0
  356. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/graphml.py +174 -0
  357. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/h5ad.py +656 -0
  358. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/las.py +124 -0
  359. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/linc_trk.py +364 -0
  360. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/lines.py +159 -0
  361. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/obj.py +381 -0
  362. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/ply.py +138 -0
  363. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/precomputed.py +340 -0
  364. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/precomputed_meshes.py +402 -0
  365. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/precomputed_plain_skeletons.py +920 -0
  366. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/precomputed_skeletons.py +957 -0
  367. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/stl.py +275 -0
  368. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/swc.py +150 -0
  369. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/synapses.py +326 -0
  370. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/tck.py +131 -0
  371. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/trk.py +120 -0
  372. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/trk_helpers.py +236 -0
  373. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/trk_parallel.py +2177 -0
  374. zarr_vectors_tools-0.2.0/zarr_vectors_tools/convert/ingest/trx.py +299 -0
  375. zarr_vectors_tools-0.2.0/zarr_vectors_tools/headers/__init__.py +14 -0
  376. zarr_vectors_tools-0.2.0/zarr_vectors_tools/headers/formats.py +666 -0
  377. zarr_vectors_tools-0.2.0/zarr_vectors_tools/headers/registry.py +66 -0
  378. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/__init__.py +0 -0
  379. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/_forest.py +188 -0
  380. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/coarsen.py +2196 -0
  381. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/coarsen_implicit.py +185 -0
  382. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/constants.py +38 -0
  383. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/groupings.py +199 -0
  384. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/metanodes.py +137 -0
  385. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/object_index.py +124 -0
  386. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/object_selection.py +539 -0
  387. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/refresh.py +296 -0
  388. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/skeleton_graph.py +106 -0
  389. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/__init__.py +0 -0
  390. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/fragments.py +455 -0
  391. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/graphs.py +280 -0
  392. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/mesh_decimate.py +701 -0
  393. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/mesh_decimate_level.py +900 -0
  394. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/meshes.py +880 -0
  395. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/points.py +473 -0
  396. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/polylines.py +1727 -0
  397. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/skeleton_bins.py +383 -0
  398. zarr_vectors_tools-0.2.0/zarr_vectors_tools/multiresolution/strategies/skeletons.py +1868 -0
  399. zarr_vectors_tools-0.2.0/zarr_vectors_tools.egg-info/PKG-INFO +181 -0
  400. zarr_vectors_tools-0.2.0/zarr_vectors_tools.egg-info/SOURCES.txt +402 -0
  401. zarr_vectors_tools-0.2.0/zarr_vectors_tools.egg-info/dependency_links.txt +1 -0
  402. zarr_vectors_tools-0.2.0/zarr_vectors_tools.egg-info/entry_points.txt +2 -0
  403. zarr_vectors_tools-0.2.0/zarr_vectors_tools.egg-info/requires.txt +71 -0
  404. zarr_vectors_tools-0.2.0/zarr_vectors_tools.egg-info/top_level.txt +1 -0
@@ -0,0 +1,100 @@
1
+ name: Install for tests
2
+ description: >-
3
+ Set up Python, install zarr-vectors core from git at the pinned commit, then
4
+ this package with its dev toolchain and every optional reader the runner can
5
+ install. Used by both test tiers in .github/workflows/tests.yml.
6
+
7
+ inputs:
8
+ python-version:
9
+ description: Python version to set up.
10
+ required: true
11
+ core-repo:
12
+ description: Git URL of zarr-vectors-py.
13
+ required: true
14
+ core-sha:
15
+ description: Full commit SHA of zarr-vectors-py to install.
16
+ required: true
17
+
18
+ runs:
19
+ using: composite
20
+ steps:
21
+ - uses: actions/setup-python@v7
22
+ with:
23
+ python-version: ${{ inputs.python-version }}
24
+ cache: pip
25
+ cache-dependency-path: pyproject.toml
26
+
27
+ - name: Install core at the pin, this package, and the optional readers
28
+ shell: bash
29
+ env:
30
+ CORE: zarr-vectors @ git+${{ inputs.core-repo }}@${{ inputs.core-sha }}
31
+ PY: ${{ inputs.python-version }}
32
+ run: |
33
+ set -euo pipefail
34
+ python -m pip install --upgrade pip
35
+
36
+ # Core is named by URL in every install below, so the resolver can
37
+ # never swap it for a PyPI release (none of those carries the
38
+ # `zarr_vectors.building` surface this package imports).
39
+ if python -m pip install "$CORE" -e ".[all,dev]"; then
40
+ exit 0
41
+ fi
42
+
43
+ # One optional reader has no wheel, or fails to build, for this OS and
44
+ # Python. Core, this package and pytest must still install; the extras
45
+ # then go one at a time so a broken reader costs only its own tests,
46
+ # which skip through pytest.importorskip. The annotation keeps that
47
+ # visible on the run page instead of leaving a quietly thinner suite.
48
+ echo "::warning title=Optional readers::'.[all,dev]' did not install on $RUNNER_OS / Python $PY; installing the extras one at a time"
49
+ python -m pip install "$CORE" -e ".[dev]"
50
+ for extra in las ply trk trx surfaces graph h5ad points-enrichment mesh precomputed parallel; do
51
+ python -m pip install "$CORE" -e ".[$extra]" \
52
+ || echo "::warning title=Optional extra not installed::[$extra] did not install on $RUNNER_OS / Python $PY; its tests will be skipped"
53
+ done
54
+
55
+ - name: Check the pin, and report which optional readers are present
56
+ shell: bash
57
+ env:
58
+ CORE_SHA: ${{ inputs.core-sha }}
59
+ run: |
60
+ python - <<'EOF'
61
+ import importlib
62
+ import json
63
+ import os
64
+ import platform
65
+ from importlib.metadata import distribution
66
+
67
+ # pip records the commit it built from; refuse to test anything else.
68
+ direct = json.loads(distribution("zarr-vectors").read_text("direct_url.json") or "{}")
69
+ got = direct.get("vcs_info", {}).get("commit_id")
70
+ if got != os.environ["CORE_SHA"]:
71
+ raise SystemExit(f"zarr-vectors is at {got!r}, not the pinned {os.environ['CORE_SHA']}")
72
+ import zarr_vectors
73
+ import zarr_vectors.building # this package fails at import without it
74
+ import zarr_vectors_tools
75
+
76
+ readers = {
77
+ "laspy": "las", "plyfile": "ply", "nibabel": "trk, surfaces", "trx": "trx",
78
+ "networkx": "graph", "anndata": "h5ad", "scipy": "points-enrichment, mesh",
79
+ "pyfqmr": "mesh", "cloudvolume": "precomputed", "mapbuffer": "precomputed",
80
+ "cloudfiles": "precomputed", "dask.distributed": "parallel",
81
+ }
82
+ rows = [
83
+ f"### {platform.system()}, Python {platform.python_version()}",
84
+ f"zarr-vectors {zarr_vectors.__version__} at `{got}`",
85
+ "",
86
+ "| module | extra | importable |",
87
+ "| --- | --- | --- |",
88
+ ]
89
+ for module, extra in readers.items():
90
+ try:
91
+ importlib.import_module(module)
92
+ ok = "yes"
93
+ except Exception as exc: # a broken binary counts as missing too
94
+ ok = f"**no** ({type(exc).__name__}): its tests skip"
95
+ rows.append(f"| `{module}` | `{extra}` | {ok} |")
96
+ text = "\n".join(rows) + "\n"
97
+ print(text)
98
+ with open(os.environ["GITHUB_STEP_SUMMARY"], "a", encoding="utf-8") as fh:
99
+ fh.write(text)
100
+ EOF
@@ -0,0 +1,141 @@
1
+ name: Tests
2
+
3
+ # Two tiers, split by the `slow` marker (see [tool.pytest.ini_options] in
4
+ # pyproject.toml):
5
+ #
6
+ # lint + fast tier every push to main / APEX-hackathon, and every PR
7
+ # full tier nightly, and on demand (Actions tab -> Run workflow)
8
+ #
9
+ # Runners are shared with zarr-vectors-py's own suite, so this workflow keeps
10
+ # its footprint small: push runs only on the long-lived branches (a feature
11
+ # branch is tested through its PR, not twice), docs-only changes skip it, and
12
+ # a newer push cancels the run it supersedes.
13
+ #
14
+ # GitHub only fires `schedule` from the default branch, and only offers
15
+ # "Run workflow" once this file is on it. So the nightly tests main; to run
16
+ # the full tier on another branch, dispatch it with that ref:
17
+ #
18
+ # gh workflow run tests.yml --ref APEX-hackathon -f tier=full
19
+
20
+ on:
21
+ push:
22
+ branches: [main, APEX-hackathon]
23
+ paths-ignore: ["docs/**", "examples/**", "benchmarks/**", "assets/**", "**/*.md", ".readthedocs.yaml"]
24
+ pull_request:
25
+ paths-ignore: ["docs/**", "examples/**", "benchmarks/**", "assets/**", "**/*.md", ".readthedocs.yaml"]
26
+ schedule:
27
+ - cron: "17 7 * * *" # 07:17 UTC; off the hour, when scheduled load peaks
28
+ workflow_dispatch:
29
+ inputs:
30
+ tier:
31
+ description: Which tier to run
32
+ type: choice
33
+ options: [full, fast]
34
+ default: full
35
+
36
+ permissions:
37
+ contents: read
38
+
39
+ # The event is part of the group so a push to main cannot cancel the nightly
40
+ # that happens to be running on main. Only push/PR runs cancel each other.
41
+ concurrency:
42
+ group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
43
+ cancel-in-progress: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
44
+
45
+ env:
46
+ # This package needs an UNRELEASED core: the merged links/<delta>/<offsets>/
47
+ # layout and the `zarr_vectors.building` surface (see the comment on the
48
+ # zarr-vectors dependency in pyproject.toml), which are on core's main but
49
+ # not yet in a release. No version specifier can express that, so CI
50
+ # installs core from git at this one pinned commit.
51
+ #
52
+ # To bump: pick a commit that is pushed to the core repo (a local-only
53
+ # commit will not clone), check this package's tests pass against it, and
54
+ # paste its full 40-character SHA here. For the commit your local core
55
+ # checkout is on:
56
+ #
57
+ # git -C ../zarr-vectors-py log -1 --format=%H
58
+ # git -C ../zarr-vectors-py branch -r --contains <sha> # must list a branch
59
+ #
60
+ # Currently core's main at the merge of core PR #35 (its APEX-hackathon).
61
+ CORE_SHA: 6794461a5f03e8defe936ca88a5536fce6ea4f49
62
+ CORE_REPO: https://github.com/AllenInstitute/zarr-vectors-py
63
+ PIP_DISABLE_PIP_VERSION_CHECK: "1"
64
+
65
+ defaults:
66
+ run:
67
+ shell: bash # Git Bash on Windows, so every step reads the same
68
+
69
+ jobs:
70
+ lint:
71
+ if: github.event_name == 'push' || github.event_name == 'pull_request'
72
+ runs-on: ubuntu-latest
73
+ timeout-minutes: 10
74
+ steps:
75
+ - uses: actions/checkout@v7
76
+ - uses: actions/setup-python@v7
77
+ with:
78
+ python-version: "3.13"
79
+ # Pinned so a new ruff release cannot turn a clean tree red overnight;
80
+ # bump it deliberately and fix what it finds.
81
+ - run: python -m pip install "ruff==0.15.13"
82
+ # The package, not the repo: zarr_vectors_tools/ is lint-clean, while
83
+ # older test files still carry ~15 known cosmetic violations (long
84
+ # lines, `l` as a name, `a; b`). Widen this once tests/ is cleaned up.
85
+ - run: ruff check --output-format=github zarr_vectors_tools
86
+
87
+ fast:
88
+ name: fast tier (${{ matrix.os }}, py${{ matrix.python }})
89
+ if: >-
90
+ github.event_name == 'push' ||
91
+ github.event_name == 'pull_request' ||
92
+ (github.event_name == 'workflow_dispatch' && inputs.tier == 'fast')
93
+ runs-on: ${{ matrix.os }}
94
+ timeout-minutes: 30
95
+ strategy:
96
+ fail-fast: false
97
+ matrix:
98
+ include:
99
+ # Lowest and highest supported Python on Linux ...
100
+ - {os: ubuntu-latest, python: "3.11"}
101
+ - {os: ubuntu-latest, python: "3.13"}
102
+ # ... and Windows, whose process pools spawn rather than fork and
103
+ # whose atomic renames fail where POSIX ones succeed.
104
+ - {os: windows-latest, python: "3.13"}
105
+ steps:
106
+ - uses: actions/checkout@v7
107
+ - uses: ./.github/actions/install-for-tests
108
+ with:
109
+ python-version: ${{ matrix.python }}
110
+ core-repo: ${{ env.CORE_REPO }}
111
+ core-sha: ${{ env.CORE_SHA }}
112
+ # Budget: under 5 minutes. The step limit is looser so runner noise
113
+ # does not fail it, but a test that belongs in the slow tier still gets
114
+ # caught here; --durations names the culprit.
115
+ - name: pytest -m "not slow"
116
+ timeout-minutes: 15
117
+ run: python -m pytest -m "not slow" -rs --durations=20 --basetemp="$RUNNER_TEMP/pytest"
118
+
119
+ full:
120
+ name: full tier (${{ matrix.os }}, py${{ matrix.python }})
121
+ if: >-
122
+ github.event_name == 'schedule' ||
123
+ (github.event_name == 'workflow_dispatch' && inputs.tier == 'full')
124
+ runs-on: ${{ matrix.os }}
125
+ # About 30 minutes on an idle workstation; hosted runners are slower.
126
+ timeout-minutes: 180
127
+ strategy:
128
+ fail-fast: false
129
+ matrix:
130
+ os: [ubuntu-latest, windows-latest]
131
+ python: ["3.13"]
132
+ steps:
133
+ - uses: actions/checkout@v7
134
+ - uses: ./.github/actions/install-for-tests
135
+ with:
136
+ python-version: ${{ matrix.python }}
137
+ core-repo: ${{ env.CORE_REPO }}
138
+ core-sha: ${{ env.CORE_SHA }}
139
+ # A short --basetemp keeps deep store paths clear of Windows' 260-char limit.
140
+ - name: pytest
141
+ run: python -m pytest -rs --durations=30 --basetemp="$RUNNER_TEMP/pytest"
@@ -0,0 +1,23 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ .eggs/
7
+ build/
8
+ dist/
9
+ .venv/
10
+ venv/
11
+
12
+ # Pytest
13
+ .pytest_cache/
14
+
15
+ # Docs build artifacts
16
+ docs/_build/
17
+
18
+ # Editor / OS
19
+ .DS_Store
20
+ Thumbs.db
21
+ .idea/
22
+ .vscode/
23
+ .claude/
@@ -0,0 +1,20 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.11"
7
+ jobs:
8
+ install:
9
+ # zarr-vectors isn't on PyPI and isn't needed at docs build time —
10
+ # docs/conf.py mocks it via autodoc_mock_imports. Install the on-PyPI
11
+ # extras, then this package with --no-deps so pip doesn't try to
12
+ # resolve zarr-vectors, then the Sphinx toolchain.
13
+ - pip install numpy pandas laspy plyfile nibabel trx-python networkx scipy
14
+ - pip install --no-deps .
15
+ - pip install -r docs/requirements-docs.txt
16
+
17
+ sphinx:
18
+ builder: html
19
+ configuration: docs/conf.py
20
+ fail_on_warning: false
@@ -0,0 +1,181 @@
1
+ Metadata-Version: 2.4
2
+ Name: zarr-vectors-tools
3
+ Version: 0.2.0
4
+ Summary: Ingest and export workflows for the Zarr Vectors. Wraps third-party readers/writers (nibabel, laspy, plyfile, networkx, trx-python) on top of zarr-vectors.
5
+ Author: Andrew Keenlyside, Forrest Collman
6
+ License: BSD-3-Clause
7
+ Keywords: zarr,point-cloud,mesh,skeleton,streamline,connectomics,spatial,ingest,export
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: License :: OSI Approved :: BSD License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Requires-Python: >=3.11
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: zarr-vectors>=0.2.1.dev0
18
+ Requires-Dist: zarr>=3.0
19
+ Requires-Dist: numpy>=1.24
20
+ Requires-Dist: pandas>=2.0
21
+ Provides-Extra: las
22
+ Requires-Dist: laspy>=2.4; extra == "las"
23
+ Provides-Extra: ply
24
+ Requires-Dist: plyfile>=1.0; extra == "ply"
25
+ Provides-Extra: trk
26
+ Requires-Dist: nibabel>=5.0; extra == "trk"
27
+ Provides-Extra: trx
28
+ Requires-Dist: trx-python>=0.3; extra == "trx"
29
+ Provides-Extra: streamlines
30
+ Requires-Dist: zarr-vectors-tools[trk,trx]; extra == "streamlines"
31
+ Provides-Extra: surfaces
32
+ Requires-Dist: nibabel>=5.0; extra == "surfaces"
33
+ Provides-Extra: graph
34
+ Requires-Dist: networkx>=3.0; extra == "graph"
35
+ Provides-Extra: h5ad
36
+ Requires-Dist: anndata>=0.10; extra == "h5ad"
37
+ Provides-Extra: points-enrichment
38
+ Requires-Dist: scipy>=1.10; extra == "points-enrichment"
39
+ Provides-Extra: mesh
40
+ Requires-Dist: pyfqmr>=0.2; extra == "mesh"
41
+ Requires-Dist: scipy>=1.10; extra == "mesh"
42
+ Provides-Extra: precomputed
43
+ Requires-Dist: cloud-volume>=8.0; extra == "precomputed"
44
+ Requires-Dist: mapbuffer>=0.7; extra == "precomputed"
45
+ Requires-Dist: cloud-files>=4.0; extra == "precomputed"
46
+ Provides-Extra: parallel
47
+ Requires-Dist: dask[distributed]>=2024.0; extra == "parallel"
48
+ Provides-Extra: recipes
49
+ Requires-Dist: pyyaml>=6.0; extra == "recipes"
50
+ Provides-Extra: gpu
51
+ Requires-Dist: cudf; extra == "gpu"
52
+ Provides-Extra: all
53
+ Requires-Dist: laspy>=2.4; extra == "all"
54
+ Requires-Dist: plyfile>=1.0; extra == "all"
55
+ Requires-Dist: nibabel>=5.0; extra == "all"
56
+ Requires-Dist: trx-python>=0.3; extra == "all"
57
+ Requires-Dist: networkx>=3.0; extra == "all"
58
+ Requires-Dist: anndata>=0.10; extra == "all"
59
+ Requires-Dist: scipy>=1.10; extra == "all"
60
+ Requires-Dist: pyfqmr>=0.2; extra == "all"
61
+ Requires-Dist: cloud-volume>=8.0; extra == "all"
62
+ Requires-Dist: mapbuffer>=0.7; extra == "all"
63
+ Requires-Dist: cloud-files>=4.0; extra == "all"
64
+ Requires-Dist: dask[distributed]>=2024.0; extra == "all"
65
+ Requires-Dist: pyyaml>=6.0; extra == "all"
66
+ Provides-Extra: dev
67
+ Requires-Dist: pytest>=7.0; extra == "dev"
68
+ Requires-Dist: pytest-xdist>=3.5; extra == "dev"
69
+ Requires-Dist: ruff>=0.4; extra == "dev"
70
+ Requires-Dist: jupyter>=1.0; extra == "dev"
71
+ Requires-Dist: matplotlib>=3.7; extra == "dev"
72
+
73
+ > [!NOTE]
74
+ > This package is under development and will change. It will also be migrated to another location once completed.
75
+
76
+ <img src="assets/zarr-vectors.png" alt="zarr-vectors" width="60%" />
77
+
78
+ # zarr-vectors-tools
79
+
80
+ **File format workflows, algorithms, and multiresolution for Zarr Vectors.**
81
+
82
+ **`zarr-vectors-tools` is an extension of [`zarr-vectors-py`](https://github.com/Andrew-Keenlyside/zarr-vectors-py).** It is not a standalone library, and neither this README nor its documentation restates that package's.
83
+
84
+ `zarr-vectors-py` owns **Zarr Vectors** — the specification and the Python API over it: store layout, chunk and bin geometry, fragments, links, the object model, resolution-level metadata, validation, and the two supported surfaces `zarr_vectors.api` and `zarr_vectors.building`. Anything about the format or the core API is documented [there](https://zarr-vectors-py.readthedocs.io/en/latest) and only there.
85
+
86
+ This package adds the layers built on top of it: format-conversion workflows wrapping third-party readers and writers, streaming graph and mesh algorithms, the rich multiresolution coarsening layer, and the `zvtools` CLI.
87
+
88
+ *Zarr Vectors was originally specified by Forrest Collman, Allen Institute for Brain Sciences.*
89
+
90
+ | | |
91
+ | --- | --- |
92
+ | Documentation (this package) | [zarr-vectors-tools docs](https://zarr-vectors-tools.readthedocs.io/en/latest) |
93
+ | **Parent package** | [zarr-vectors-py](https://github.com/Andrew-Keenlyside/zarr-vectors-py) · [docs](https://zarr-vectors-py.readthedocs.io/en/latest) |
94
+ | **Specification** | [Zarr Vectors specification](https://zarr-vectors-py.readthedocs.io/en/latest/spec/index.html) |
95
+ | **Core API reference** | [zarr_vectors.api / zarr_vectors.building](https://zarr-vectors-py.readthedocs.io/en/latest/api/index.html) |
96
+ | Upstream specification | [AllenInstitute/zarr_vectors](https://github.com/AllenInstitute/zarr_vectors) |
97
+
98
+ ---
99
+
100
+ ## Install
101
+
102
+ ```bash
103
+ pip install zarr-vectors-tools
104
+ ```
105
+
106
+ Python ≥ 3.11. Every file format is gated behind an extra, so a base install stays slim:
107
+
108
+ ```bash
109
+ pip install "zarr-vectors-tools[trk]" # nibabel (TRK)
110
+ pip install "zarr-vectors-tools[streamlines]" # nibabel + trx-python
111
+ pip install "zarr-vectors-tools[all]" # everything except gpu
112
+ ```
113
+
114
+ Extras: `las`, `ply`, `trk`, `trx`, `streamlines`, `graph`, `points-enrichment`, `mesh`, `precomputed`, `parallel`, `gpu`, `all`, `dev`.
115
+
116
+ > [!IMPORTANT]
117
+ > This package requires the merged `links/<delta>/<offsets>/` layout — on-disk **format 0.9.0** — in which connectivity is a single family and there is no `cross_chunk_links/` to fall back to. That format ships in the current core *development* line, whose *package* version is still 0.2.x; format version and package version are independent. The reliable install is an editable core working tree:
118
+ >
119
+ > ```bash
120
+ > git clone https://github.com/Andrew-Keenlyside/zarr-vectors-py
121
+ > pip install -e ./zarr-vectors-py
122
+ > ```
123
+
124
+ ## Quick start
125
+
126
+ From the terminal:
127
+
128
+ ```bash
129
+ zvtools convert cells.csv cells.zarrvectors --chunk-shape 100,100,100
130
+ zvtools pyramid cells.zarrvectors --coarsen 8,8 --sparsity 2,2
131
+ zvtools convert cells.zarrvectors cells.ply --level 1 # and back out again
132
+ zvtools merge cells.zarrvectors more_cells.csv # append, don't replace
133
+ zvtools split cells.zarrvectors parts/ --by groups
134
+ zvtools info cells.zarrvectors
135
+ zvtools validate cells.zarrvectors --level 3
136
+ ```
137
+
138
+ From Python — note that `convert.ingest` and `convert.export` have no re-exports, so import from the concrete module:
139
+
140
+ ```python
141
+ from zarr_vectors_tools.convert.ingest.csv_points import ingest_csv
142
+ from zarr_vectors_tools.multiresolution.coarsen import build_pyramid
143
+ from zarr_vectors_tools.algorithms import compute_connected_components
144
+
145
+ ingest_csv("cells.csv", "cells.zarrvectors", chunk_shape=(100.0, 100.0, 100.0))
146
+ build_pyramid("cells.zarrvectors", factors=[(8.0, 2.0), (8.0, 2.0)])
147
+ ```
148
+
149
+ ## What's in it
150
+
151
+ | Subpackage | Purpose |
152
+ | --- | --- |
153
+ | `convert.ingest` | CSV/XYZ, LAS/LAZ, PLY, line CSV, TCK, TRK, TRX, SWC, precomputed skeletons, OBJ, STL, edge-list CSV, GraphML, GIFTI, FreeSurfer |
154
+ | `convert.export` | CSV, PLY, TRK, TRX, SWC, OBJ, h5ad |
155
+ | `compose` | merge a file or another store into an existing one; split a store by group, label or merged source |
156
+ | `multiresolution` | pyramid building: skeleton/polyline/point/mesh/graph coarsening, five object-selection strategies, cross-level links |
157
+ | `algorithms` | streaming graph search, connected components, clustering; mesh summary, attributes, spatial queries |
158
+ | `headers` | format-specific metadata preservation |
159
+ | `cli` | the `zvtools` command line |
160
+
161
+ Coarsening and sparsity are two orthogonal axes — coarsening reduces vertices *within* each object, sparsity drops whole objects while preserving the IDs of survivors. See [Coarsening versus sparsity](https://zarr-vectors-tools.readthedocs.io/en/latest/multiresolution/concepts.html).
162
+
163
+ ## Development
164
+
165
+ ```bash
166
+ git clone https://github.com/AllenInstitute/zarr-vectors-tools
167
+ cd zarr-vectors-tools
168
+ pip install -e ".[all,dev]"
169
+ pytest
170
+ ```
171
+
172
+ Build the docs locally:
173
+
174
+ ```bash
175
+ pip install -r docs/requirements-docs.txt
176
+ python -m sphinx -b html docs docs/_build/html
177
+ ```
178
+
179
+ ## License
180
+
181
+ BSD-3-Clause.
@@ -0,0 +1,109 @@
1
+ > [!NOTE]
2
+ > This package is under development and will change. It will also be migrated to another location once completed.
3
+
4
+ <img src="assets/zarr-vectors.png" alt="zarr-vectors" width="60%" />
5
+
6
+ # zarr-vectors-tools
7
+
8
+ **File format workflows, algorithms, and multiresolution for Zarr Vectors.**
9
+
10
+ **`zarr-vectors-tools` is an extension of [`zarr-vectors-py`](https://github.com/Andrew-Keenlyside/zarr-vectors-py).** It is not a standalone library, and neither this README nor its documentation restates that package's.
11
+
12
+ `zarr-vectors-py` owns **Zarr Vectors** — the specification and the Python API over it: store layout, chunk and bin geometry, fragments, links, the object model, resolution-level metadata, validation, and the two supported surfaces `zarr_vectors.api` and `zarr_vectors.building`. Anything about the format or the core API is documented [there](https://zarr-vectors-py.readthedocs.io/en/latest) and only there.
13
+
14
+ This package adds the layers built on top of it: format-conversion workflows wrapping third-party readers and writers, streaming graph and mesh algorithms, the rich multiresolution coarsening layer, and the `zvtools` CLI.
15
+
16
+ *Zarr Vectors was originally specified by Forrest Collman, Allen Institute for Brain Sciences.*
17
+
18
+ | | |
19
+ | --- | --- |
20
+ | Documentation (this package) | [zarr-vectors-tools docs](https://zarr-vectors-tools.readthedocs.io/en/latest) |
21
+ | **Parent package** | [zarr-vectors-py](https://github.com/Andrew-Keenlyside/zarr-vectors-py) · [docs](https://zarr-vectors-py.readthedocs.io/en/latest) |
22
+ | **Specification** | [Zarr Vectors specification](https://zarr-vectors-py.readthedocs.io/en/latest/spec/index.html) |
23
+ | **Core API reference** | [zarr_vectors.api / zarr_vectors.building](https://zarr-vectors-py.readthedocs.io/en/latest/api/index.html) |
24
+ | Upstream specification | [AllenInstitute/zarr_vectors](https://github.com/AllenInstitute/zarr_vectors) |
25
+
26
+ ---
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ pip install zarr-vectors-tools
32
+ ```
33
+
34
+ Python ≥ 3.11. Every file format is gated behind an extra, so a base install stays slim:
35
+
36
+ ```bash
37
+ pip install "zarr-vectors-tools[trk]" # nibabel (TRK)
38
+ pip install "zarr-vectors-tools[streamlines]" # nibabel + trx-python
39
+ pip install "zarr-vectors-tools[all]" # everything except gpu
40
+ ```
41
+
42
+ Extras: `las`, `ply`, `trk`, `trx`, `streamlines`, `graph`, `points-enrichment`, `mesh`, `precomputed`, `parallel`, `gpu`, `all`, `dev`.
43
+
44
+ > [!IMPORTANT]
45
+ > This package requires the merged `links/<delta>/<offsets>/` layout — on-disk **format 0.9.0** — in which connectivity is a single family and there is no `cross_chunk_links/` to fall back to. That format ships in the current core *development* line, whose *package* version is still 0.2.x; format version and package version are independent. The reliable install is an editable core working tree:
46
+ >
47
+ > ```bash
48
+ > git clone https://github.com/Andrew-Keenlyside/zarr-vectors-py
49
+ > pip install -e ./zarr-vectors-py
50
+ > ```
51
+
52
+ ## Quick start
53
+
54
+ From the terminal:
55
+
56
+ ```bash
57
+ zvtools convert cells.csv cells.zarrvectors --chunk-shape 100,100,100
58
+ zvtools pyramid cells.zarrvectors --coarsen 8,8 --sparsity 2,2
59
+ zvtools convert cells.zarrvectors cells.ply --level 1 # and back out again
60
+ zvtools merge cells.zarrvectors more_cells.csv # append, don't replace
61
+ zvtools split cells.zarrvectors parts/ --by groups
62
+ zvtools info cells.zarrvectors
63
+ zvtools validate cells.zarrvectors --level 3
64
+ ```
65
+
66
+ From Python — note that `convert.ingest` and `convert.export` have no re-exports, so import from the concrete module:
67
+
68
+ ```python
69
+ from zarr_vectors_tools.convert.ingest.csv_points import ingest_csv
70
+ from zarr_vectors_tools.multiresolution.coarsen import build_pyramid
71
+ from zarr_vectors_tools.algorithms import compute_connected_components
72
+
73
+ ingest_csv("cells.csv", "cells.zarrvectors", chunk_shape=(100.0, 100.0, 100.0))
74
+ build_pyramid("cells.zarrvectors", factors=[(8.0, 2.0), (8.0, 2.0)])
75
+ ```
76
+
77
+ ## What's in it
78
+
79
+ | Subpackage | Purpose |
80
+ | --- | --- |
81
+ | `convert.ingest` | CSV/XYZ, LAS/LAZ, PLY, line CSV, TCK, TRK, TRX, SWC, precomputed skeletons, OBJ, STL, edge-list CSV, GraphML, GIFTI, FreeSurfer |
82
+ | `convert.export` | CSV, PLY, TRK, TRX, SWC, OBJ, h5ad |
83
+ | `compose` | merge a file or another store into an existing one; split a store by group, label or merged source |
84
+ | `multiresolution` | pyramid building: skeleton/polyline/point/mesh/graph coarsening, five object-selection strategies, cross-level links |
85
+ | `algorithms` | streaming graph search, connected components, clustering; mesh summary, attributes, spatial queries |
86
+ | `headers` | format-specific metadata preservation |
87
+ | `cli` | the `zvtools` command line |
88
+
89
+ Coarsening and sparsity are two orthogonal axes — coarsening reduces vertices *within* each object, sparsity drops whole objects while preserving the IDs of survivors. See [Coarsening versus sparsity](https://zarr-vectors-tools.readthedocs.io/en/latest/multiresolution/concepts.html).
90
+
91
+ ## Development
92
+
93
+ ```bash
94
+ git clone https://github.com/AllenInstitute/zarr-vectors-tools
95
+ cd zarr-vectors-tools
96
+ pip install -e ".[all,dev]"
97
+ pytest
98
+ ```
99
+
100
+ Build the docs locally:
101
+
102
+ ```bash
103
+ pip install -r docs/requirements-docs.txt
104
+ python -m sphinx -b html docs docs/_build/html
105
+ ```
106
+
107
+ ## License
108
+
109
+ BSD-3-Clause.
@@ -0,0 +1,74 @@
1
+ # Benchmarks
2
+
3
+ Two suites, answering two different questions. Both live here rather
4
+ than in `zarr-vectors-py` so the core package keeps its dependency
5
+ surface at `numpy` / `numcodecs` / `zarr` — the benchmarks need
6
+ `pandas`, `matplotlib`, `jupyter`, and (for the format comparisons)
7
+ the third-party readers this package already wraps.
8
+
9
+ | Suite | Question | Contents |
10
+ |-------|----------|----------|
11
+ | [`paper/`](paper/) | *The three claims the paper makes, and nothing else.* | scripts — 8 panels as separate files + one supplementary table |
12
+ | [`formats/`](formats/) | *How does Zarr Vectors compare to the format I use today?* | 3 notebooks — Zarr Vectors reads/filters vs PLY, CSV, TRX, GraphML, SWC, OBJ |
13
+ | [`internals/`](internals/) | *How does Zarr Vectors scale along axis X?* | 8 notebooks — size, geometry type, backend, pyramid, bbox query, chunk shape, codec, edit cost |
14
+
15
+ `formats/` and `internals/` are exploratory: each has its own
16
+ `README.md`, its own `_build.py`, and its own `01..N` numbering. They
17
+ share no code; the small timing/stats helpers (`_time`, `_store_bytes`,
18
+ `_mean_ci95`, `N_RUNS = 10`, `T95_DF9 = 2.262`) are duplicated into each
19
+ generated notebook, which is what keeps a notebook runnable standalone.
20
+
21
+ `paper/` is different in kind — it is a publication artefact, not an
22
+ exploration. It is scripts rather than notebooks so that the measurement
23
+ can be re-run on reference hardware and the panels regenerated from the
24
+ committed CSV without re-measuring; the panels are written one per file
25
+ so the figure can be composed wherever the paper is being written. Start there if you want the headline
26
+ comparison; start in the other two if you want to understand a
27
+ particular axis.
28
+
29
+ ## Running
30
+
31
+ ```bash
32
+ pip install -e ".[all]" jupyter matplotlib
33
+ jupyter lab benchmarks/
34
+ ```
35
+
36
+ Then open a notebook and run all cells. Budget ~5 minutes for the
37
+ long ones (`formats/01_size_scaling`, `internals/01_size_scaling`,
38
+ `internals/08_edit_operations`).
39
+
40
+ `paper/` is scripts, not notebooks, so it runs from a shell instead:
41
+
42
+ ```bash
43
+ python benchmarks/paper/run_sweep.py # 10^3..10^6, ~20-30 min
44
+ python benchmarks/paper/run_large.py # 10^3..10^7, ~1.5 h, resumable
45
+ python benchmarks/paper/make_figure.py # seconds
46
+ ```
47
+
48
+ The default sweep stops at 10^6 because one more decade roughly triples
49
+ its wall time, and it is mostly run to check that nothing regressed.
50
+ `run_large.py` drives the same measurement code one decade further, block
51
+ by block into `paper/results/large/`, so the long run is opt-in and a
52
+ killed one can be resumed. See [`paper/README.md`](paper/README.md).
53
+
54
+ ## Regenerating
55
+
56
+ Notebooks are generated; never edit the `.ipynb` directly.
57
+
58
+ ```bash
59
+ python benchmarks/formats/_build.py # rewrites formats/*.ipynb
60
+ python benchmarks/internals/_build.py # rewrites internals/*.ipynb
61
+ ```
62
+
63
+ ## Shared caveats
64
+
65
+ - Wall time and on-disk bytes only — no memory profiling.
66
+ - No CI gating in either suite. The only automated performance guard
67
+ in the project is `tests/test_perf_writes.py` over in
68
+ `zarr-vectors-py`, which asserts loose (~3×) wall-clock ceilings to
69
+ catch order-of-magnitude regressions.
70
+ - Synthetic data with `SEED = 0`. Real datasets have different
71
+ sparsity and chunk-occupancy patterns, and therefore different
72
+ scaling slopes.
73
+ - Machine-dependent. These are "what to expect on my hardware" sanity
74
+ plots, not authoritative numbers.