Skip to content

๐Ÿš€ - Generate powerful Python code from verbose markdown documents

Notifications You must be signed in to change notification settings

sH4MbLe5/software-driven-rdm

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Software-Driven RDM

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.

๐ŸŽ Features

  • 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

โšก๏ธ Quick start

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

โš™๏ธ Example code

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)

๐Ÿงฌ Code Generation

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.

๐Ÿ“– Documentation and more examples

In the making! ๐Ÿ›

โš ๏ธ License

sdRDM is free and open-source software licensed under the MIT License.

About

๐Ÿš€ - Generate powerful Python code from verbose markdown documents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.8%
  • Jinja 3.2%