Add replica tree views and storage-backed replica handling#82
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a UUID-backed primary storage layout for managed artifacts, with the existing template-derived path becoming a symlink "replica" by default. Adds a new replica module that can plan and apply generated symlink views over current catalog state, and threads a new primary_location parameter through add_file/plan_artifact_storage and StoragePlan.
Changes:
- New
ogcat.replicasmodule withReplicaViewPlan/ReplicaPlanItem/ReplicaStateandCatalog.plan_view()for dry-run/apply of symlink views. add_file()andplan_artifact_storage()now default toprimary_location="uuid"(storing underfiles/objects/<aa>/<uuid><suffix>) and create a template symlink replica via a new record post-processor;StoragePlancarriesartifact_uuid/primary_location.- Tests updated across add/storage/CLI/hooks/writers and a new
tests/test_replicas.py; README, architecture, locators-and-storage, and API docs refreshed.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/ogcat/catalog.py | Adds UUID primary placement, template-symlink-replica post-processor, plan_view(), and helper functions. |
| src/ogcat/replicas.py | New module defining replica plan/apply data structures and symlink renderer. |
| src/ogcat/storage.py | Extends StoragePlan and plan_storage() with artifact_uuid/primary_location. |
| src/ogcat/init.py | Re-exports new replica types. |
| tests/test_add.py | Updates expectations to UUID primary + template replica; adds primary_location="template" test. |
| tests/test_storage.py | Splits UUID-default vs template-primary cases; adds explicit-locator override test. |
| tests/test_replicas.py | New test suite covering plan/apply, collisions, unsupported locators, missing targets, regeneration. |
| tests/test_cli.py | Adjusts assertions to UUID primary paths. |
| tests/test_writers.py | Adds primary_location="template" to existing zarr-naming test. |
| README.md | Documents UUID-primary default and plan_view. |
| docs/concepts/locators-and-storage.md | Explains UUID primary, template replica, and view planning. |
| docs/architecture.md | Notes UUID-backed primary and replica/view derivation. |
| docs/api/replicas.rst, docs/api/index.rst | Adds API reference page for replicas. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1689ad2 to
90aefc3
Compare
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.
Summary
Testing