Show how to inspect HERD after reading in the tutorial#1535
Open
rly wants to merge 1 commit into
Open
Conversation
Expand the "Read HERD" section of the external resources tutorial to demonstrate accessing a HERD after HERD.from_zip, using to_dataframe, the interlinked tables, and get_object_entities, so a read HERD no longer appears empty and inaccessible. Resolves #1325 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1535 +/- ##
=======================================
Coverage 93.22% 93.22%
=======================================
Files 41 41
Lines 10204 10204
Branches 2106 2106
=======================================
Hits 9513 9513
Misses 414 414
Partials 277 277 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Motivation
Resolves #1325.
The external resources tutorial's "Read HERD" section only called
HERD.from_zip(...)and then deleted the zip, showing nothing about how to access the data. Combined with a readHERDrendering with empty collapsibles in Jupyter, this left users unsure how to get at the references they had just loaded.The Jupyter rendering half of the issue was already addressed in #1510 (
HERD.__repr__/_repr_html_now surface a flattened references table). This PR fills the documentation gap.Changes
docs/gallery/plot_external_resources.pyinto an "Inspect the data after reading" walkthrough that demonstrates:to_dataframe()for the flattened, one-row-per-association view,.to_dataframe(),get_object_entities(file=..., container=...)for single-object lookup.HERDis no longer perceived as empty.This mirrors the reading/inspection section added to the pynwb tutorial in NeurodataWithoutBorders/pynwb#2200.
Verification
to_dataframe()yields 2 rows andget_object_entitiesyields 2 rows.ruff checkand pre-commit hooks pass.🤖 Generated with Claude Code