pybel / pybel

🌶️ An ecosystem in Python for working with the Biological Expression Language (BEL)
http://pybel.readthedocs.io
MIT License
131 stars 32 forks source link

Graph Data Management #49

Closed cthoyt closed 7 years ago

cthoyt commented 7 years ago

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 use SQLlchemy.

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 that pandas is unacceptable.

Production ready

Still needs reinvestigation

Reinvestigate all code:

LeKono commented 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.