Repository navigation
Add B2Info Script for instant container inspection - #803
Open
nikprasa31 wants to merge 2 commits into
Open
nikprasa31 wants to merge 2 commits into
nikprasa31 wants to merge 2 commits into
Conversation
FrancescAlted
left a comment
Member
There was a problem hiding this comment.
That is looking good. Some suggestions:
- Try to handle invalid .b2z files without a traceback. Catch it and add a --json regression test that checks exit code 1, empty stdout, and a short stderr message.
- Don’t build the tree unless --tree is requested. Make the default text summary count the same visible entries without sorting or rendering them.
Finally, one smaller JSON suggestion: escape user dictionaries containing __type__ with the existing tagged dict encoding. Otherwise a real dictionary like {"__type__": "bytes", "base64": "YQ=="} is indistinguishable from encoded bytes.
This branch has not been deployed
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.
Closes #716
About the changes
The b2info Script helps us quickly inspect containers of type: .b2nd (NDArray), .b2frame (SChunk), .b2d (DictStore), .b2z (TreeStore)
without decompressing data.
Arguments
b2info <path>for example for DictStore
b2info store.b2d --treeTreeStore
DictStore
Attributes(--attrs): Adds the user attributes/ metadata to output.
b2info store.b2d --attrsJSON (--json): Converts the output to JSON. While converting attrs to json, added support for certain types such as bytes, NaN etc on how they will be converted to json values
b2info store.b2d --jsonErrors
Follow error cases are covered
AI Usage Policy
AI disclosure: AI was used to draft code, documentation and test scenarios. Have personally reviewed, understood every change. PR description is written by self.