materialsintelligence / propnet

A knowledge graph for Materials Science.
Other
74 stars 23 forks source link

can't figure out the format of print(propnet) #80

Open computron opened 6 years ago

computron commented 6 years ago

The jupyter notebook starts with printing a propnet. I tried for awhile to figure out what the format of this thing is but it's beyond me. Why are there indents sometimes and not others? I can't figure it out!

Incidentally there is a networkx ascii tool, I'd be pretty interested to see what kind of craziness would result from printing that out ...

https://github.com/cosminbasca/asciinet

mkhorton commented 6 years ago

Good call, was actually looking at tree_format for this, which prints things quite nicely/hierarchically

I wouldn't expect asciinet to produce anything remotely legible, but might be fun to try!

mkhorton commented 6 years ago

@montoyjh @dmrdjenovich any thoughts on this?

Linking tree_format as previously proposed solution

Still think we need better __str__ + __repr__ methods, esp. for Material and Graph (née Propnet)