-
Notifications
You must be signed in to change notification settings - Fork 11
docs: Diagram guide with schema grouping, collapse, and Mermaid examples #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
2178c9b to
d4d4235
Compare
New documentation: - Add reference/specs/diagram.md with complete API documentation - Document direction parameter, Mermaid output, and schema grouping Updates: - Add Diagram to mkdocs.yaml navigation - Add Diagram to specs index - Update read-diagrams.ipynb with new features: - Layout direction examples - Mermaid output examples - Schema grouping examples Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
d4d4235 to
f4d7c2e
Compare
- Add second schema (howto_analysis) with cross-schema references - Demonstrate group_by_schema=True for visualizing multi-schema pipelines - Update cleanup cell to drop both schemas Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove group_by_schema parameter from all examples - Document automatic grouping with Python module names as labels - Update Mermaid examples to show subgraphs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All notebooks now show diagrams with automatic schema grouping, displaying Python module names as cluster labels. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Collapsing Schemas section to how-to guide - Add collapse() to reference documentation - Update summary table with collapsed schema visual - Re-execute notebook with collapse examples Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added demo_modules/ with three Python modules demonstrating cross-schema dependencies: - acquisition.py: Core tables (Lab, Subject, Session) - processing.py: Processing tables (references acquisition) - analysis.py: Analysis tables (references both modules) Updated read-diagrams.ipynb with: - Extended collapse examples using actual Python modules - Fixed variable naming conflict (howto_analysis vs analysis module) - Examples showing "expanded wins" behavior - High-level view with all modules collapsed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added links to: - Read Schema Diagrams (read-diagrams.ipynb) in Schema Design section - Use the <npy> Codec (use-npy-codec.md) in Object Storage section Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tutorials index: - Added Electrophysiology with Object Storage (ephys-with-npy.ipynb) Explanation index: - Added Semantic Matching - Added What's New in 2.0 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update demo_modules to use deferred schema activation pattern - Use core types (int16, int32, float32) instead of native types - Mark collapse feature as new in DataJoint 2.1 - Fix notebook cell ordering for schema activation/drop - Update code snippets to show core types Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Changed from dj.Diagram(module.schema) to simpler dj.Diagram(module) - Added example with two schemas collapsed - Added schema-level DAG showing all modules collapsed - Re-executed notebook with updated outputs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Re-executed notebook with fixed collapse logic. All examples now render correctly: - All three modules collapsed shows schema-level DAG - Mixed mode shows acquisition expanded, others collapsed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Reduced code block font size to 0.75em - Added pre-wrap for long lines to prevent horizontal scrolling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed duplicate alias nodes (4 → 2 orange dots) - Fixed fresh diagrams incorrectly collapsing - All collapse examples now render correctly Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replaced markdown code block with reference to the actual executable cell that demonstrates the "Expanded wins" rule. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Inserted executable cell right after the markdown explanation so the diagram is visible immediately. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collapsed node now shows "howto_analysis (2 tables)" instead of ambiguous "__main__", making it clear which schema is collapsed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Demonstrates collapsing middle layers of a pipeline while keeping top (RawData) and bottom (FinalResult) expanded. The collapsed node sits between them maintaining DAG structure: RawData → (2 tables) → FinalResult Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collapsed node now appears inside the cluster with RawData and FinalResult, maintaining proper visual flow: RawData → (2 tables) → FinalResult Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All diagrams now use left-to-right layout by default, matching the natural data flow representation in pipelines. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collapsed nodes now display "(N tables)" without redundant name since the cluster label already shows the schema/module name. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create how-to/master-part.ipynb covering compositional data patterns - Add to mkdocs navigation and how-to index - Cross-link from model-relationships, define-tables, insert-data, delete-data - Add tip box in master-part spec linking to how-to Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mark schema grouping, collapse, mermaid output, and layout direction as new features in DataJoint 2.1. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The mermaid code block will render in the built docs via mkdocs-mermaid2. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Clarify that visual clustering is new in 2.1, not multi-schema support - Remove mermaid rendered example (mkdocs-jupyter doesn't process it) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
MilagrosMarin
approved these changes
Jan 24, 2026
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
Documentation for new
dj.Diagramfeatures added in datajoint-python#1345, plus new master-part how-to guide.New Content
Master-Part How-To Guide (NEW)
how-to/master-part.ipynb- Task-oriented guide covering:-> masterReference Specification
reference/specs/diagram.md- Complete API reference fordj.DiagramHow-To Guide Updates
how-to/read-diagrams.ipynb- Comprehensive guide including:Key Examples Documented
Files Changed
src/how-to/master-part.ipynb- New master-part how-to guidesrc/how-to/read-diagrams.ipynb- Updated with new featuressrc/how-to/model-relationships.ipynb- Added link to master-partsrc/how-to/define-tables.md- Added See Also section with master-part linksrc/how-to/insert-data.md- Added See Also section with master-part linksrc/how-to/delete-data.md- Added master-part link to See Alsosrc/how-to/index.md- Added master-part to Schema Design sectionsrc/reference/specs/diagram.md- New specification docsrc/reference/specs/master-part.md- Added tip linking to how-tosrc/reference/specs/index.md- Added diagram spec to listingmkdocs.yaml- Navigation updatesRelated
🤖 Generated with Claude Code