Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AEP: Add a schema to ORM classes #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Commits on Jan 19, 2024

  1. Add AEP: Add a schema to ORM classes

    AiiDA's Python API provides an object relational mapper (ORM) that
    abstracts the various entities that can be stored inside the provenance
    graph and the relationships between them. In most use cases, users use
    this ORM directly in Python to construct new instances of entities and
    retrieve existing ones, in order to get access to their data and
    manipulate it.
    
    A current shortcoming of the ORM is that it is not possible to
    programmatically introspect the schema of each entity: that is to say,
    what data each entity stores. This makes it difficult for external
    applications to provide interfaces to create and or retrieve entity
    instances. It also makes it difficult to take the data outside of the
    Python environment since the data would have to be serialized. However,
    without a well-defined schema, doing this without an ad-hoc solution is
    practically impossible.
    
    Clear data schemas for all ORM entities would enable the creation of
    external applications to work with the data stored in AiiDA's provenance
    graph. A typical example use case would be a web API whose interface, to
    create and return ORM entities from an AiiDA profile, would be
    dynamically generated by programmatically introspecting the schema of
    all ORM entities stored within it. Currently, the interface has to be
    manually generated for each ORM entity, and data (de)serialization has
    to be implemented.
    sphuber committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    983a645 View commit details
    Browse the repository at this point in the history