Skip to content

Commit 77d26d9

Browse files
author
Claude Subagent
committed
docs: Add missing changelog entry for registry refactor
1 parent 49ab7a2 commit 77d26d9

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

changes/3734.refactor.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
1-
# Refactor: Separate registry logic from ChunkGrid base class (fixes #3734)
1+
Separate registry logic from ChunkGrid base class
22

3-
## Summary
4-
The `ChunkGrid` base class previously contained registry logic in its `from_dict` class method, which was responsible for dispatching to the appropriate subclass (e.g., `RegularChunkGrid`) based on the configuration. This violated the separation of concerns principle.
5-
6-
## Changes
7-
1. **Removed `from_dict` from `ChunkGrid` base class**: The base class no longer handles the dispatch logic.
8-
2. **Created `parse_chunk_grid` function**: A new module-level function now handles the deserialization and dispatch to appropriate subclasses. This follows the same pattern as other similar functions in the codebase (e.g., `parse_chunk_key_encoding`).
9-
3. **Updated `ArrayV3Metadata`**: The metadata class now uses `parse_chunk_grid` instead of `ChunkGrid.from_dict`.
10-
11-
## Benefits
12-
- **Separation of concerns**: The base class is now a pure data structure without registry responsibilities.
13-
- **Consistency**: The pattern now matches other similar types in the codebase (e.g., chunk key encodings).
14-
- **Extensibility**: New chunk grid types can be registered without modifying the base class.
15-
- **Clearer intent**: The registry logic is now explicit via the `parse_chunk_grid` function.
16-
17-
## API Changes
18-
- **Breaking**: Code that directly called `ChunkGrid.from_dict()` should now call `parse_chunk_grid()` instead.
19-
- **Non-breaking**: Internal uses within the library have been updated. Public API users may need to update if they were directly using `ChunkGrid.from_dict()`.
3+
- Move from_dict dispatch logic to parse_chunk_grid function
4+
- ChunkGrid is now a pure data structure without registry responsibilities
5+
- Improves separation of concerns and testability

0 commit comments

Comments
 (0)