Show codec names in table preview instead of =BLOB=#1330
Merged
dimitri-yatsenko merged 1 commit intopre/v2.0from Jan 12, 2026
Merged
Show codec names in table preview instead of =BLOB=#1330dimitri-yatsenko merged 1 commit intopre/v2.0from
dimitri-yatsenko merged 1 commit intopre/v2.0from
Conversation
e8b598b to
ee2240b
Compare
- Raw blobs (no codec) now show "bytes" - Raw json (no codec) shows "json" - Codec fields show "<codec_name>" (e.g., <blob>, <hash>, <object>) - HTML output properly escapes angle brackets for browser display - Improves clarity when viewing table contents Example output: *id raw_blob blob_data json_data 1 bytes <blob> json Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ee2240b to
7825b3c
Compare
ttngu207
reviewed
Jan 12, 2026
Comment on lines
+30
to
+31
| if attr is None: | ||
| return "bytes" |
Contributor
There was a problem hiding this comment.
Why do we expect attr to be None? Can it ever be None? If it can, perhaps this should raise an error instead of returning bytes
Member
Author
There was a problem hiding this comment.
Good catch! You're right - attr should never be None here since field_name always comes from heading.names. The defensive check was silently hiding potential bugs.
I've updated the code in PR #1331 (which now includes this PR) to raise an error instead:
if attr is None:
raise DataJointError(f"Field '{field_name}' not found in heading")This way any unexpected state will surface immediately rather than returning a misleading "bytes" placeholder.
dimitri-yatsenko
added a commit
that referenced
this pull request
Jan 12, 2026
Merge PR #1330 (blob preview display) into feature/npy-codec. Bump version from 2.0.0a17 to 2.0.0a18. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
dimitri-yatsenko
added a commit
that referenced
this pull request
Jan 12, 2026
Address reviewer feedback from PR #1330: attr should never be None since field_name comes from heading.names. Raising an error surfaces bugs immediately rather than silently returning a misleading placeholder. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
bytes<codec_name>(e.g.,<blob>,<object>)Before
After
Test plan
🤖 Generated with Claude Code