feat: add support for networkx (optional group/extra)
Opened this issue · 4 comments
Add ability to work with anytree as networkx graph.
I am not expert, bad case is to generate networkx graph. May be better to make some adapter?
Networkx can be made optional behind flag (extra/optional group).
I have domain where I work with table data, graph, and tree on basically same data. So need easy move from one representation to other.
Question why anytree to be optionally dependant on networkx but not there way around? Or having 3rd library to make connection? I do not know. So would be have just have such conversion at my hands in anytree or in networkx maintained. Also I questions could be why not deepmind-tree or sqlite or pandas or networkit integration...
Answer may be - I do not see anytree claims to be functional generic generalized n-ary tree
- it means it may be not ideally composable with others, so some modification will need to be in anytree.
will donate 30 USD in crypto for this
For anytree this might be off-topic but I have recently been thinking about generalizing trees in python (exposing basically the same api as anytree). If you create an issue on https://github.com/lverweijen/AbstractTree/issues, I might be able to help you further.
@lverweijen nice graph overview of trees and list of impls. interesting to think of if AbstractTree will work with types well too #252
Python untyped and likely typed python too are powerful to be unified under some tree abstraction which will allow unified integration with graphs.
@c0fec0de feel free to close issue if it will appear that AbstractTree interface conformance for some future anytree is better than thinking of direct integration with graphs.