Software-driven Research Data Management (sdRDM) is a concept and library that builds upon abstract data models in readable formats. Data Models generated by sdRDM are able to be exported into all common formats such as JSON/XML and towards standards defined by the community.
- Generate and maintain RDM APIs via readable specifications in Markdown
- Data Models defined in sdRDM can be exported to any format
- Link your data model to any other data model and setup workflows
Get started with PyEnzyme by running the following command
# Using PIP
python -m pip install git+https://github.com/JR-1991/software-driven-rdm.git
Or build by source
git clone https://github.com/JR-1991/software-driven-rdm.git
cd software-driven-rdm
python3 setup.py install
This example will demonstrate how to set up an sdRDM Data Model in Python. By inheriting sdRDM.DataModel
classes will posses all benefits such as export and import from and to various data formats.
from sdRDM import DataModel, Field
from typing import
class Person(DataModel):
name: str = Field(
...,
description="Name of a person"
)
age: int = Field(
...,
description="Age of a person"
)
class Group(DataModel):
name: str = Field(
...,
description="Name of this group"
)
persons: List[Person] = Field(
description="Persons from this group",
default_factory=list
)
# Apply data model
person1 = Person(name="Max", age=43)
person2 = Person(name="Hannah", age=38)
group = Group(
name="sdRDM Group",
persons=[person1, person2]
)
print(group.yaml())
(Code should run as it is)
Software-driven RDM is also capable of generating Python APIs from Markdown specifications. For this, please inspect the example found here. In this example, a Python API for a Biocatalyst will be generated from its corresponding specification. Aside from a functional API this will also result in a class diagram to understand the workings of the data model.
In the making! ๐
sdRDM
is free and open-source software licensed under the MIT License.