Skip to content

docs: document restricted diagram operations (new in 2.2)#155

Merged
dimitri-yatsenko merged 8 commits intomainfrom
docs/v2.2-restricted-diagram
Mar 13, 2026
Merged

docs: document restricted diagram operations (new in 2.2)#155
dimitri-yatsenko merged 8 commits intomainfrom
docs/v2.2-restricted-diagram

Conversation

@dimitri-yatsenko
Copy link
Member

@dimitri-yatsenko dimitri-yatsenko commented Feb 22, 2026

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() and Table.drop().

Changes

  • diagram.md: Add operational methods section documenting cascade(), restrict(), preview(), prune() with restriction propagation rules, OR-vs-AND convergence semantics, and part_integrity behavior. No delete() or drop() 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 showing delete(dry_run=True) for quick preview and dj.Diagram(schema).cascade().preview() for detailed inspection. Deletion always through Table.delete().
  • data-manipulation.md: Version admonition noting graph-driven cascade internals in 2.2.
  • master-part.md: Document part_integrity="cascade" upward propagation behavior.
  • Cross-references between all affected files.

Key design decision

Diagram has no delete() or drop() methods. It provides cascade() and preview() 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 build succeeds with no new warnings
  • Review rendered pages for diagram.md, whats-new-22.md, delete-data.md
  • Verify cross-reference links resolve correctly

🤖 Generated with Claude Code

@dimitri-yatsenko dimitri-yatsenko changed the base branch from docs/v2.2-thread-safe to main March 6, 2026 20:56
- 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>
@dimitri-yatsenko dimitri-yatsenko force-pushed the docs/v2.2-restricted-diagram branch from 21a36c6 to 443090c Compare March 6, 2026 21:28
dimitri-yatsenko and others added 3 commits March 9, 2026 08:55
- 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
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>
dimitri-yatsenko and others added 2 commits March 9, 2026 16:07
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>
@dimitri-yatsenko dimitri-yatsenko merged commit 32c4a40 into main Mar 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants