docs: document restricted diagram operations (new in 2.2)#155
Merged
dimitri-yatsenko merged 8 commits intomainfrom Mar 13, 2026
Merged
docs: document restricted diagram operations (new in 2.2)#155dimitri-yatsenko merged 8 commits intomainfrom
dimitri-yatsenko merged 8 commits intomainfrom
Conversation
- Add Operational Methods section to diagram.md spec: cascade(), restrict(), delete(), drop(), preview(), prune(), restriction propagation rules, OR-vs-AND convergence - Add Graph-Driven Diagram Operations section to whats-new-22.md: motivation, preview-then-execute pattern, two propagation modes, pruning empty tables - Add Diagram-Level Delete section to delete-data.md: build-preview-execute workflow, when to use - Add prune() to read-diagrams how-to - Add version admonition in data-manipulation.md noting graph-driven cascade internals - Cross-references between all files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21a36c6 to
443090c
Compare
- Add dry_run parameter to delete() and drop() signatures in diagram.md - Fix trailing slashes in cross-reference paths across 3 files - Convert inline version markers to proper admonitions in read-diagrams.ipynb - Normalize table-cell version markers to consistent *(New in X.Y)* format Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…stors Both cascade() and restrict() propagate downstream only from the seed table. Ancestors of the seed are excluded. Document this in the diagram spec (cascade and restrict method descriptions) and the whats-new explanation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ancestors remain in the diagram but receive no restrictions and are
unaffected by delete/preview. Previous wording ("excluded") was
imprecise — they're not removed from the graph, just not operated on.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ttngu207
previously approved these changes
Mar 9, 2026
Update diagram.md and whats-new-22.md to reflect that cascade() returns a trimmed Diagram containing only seed + descendants, while restrict() keeps the full graph intact for chaining. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Lead each description with its purpose rather than using parallel structure. cascade() prepares a delete (one-shot, trims graph, OR). restrict() selects a data subset (chainable, preserves graph, AND). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Describe how cascade propagates restrictions upward from part to master, then back downstream to all sibling parts, deleting the entire compositional unit. Updated in both diagram.md and master-part.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diagram is now an inspection-only tool. delete() and drop() have been moved to Table. Updated diagram spec, whats-new-22, and delete-data how-to to reflect this change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ttngu207
approved these changes
Mar 13, 2026
esutlie
approved these changes
Mar 13, 2026
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
Document the graph-driven diagram operations introduced in DataJoint 2.2. The Diagram is an inspection and graph computation tool — all mutation (delete, drop) is executed by
Table.delete()andTable.drop().Changes
diagram.md: Add operational methods section documentingcascade(),restrict(),preview(),prune()with restriction propagation rules, OR-vs-AND convergence semantics, andpart_integritybehavior. Nodelete()ordrop()on Diagram.whats-new-22.md: Add graph-driven diagram operations section covering motivation, preview-then-execute pattern (Diagram for inspection →Table.delete()for execution), two propagation modes, architecture, and comparison table vs error-driven cascade.delete-data.md: Add "Inspecting Cascade Before Deleting" section showingdelete(dry_run=True)for quick preview anddj.Diagram(schema).cascade().preview()for detailed inspection. Deletion always throughTable.delete().data-manipulation.md: Version admonition noting graph-driven cascade internals in 2.2.master-part.md: Documentpart_integrity="cascade"upward propagation behavior.Key design decision
Diagramhas nodelete()ordrop()methods. It providescascade()andpreview()for understanding the blast radius;Table.delete()handles transactions, SQL execution, prompts, and error handling. This keeps the Diagram as a pure graph computation tool.Test plan
mkdocs buildsucceeds with no new warnings🤖 Generated with Claude Code