Skip to content

Commit 3de376a

Browse files
committed
feat: Initialization
1 parent 201168a commit 3de376a

36 files changed

+1571
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# LabIMotion Template Schema
2+
3+
The LabIMotion Template Schema provides a contract for the Template used and details the properties, types, and other constraints that the Template should have.
4+
5+
## Official site
6+
7+
Go to the [LabIMotion Schema](https://labimotion.github.io/) website to view the latest version.
8+
9+
The older versions (if any) can be found in the menu on the top-right side of the page.
10+
11+
Find more about LabIMotion at:
12+
13+
:green_book: [LabIMotion Documentation](https://www.chemotion.net/docs/labimotion)
14+
15+
## Feedback
16+
17+
Kindly utilize the :raising_hand: [LabIMotion Discussion](https://github.com/LabIMotion/labimotion) section or :e-mail: [email us](mailto:[email protected]) for any inquiries, concerns, suggestions, or ideas you may wish to share. We will initiate the process of creating an 'issue' with the appropriate label to provide you with a more comprehensive status overview.
18+
19+
[![GitHub](https://github.com/favicon.ico) LabIMotion](https://github.com/LabIMotion/labimotion)

index.html

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="canonical" href="https://labimotion.github.io/">
8+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
9+
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
10+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
11+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
12+
<style>
13+
.b-example-divider {
14+
width: 100%;
15+
height: 3rem;
16+
background-color: rgba(0, 0, 0, .1);
17+
border: solid rgba(0, 0, 0, .15);
18+
border-width: 1px 0;
19+
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
20+
}
21+
22+
.b-example-vr {
23+
flex-shrink: 0;
24+
width: 1.5rem;
25+
height: 100vh;
26+
}
27+
28+
.bi {
29+
vertical-align: -.125em;
30+
fill: currentColor;
31+
}
32+
33+
.nav-scroller {
34+
position: relative;
35+
z-index: 2;
36+
height: 2.75rem;
37+
overflow-y: hidden;
38+
}
39+
40+
.nav-scroller .nav {
41+
display: flex;
42+
flex-wrap: nowrap;
43+
padding-bottom: 1rem;
44+
margin-top: -1px;
45+
overflow-x: auto;
46+
text-align: center;
47+
white-space: nowrap;
48+
-webkit-overflow-scrolling: touch;
49+
}
50+
51+
.btn-bd-primary {
52+
--bd-violet-bg: #712cf9;
53+
--bd-violet-rgb: 112.520718, 44.062154, 249.437846;
54+
55+
--bs-btn-font-weight: 600;
56+
--bs-btn-color: var(--bs-white);
57+
--bs-btn-bg: var(--bd-violet-bg);
58+
--bs-btn-border-color: var(--bd-violet-bg);
59+
--bs-btn-hover-color: var(--bs-white);
60+
--bs-btn-hover-bg: #6528e0;
61+
--bs-btn-hover-border-color: #6528e0;
62+
--bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
63+
--bs-btn-active-color: var(--bs-btn-hover-color);
64+
--bs-btn-active-bg: #5a23c8;
65+
--bs-btn-active-border-color: #5a23c8;
66+
}
67+
68+
.bd-mode-toggle {
69+
z-index: 1500;
70+
}
71+
72+
.bd-mode-toggle .dropdown-menu .active .bi {
73+
display: block !important;
74+
}
75+
</style>
76+
</head>
77+
78+
<body>
79+
<div class="container sticky-top">
80+
<header class="d-flex flex-wrap justify-content-center py-3 mb-4 border-bottom bg-light">
81+
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-body-emphasis text-decoration-none">
82+
<svg class="bi me-2" width="40" height="32">
83+
<use xlink:href="#bootstrap" />
84+
</svg>
85+
<span class="fs-4">LabIMotion Schema</span>
86+
</a>
87+
88+
<ul class="nav nav-pills">
89+
<li class="nav-item"><a href="./index.html" class="nav-link active" aria-current="page">Home</a></li>
90+
<li class="nav-item"><a href="https://www.chemotion-repository.net/home/genericHub" class="nav-link" target="_blank">Template Hub</a></li>
91+
<li class="nav-item"><a href="https://www.chemotion.net/docs/labimotion" class="nav-link" target="_blank">LabIMotion Docs</a></li>
92+
</ul>
93+
</header>
94+
</div>
95+
96+
<div class="container my-5">
97+
<div class="p-5 text-center">
98+
<h1 class="text-body-emphasis">LabIMotion Template Schema</h1>
99+
<p class="col-lg-8 mx-auto lead">The LabIMotion Template Schema provide a contract for the JSON data used and
100+
detail what properties the JSON data should have, their types, and additional constraints.</p>
101+
</div>
102+
</div>
103+
104+
<div class="container my-5">
105+
<div class="p-5 text-center bg-body-tertiary">
106+
<h2 class="text-body-emphasis">Schema 1.0</h2>
107+
<h4 class="text-center text-muted">A a standardized set of metadata properties used to describe the Element, Segment, and Dataset.</h4>
108+
<p class="col-lg-8 mx-auto lead">Released 31 January 2024. This version include:</p>
109+
<h3 class="mt-4">Element Schema</h3>
110+
<a href="/schema/latest/sch-element.json" target="_blank">
111+
<button class="btn btn-outline-primary rounded-pill mt-4">View JSON Schema</button>
112+
</a>
113+
<h3 class="text-center mt-4">Segment Schema</h3>
114+
<a href="/schema/latest/sch-segment.json" target="_blank">
115+
<button class="btn btn-outline-primary rounded-pill mt-4">View JSON Schema</button>
116+
</a>
117+
<h3 class="text-center mt-4">Dataset Schema</h3>
118+
<a href="/schema/latest/sch-dataset.json" target="_blank">
119+
<button class="btn btn-outline-primary rounded-pill mt-4">View JSON Schema</button>
120+
</a>
121+
</div>
122+
</div>
123+
124+
<div class="container my-5">
125+
<div class="p-5 text-center">
126+
<h3 class="text-body-emphasis">Feedback</h3>
127+
<p class="col-lg-8 mx-auto lead">We appreciate your feedback regarding any challenges you may be facing with the
128+
current schema or any ideas you have for improvements.</p>
129+
<p class="col-lg-8 mx-auto lead">Please feel free to reach out through the </p>
130+
<a href="mailto:[email protected]" style="margin-right: 10px;" class="btn btn-secondary btn-sm">
131+
<i class="bi bi-envelope-at" style="font-size: 2rem;"></i>
132+
</a>
133+
<a href="https://github.com/LabIMotion/labimotion" target="_blank" style="margin-left: 10px;" class="btn btn-secondary btn-sm">
134+
<i class="bi bi-github" style="font-size: 2rem;"></i>
135+
</a>
136+
</div>
137+
</div>
138+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
139+
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
140+
crossorigin="anonymous"></script>
141+
</body>
142+
143+
</html>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://labimotion.github.io/schema/v1.0/sch-common-properties.json",
4+
"title": "Labimotion Common Properties",
5+
"description": "Common properties for Labimotion",
6+
"type": "object",
7+
"properties": {
8+
"pkg": {
9+
"eln": {
10+
"$ref": "sch-common.json#/definitions/eln"
11+
},
12+
"labimotion": {
13+
"type": "string",
14+
"description": "LabIMotion version."
15+
}
16+
},
17+
"uuid": {
18+
"$ref": "sch-common.json#/definitions/uuid"
19+
},
20+
"klass": {
21+
"type": "string",
22+
"enum": [
23+
"ElementKlass",
24+
"SegmentKlass",
25+
"DatasetKlass"
26+
],
27+
"description": "LabIMotion class."
28+
},
29+
"released_at": {
30+
"$ref": "sch-common.json#/definitions/dateTime",
31+
"description": "Date and time of the release."
32+
},
33+
"identifier": {
34+
"$ref": "sch-common.json#/definitions/uuid",
35+
"description": "The identifier."
36+
}
37+
},
38+
"required": [
39+
"pkg",
40+
"uuid",
41+
"klass"
42+
]
43+
}

schema/latest/include/sch-common.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://labimotion.github.io/schema/v1.0/sch-common.json",
4+
"title": "Common Schema for Chemotion LabIMotion",
5+
"description": "Common Schema for Chemotion LabIMotion.",
6+
"definitions": {
7+
"eln": {
8+
"type": "object",
9+
"description": "The ELN information.",
10+
"properties": {
11+
"version": {
12+
"type": "string",
13+
"description": "Version of the ELN."
14+
},
15+
"base_revision": {
16+
"type": "string",
17+
"description": "Base revision of the ELN."
18+
},
19+
"current_revision": {
20+
"type": "string",
21+
"description": "Current revision of the ELN."
22+
}
23+
},
24+
"required": [
25+
"version",
26+
"base_revision",
27+
"current_revision"
28+
]
29+
},
30+
"dateTime": {
31+
"type": "string",
32+
"format": "date-time",
33+
"description": "Date and time in ISO 8601 format."
34+
},
35+
"uuid": {
36+
"type": "string",
37+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
38+
"description": "UUID in the format of 8-4-4-4-12 hexadecimal digits."
39+
}
40+
}
41+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://labimotion.github.io/schema/v1.0/sch-conditional-field.json",
4+
"type": "object",
5+
"properties": {
6+
"id": {
7+
"$ref": "sch-common.json#/definitions/uuid",
8+
"description": "The unique identifier of the conditional field."
9+
},
10+
"layer": {
11+
"type": "string",
12+
"description": "The layer to be checked."
13+
},
14+
"field": {
15+
"type": "string",
16+
"description": "The field to be checked."
17+
},
18+
"value": {
19+
"type": "string",
20+
"description": "The value to be checked."
21+
}
22+
},
23+
"required": [
24+
"id",
25+
"layer",
26+
"field",
27+
"value"
28+
]
29+
}

schema/latest/include/sch-field.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://labimotion.github.io/schema/v1.0/sch-field.json",
4+
"title": "Field",
5+
"description": "A field from a template",
6+
"type": "object",
7+
"properties": {
8+
"type": {
9+
"type": "string",
10+
"description": "The type of field."
11+
},
12+
"field": {
13+
"type": "string",
14+
"description": "The unique identifier for the field."
15+
},
16+
"label": {
17+
"type": "string",
18+
"description": "Display text for the field."
19+
},
20+
"default": {
21+
"type": "string",
22+
"description": "Default value for the field."
23+
},
24+
"position": {
25+
"type": "integer",
26+
"description": "The position of the field in the template."
27+
},
28+
"required": {
29+
"type": "boolean",
30+
"description": "Whether the field is required to be filled in."
31+
},
32+
"description": {
33+
"type": "string",
34+
"description": "Hover text for the field."
35+
},
36+
"sub_fields": {
37+
"type": "array",
38+
"description": "The sub fields for the field.",
39+
"items": {
40+
"$ref": "sch-sub-field.json"
41+
}
42+
},
43+
"text_sub_fields": {
44+
"type": "array",
45+
"description": "The text sub fields for the field.",
46+
"items": {
47+
"$ref": "sch-text-sub-field.json"
48+
}
49+
},
50+
"option_layers": {
51+
"type": "string",
52+
"description": "The option layers for the field."
53+
},
54+
"hasOwnRow": {
55+
"type": "boolean",
56+
"description": "Whether the field should have its own row."
57+
},
58+
"cols": {
59+
"type": "integer",
60+
"description": "The number of columns the field should span."
61+
}
62+
},
63+
"required": [
64+
"type",
65+
"field",
66+
"label",
67+
"default",
68+
"position",
69+
"required",
70+
"sub_fields",
71+
"text_sub_fields"
72+
]
73+
}

0 commit comments

Comments
 (0)