mdmodels-core 0.1.3__cp39-none-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ from .mdmodels_core import *
2
+
3
+ __doc__ = mdmodels_core.__doc__
4
+ if hasattr(mdmodels_core, "__all__"):
5
+ __all__ = mdmodels_core.__all__
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.3
2
+ Name: mdmodels_core
3
+ Version: 0.1.3
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ License-File: LICENSE.md
8
+ Summary: A tool to generate models, code and schemas from markdown files
9
+ Author: Jan Range <jan.range@simtech.uni-stuttgart.de>
10
+ Author-email: Jan Range <jan.range@simtech.uni-stuttgart.de>
11
+ License: MIT
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
14
+ Project-URL: Source Code, https://github.com/FAIRChemistry/md-models
15
+
16
+
17
+ # MD-Models
18
+
19
+ ![Build Status](https://github.com/JR-1991/sdrdm.rs/actions/workflows/test.yml/badge.svg)
20
+
21
+ Welcome to Markdown Models (MD-Models), a powerful framework for research data management that prioritizes flexibility and efficiency.
22
+
23
+ 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.
24
+
25
+ Check out the [documentation](https://fairchemistry.github.io/md-models/) for more information.
26
+
27
+ ### Example
28
+
29
+ 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.
30
+
31
+ ```markdown
32
+ ---
33
+ prefixes:
34
+ schema: http://schema.org/
35
+ ---
36
+
37
+ ### Person
38
+
39
+ - **name**
40
+ - Type: string
41
+ - Description: The name of the person
42
+ - Term: schema:name
43
+ - age
44
+ - Type: integer
45
+ - Description: The age of the person
46
+ - Term: schema:age
47
+ - addresses
48
+ - Type: Address[]
49
+ - Description: The address of the person
50
+
51
+ ### Address
52
+
53
+ - street
54
+ - Type: string
55
+ - Description: The street of the address
56
+ ```
57
+
58
+ ## Installation
59
+
60
+ In order to install the command line tool, you can use the following command:
61
+
62
+ ```bash
63
+ git clone https://github.com/JR-1991/md-models
64
+ cd md-models
65
+ cargo install --path .
66
+ ```
67
+
68
+ ## Command line usage
69
+
70
+ 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:
71
+
72
+ ```bash
73
+ md-models convert -i model.md -o lib.py -l python-dataclass
74
+ ```
75
+
76
+ 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:
77
+
78
+ ```bash
79
+ md-models --help
80
+ ```
81
+
82
+ ## Available templates
83
+
84
+ The following templates are available:
85
+
86
+ - `python-dataclass`: Python dataclass implementation with JSON-LD support
87
+ - `python-pydantic`: PyDantic implementation with JSON-LD support
88
+ - `python-pydantic-xml`: PyDantic implementation with XML support
89
+ - `xml-schema`: XML schema definition
90
+ - `json-schema`: JSON schema definition
91
+ - `shacl`: SHACL shapes definition
92
+ - `shex`: ShEx shapes definition
93
+
94
+ ## Development
95
+
96
+ This project uses GitHub Actions for continuous integration. The tests can be run using the following command:
97
+
98
+ ```bash
99
+ cargo test
100
+ cargo clippy
101
+ ```
102
+
@@ -0,0 +1,6 @@
1
+ mdmodels_core-0.1.3.dist-info/METADATA,sha256=rcHYYSJdevSYYpoDg18LimmKTbUdG7bsbJR_UO4cBCc,3434
2
+ mdmodels_core-0.1.3.dist-info/WHEEL,sha256=8oDS9lEgrtw5U4qwq5k5ejtIqRM0xNzMNTKqkiM20hA,90
3
+ mdmodels_core-0.1.3.dist-info/licenses/LICENSE.md,sha256=80Y2A0-Kce8OOuFG6w-ukHELYr84vilPobw9Qy2LZX4,1072
4
+ mdmodels_core/__init__.py,sha256=SIZJJEG9-dTMm-YShgc1JB8iT55fP7o3uuO1Lm1MWkQ,135
5
+ mdmodels_core/mdmodels_core.cp39-win32.pyd,sha256=TDysQhX6BNKJCRc0oPNC1KDT2RHhycnvMYw7hfoTQ_o,3301376
6
+ mdmodels_core-0.1.3.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.7.4)
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-none-win32
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2024 Jan Range
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.