You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yep that could be useful. I was just thinking to produce some ASCII art
showing the hierarchy down to a specified level, with node names and node
types (Array/Group) as a minimum.
Yep asciitree looks good. Can be configured to produce output very similar to linux tree command:
>>> box_tr = LeftAligned(draw=BoxStyle(gfx=BOX_LIGHT, horiz_len=2, label_space=1))
>>> print(box_tr(tree))
asciitree
├── sometimes
│ └── you
├── just
│ └── want
│ ├── to
│ └── draw
├── trees
└── in
└── your
└── terminal
That said, I don't know that I will be able to do lots of iteration on it near term. So if you are wanting to get it in quickly, please feel free to run with it.
Activity
jakirkham commentedon Nov 30, 2016
Maybe something like a visitor pattern ( https://github.com/alimanfoo/zarr/issues/92 ) would help with this.
alimanfoo commentedon Nov 30, 2016
jakirkham commentedon Nov 30, 2016
Sure, that would be good too. Maybe diagrams could be made akin to those used in Dask's graphs. Wonder if @mrocklin has any suggestions.
mrocklin commentedon Nov 30, 2016
I would personally stick to ASCII. I would look at what PyTables does as well as bash tools like
treejakirkham commentedon Nov 30, 2016
This may be an option. ( https://github.com/mbr/asciitree )
alimanfoo commentedon Nov 30, 2016
jakirkham commentedon Mar 2, 2017
If you want to go the standard library way, maybe
pprintwould work. Though IMHOasciitreestill looks pretty good.alimanfoo commentedon Mar 2, 2017
Yep asciitree looks good. Can be configured to produce output very similar to linux
treecommand:jakirkham commentedon Mar 3, 2017
Wanted to see how easy this would be now that we have visitor-style methods. Went ahead and threw together PR ( https://github.com/alimanfoo/zarr/pull/140 ). FWICT it seems to work ok.
That said, I don't know that I will be able to do lots of iteration on it near term. So if you are wanting to get it in quickly, please feel free to run with it.