MD-Models
Welcome to Markdown Models (MD-Models), a powerful framework for research data management that prioritizes flexibility and efficiency.
With an adaptable markdown-based schema language, MD-Models automatically generates schemas and programming language representations. This markdown schema forms the foundation for object-oriented models, enabling seamless cross-format compatibility and simplifying modifications to data structures.
Check out the documentation for more information.
Example
The schema syntax uses Markdown to define data models in a clear and structured way. Each object is introduced with a header, followed by its attributes. Attributes are described with their type, a brief explanation, and optional metadata like terms. Nested or related objects are represented using array types or references to other objects.
prefixes:
schema: http://schema.org/
- - - -- - - -- - -
- - -
Installation
In order to install the command line tool, you can use the following command:
Command line usage
The command line tool can be used to convert markdown files to various formats. The following command will convert a markdown file to Python code:
This will read the input file model.md and write the output to lib.py using the Python dataclass template. Alternatively, you can also pass a URL as input to fetch the model remotely. For an overview of all available templates, you can use the following command:
Available templates
The following templates are available:
python-dataclass: Python dataclass implementation with JSON-LD supportpython-pydantic: PyDantic implementation with JSON-LD supportpython-pydantic-xml: PyDantic implementation with XML supportxml-schema: XML schema definitionjson-schema: JSON schema definitionshacl: SHACL shapes definitionshex: ShEx shapes definition
Development
This project uses GitHub Actions for continuous integration. The tests can be run using the following command: