Export are currently broken
After running make small_ex
the following don't work:
from vizitig.info import *
from vizitig import export
G = get_graph("mini_bcalm.fa")
The following is due to outdated handling of colors:
export.export_graph("mini_bcalm.fa", list(G), "bcalm", "/tmp/test.fa") # key error `meta_list`
The following is due to the attempt to dump into JSON custom type:
export.export_graph("mini_bcalm.fa", list(G), "json", "/tmp/test.fa") # TypeError: keys must be str, int, float, bool or None, not Color
The following is due to custom types handling by pygraphviz
export.export_graph("mini_bcalm.fa", list(G), "json", "/tmp/test.fa") # AttributeError: 'Color' object has no attribute 'encode'
The following is a ugly error probably again due to custom type:
export.export_graph("mini_bcalm.fa", list(G), "gml", "/tmp/test.fa") # ugly
The (two) other seems to work.
Fix proposal: work directly on networkx graph built in export to remove our custom class and replace them with builtin type(string)
Enhancement: Write a doctest in export to provide the list of export format and some documentations about transformation.