Closed cthoyt closed 7 years ago
The BelDataManager has the function bdm.store_graph(pybel_graph, graph_label, graph_name=None)
and bdm.load_graph(graph_label)
. Graph label is used as unique identifier to make multiple graphs accessable. That way the user also does not need to take care of 'where should if pickle this to?'.
Also the method bdm.show_stored_graphs()
returns a list of all graph_labels in the database.
This can be used as groundwork for the future user management system.
In addition we have to clarify (tomorrow) how to handle different versions of namespaces in the relational store.
This is the monolithic to-do for the data manager portion of the project. This consists of translating the
Django
models used in the AETIONOMY Knowledgebase to useSQLlchemy
.For the first try, do NOT focus on speed. We need a working implementation first before optimizing. This should all be done in beautiful, idiomatic python, and take full advantage of the
SQLAlchemy
ORM. This also means thatpandas
is unacceptable.Production ready
pybel.manager.models.Network
)pybel.manager.graph_cache.GraphCacheManager
)Still needs reinvestigation
pybel.manager
pybel.to_database(belgraph, conn_str)
pybel.from_database(conn_str)
Reinvestigate all code:
relationship()
to automatically make joinssession.query(models.Namespace).filter(models.Namespace.keyword == 'HGNC').one()
and transaction management at thesession
level