Skip to content

Commit

Permalink
feat: Initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
cllde8 committed Jan 17, 2024
1 parent 201168a commit 3de376a
Show file tree
Hide file tree
Showing 36 changed files with 1,571 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# LabIMotion Template Schema

The LabIMotion Template Schema provides a contract for the Template used and details the properties, types, and other constraints that the Template should have.

## Official site

Go to the [LabIMotion Schema](https://labimotion.github.io/) website to view the latest version.

The older versions (if any) can be found in the menu on the top-right side of the page.

Find more about LabIMotion at:

:green_book: [LabIMotion Documentation](https://www.chemotion.net/docs/labimotion)

## Feedback

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.

[![GitHub](https://github.com/favicon.ico) LabIMotion](https://github.com/LabIMotion/labimotion)
143 changes: 143 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="https://labimotion.github.io/">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
<style>
.b-example-divider {
width: 100%;
height: 3rem;
background-color: rgba(0, 0, 0, .1);
border: solid rgba(0, 0, 0, .15);
border-width: 1px 0;
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}

.b-example-vr {
flex-shrink: 0;
width: 1.5rem;
height: 100vh;
}

.bi {
vertical-align: -.125em;
fill: currentColor;
}

.nav-scroller {
position: relative;
z-index: 2;
height: 2.75rem;
overflow-y: hidden;
}

.nav-scroller .nav {
display: flex;
flex-wrap: nowrap;
padding-bottom: 1rem;
margin-top: -1px;
overflow-x: auto;
text-align: center;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}

.btn-bd-primary {
--bd-violet-bg: #712cf9;
--bd-violet-rgb: 112.520718, 44.062154, 249.437846;

--bs-btn-font-weight: 600;
--bs-btn-color: var(--bs-white);
--bs-btn-bg: var(--bd-violet-bg);
--bs-btn-border-color: var(--bd-violet-bg);
--bs-btn-hover-color: var(--bs-white);
--bs-btn-hover-bg: #6528e0;
--bs-btn-hover-border-color: #6528e0;
--bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
--bs-btn-active-color: var(--bs-btn-hover-color);
--bs-btn-active-bg: #5a23c8;
--bs-btn-active-border-color: #5a23c8;
}

.bd-mode-toggle {
z-index: 1500;
}

.bd-mode-toggle .dropdown-menu .active .bi {
display: block !important;
}
</style>
</head>

<body>
<div class="container sticky-top">
<header class="d-flex flex-wrap justify-content-center py-3 mb-4 border-bottom bg-light">
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-body-emphasis text-decoration-none">
<svg class="bi me-2" width="40" height="32">
<use xlink:href="#bootstrap" />
</svg>
<span class="fs-4">LabIMotion Schema</span>
</a>

<ul class="nav nav-pills">
<li class="nav-item"><a href="./index.html" class="nav-link active" aria-current="page">Home</a></li>
<li class="nav-item"><a href="https://www.chemotion-repository.net/home/genericHub" class="nav-link" target="_blank">Template Hub</a></li>
<li class="nav-item"><a href="https://www.chemotion.net/docs/labimotion" class="nav-link" target="_blank">LabIMotion Docs</a></li>
</ul>
</header>
</div>

<div class="container my-5">
<div class="p-5 text-center">
<h1 class="text-body-emphasis">LabIMotion Template Schema</h1>
<p class="col-lg-8 mx-auto lead">The LabIMotion Template Schema provide a contract for the JSON data used and
detail what properties the JSON data should have, their types, and additional constraints.</p>
</div>
</div>

<div class="container my-5">
<div class="p-5 text-center bg-body-tertiary">
<h2 class="text-body-emphasis">Schema 1.0</h2>
<h4 class="text-center text-muted">A a standardized set of metadata properties used to describe the Element, Segment, and Dataset.</h4>
<p class="col-lg-8 mx-auto lead">Released 31 January 2024. This version include:</p>
<h3 class="mt-4">Element Schema</h3>
<a href="/schema/latest/sch-element.json" target="_blank">
<button class="btn btn-outline-primary rounded-pill mt-4">View JSON Schema</button>
</a>
<h3 class="text-center mt-4">Segment Schema</h3>
<a href="/schema/latest/sch-segment.json" target="_blank">
<button class="btn btn-outline-primary rounded-pill mt-4">View JSON Schema</button>
</a>
<h3 class="text-center mt-4">Dataset Schema</h3>
<a href="/schema/latest/sch-dataset.json" target="_blank">
<button class="btn btn-outline-primary rounded-pill mt-4">View JSON Schema</button>
</a>
</div>
</div>

<div class="container my-5">
<div class="p-5 text-center">
<h3 class="text-body-emphasis">Feedback</h3>
<p class="col-lg-8 mx-auto lead">We appreciate your feedback regarding any challenges you may be facing with the
current schema or any ideas you have for improvements.</p>
<p class="col-lg-8 mx-auto lead">Please feel free to reach out through the </p>
<a href="mailto:[email protected]" style="margin-right: 10px;" class="btn btn-secondary btn-sm">
<i class="bi bi-envelope-at" style="font-size: 2rem;"></i>
</a>
<a href="https://github.com/LabIMotion/labimotion" target="_blank" style="margin-left: 10px;" class="btn btn-secondary btn-sm">
<i class="bi bi-github" style="font-size: 2rem;"></i>
</a>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
</body>

</html>
43 changes: 43 additions & 0 deletions schema/latest/include/sch-common-properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://labimotion.github.io/schema/v1.0/sch-common-properties.json",
"title": "Labimotion Common Properties",
"description": "Common properties for Labimotion",
"type": "object",
"properties": {
"pkg": {
"eln": {
"$ref": "sch-common.json#/definitions/eln"
},
"labimotion": {
"type": "string",
"description": "LabIMotion version."
}
},
"uuid": {
"$ref": "sch-common.json#/definitions/uuid"
},
"klass": {
"type": "string",
"enum": [
"ElementKlass",
"SegmentKlass",
"DatasetKlass"
],
"description": "LabIMotion class."
},
"released_at": {
"$ref": "sch-common.json#/definitions/dateTime",
"description": "Date and time of the release."
},
"identifier": {
"$ref": "sch-common.json#/definitions/uuid",
"description": "The identifier."
}
},
"required": [
"pkg",
"uuid",
"klass"
]
}
41 changes: 41 additions & 0 deletions schema/latest/include/sch-common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://labimotion.github.io/schema/v1.0/sch-common.json",
"title": "Common Schema for Chemotion LabIMotion",
"description": "Common Schema for Chemotion LabIMotion.",
"definitions": {
"eln": {
"type": "object",
"description": "The ELN information.",
"properties": {
"version": {
"type": "string",
"description": "Version of the ELN."
},
"base_revision": {
"type": "string",
"description": "Base revision of the ELN."
},
"current_revision": {
"type": "string",
"description": "Current revision of the ELN."
}
},
"required": [
"version",
"base_revision",
"current_revision"
]
},
"dateTime": {
"type": "string",
"format": "date-time",
"description": "Date and time in ISO 8601 format."
},
"uuid": {
"type": "string",
"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}$",
"description": "UUID in the format of 8-4-4-4-12 hexadecimal digits."
}
}
}
29 changes: 29 additions & 0 deletions schema/latest/include/sch-conditional-field.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://labimotion.github.io/schema/v1.0/sch-conditional-field.json",
"type": "object",
"properties": {
"id": {
"$ref": "sch-common.json#/definitions/uuid",
"description": "The unique identifier of the conditional field."
},
"layer": {
"type": "string",
"description": "The layer to be checked."
},
"field": {
"type": "string",
"description": "The field to be checked."
},
"value": {
"type": "string",
"description": "The value to be checked."
}
},
"required": [
"id",
"layer",
"field",
"value"
]
}
73 changes: 73 additions & 0 deletions schema/latest/include/sch-field.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://labimotion.github.io/schema/v1.0/sch-field.json",
"title": "Field",
"description": "A field from a template",
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The type of field."
},
"field": {
"type": "string",
"description": "The unique identifier for the field."
},
"label": {
"type": "string",
"description": "Display text for the field."
},
"default": {
"type": "string",
"description": "Default value for the field."
},
"position": {
"type": "integer",
"description": "The position of the field in the template."
},
"required": {
"type": "boolean",
"description": "Whether the field is required to be filled in."
},
"description": {
"type": "string",
"description": "Hover text for the field."
},
"sub_fields": {
"type": "array",
"description": "The sub fields for the field.",
"items": {
"$ref": "sch-sub-field.json"
}
},
"text_sub_fields": {
"type": "array",
"description": "The text sub fields for the field.",
"items": {
"$ref": "sch-text-sub-field.json"
}
},
"option_layers": {
"type": "string",
"description": "The option layers for the field."
},
"hasOwnRow": {
"type": "boolean",
"description": "Whether the field should have its own row."
},
"cols": {
"type": "integer",
"description": "The number of columns the field should span."
}
},
"required": [
"type",
"field",
"label",
"default",
"position",
"required",
"sub_fields",
"text_sub_fields"
]
}
Loading

0 comments on commit 3de376a

Please sign in to comment.