Repository navigation
0.3: grids and blocks - #4
Merged
Merged
Conversation
worldarray.grid, re-exported at the top level: Block, blocks (a picklable Blocks record computing each block from its id), Grid (a store-less grid with box, corner, index_box, chunks_covering, write_shape, blocks, meta and from_meta) and level_factors. units.abbreviation gives the OME short form for every spelling the unit table knows; store.join, parent and basename are public and wa.store is exported. Behaviours 17 to 19; the WorldArray side (vol.blocks, write_chunk, create(grid=)) is left to the write module. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
# Conflicts: # src/worldarray/__init__.py
vol.blocks() (block_shape defaults to write_shape), vol.write_chunk(index, data) for one whole write unit, wa.create(path, grid=g, dtype=) taking shape, placement, axes, units, chunks and shards from a Grid, Grid.meta carrying the shard shape. Spec Behaviour 17 gains what the two block-iterator consumers asked for and the subagent built: a box that may reach past the array with only read boxes clipped, at_start/at_end per axis, inner slices, a picklable iterable with O(1) blocks[id]; Behaviour 18 names the fields a grid's meta shares with the created array's; Open question 6 is resolved. README and CHANGELOG for 0.3.0. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
Open question 13 (world boxes on blocks) closed as not planned: daisy stays in cellmap-flow. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
The previous commit kept the conflict markers around the 0.2.0 heading. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
The merge resolution kept main's side only and lost the 0.3.0 entry. Claude-Session: https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
worldarray 0.3: grids and blocks, built to spec draft 3 (Behaviours 17 to 19). Stacked on PR #3 (0.2); its base is the
write-0.2branch and it retargets to main once #3 merges. 157 tests pass (136 after 0.2, 21 new).wa.blocks(shape, block_shape, context=0, box=None, clip=True): the array, or a voxel box that may reach past it, cut into write boxes that tile with no overlap and no gap; each block carries its read box grown bycontext(int, per axis, or(before, after)pairs) and clipped to the array whenclip, plusat_start/at_endper axis andinner, the write box's slices inside the read box. C order,len,blocks[id]in O(1),index_of. Plain picklable records; the iterable pickles without its blocks. Nothing is scheduled.vol.blocks()defaults towrite_shape;vol.write_chunk(index, data)writes one whole unit.wa.Grid: aWorldArraywithout a store (box,corner,index_box,chunks_covering,write_shape,blocks,meta);Grid.from_meta(meta, voxel_size=)is an array's grid or the resample target grid over it;wa.create(path, grid=g, dtype=)creates from it and reports the same shape, chunks, shards, axes, units and placement.wa.level_factors: the anisotropy-aware pyramid schedule mesh-n-bone and cellmap-analyze share, per level, with a stop rule.wa.units.abbreviation;wa.store.join/parent/basenamepublic.The grid module was built by an Opus subagent from the spec in an isolated worktree and reviewed here; the two block-iterator consumers (mesh-n-bone, cellmap-analyze) confirmed the shape before it was built, and their additions are in Behaviour 17. Open question 6 is resolved.
https://claude.ai/code/session_0141wgF8mkGbjGfBFKfKhp64