Changes for page Technical details
Last modified by lzehl on 2021/07/05 18:57
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -13,44 +13,47 @@ 13 13 === The openMINDS umbrella === 14 14 15 15 (% style="text-align: justify;" %) 16 -openMINDS is the overall umbrella for a set of integratedmetadata models for describing neuroscience research products in graph databases. The correctintegration of these metadata models as well as the provision of a central access point is handledby an integration pipeline. All metadatamodels are developed on separateGitHub repositories,in order to facilitateextensions andmaintenance ofexisting, as well as development andintegrationof new openMINDS metadatamodels and schemas. The integrationpipeline ensures that the central openMINDS GitHub repository ingests all these GitHub repositories as [[git-submodules>>https://git-scm.com/docs/git-submodule||rel="noopener noreferrer" target="_blank"]],integrates the respectivemetadata modelsand builds the openMINDS GitHub pages, as well as ZIPfiles containing therespectiveopenMINDS schemas in the supported formats, such as theopenMINDS syntax (cf. below),JSON-Schema, orHTML. In thefollowing we willsummarizethe contentsandrequirements for thecentral openMINDS GitHub repository as well as all metadata model git-submodules. TheopenMINDS integration pipeline will be handled in a separatechapter (cf.below).16 +In summary, openMINDS is the overall umbrella for a set of distributed GitHub repositories, each defining a particular metadata model for neuroscience research products. 17 17 18 18 (% style="text-align: justify;" %) 19 - Letus start withthe[[central openMINDS GitHub repository>>https://github.com/HumanBrainProject/openMINDS||rel="noopener noreferrer" target="_blank"]]which has a**mainbranch**,a**documentation branch**,and**versionbranches**(namingconvention:vX;e.g.,v1). Officialreleases(namingconvention:vX.Y;e.g.,v1.0)aretagged andprovided as release packages.19 +The main (or central) [[openMINDS GitHub repository>>https://github.com/HumanBrainProject/openMINDS||rel="noopener noreferrer" target="_blank"]] ingests all these GitHub repositories as [[git-submodules>>https://git-scm.com/docs/git-submodule||rel="noopener noreferrer" target="_blank"]]. Furthermore it stores the openMINDS vocabulary (**##vocab##**), providing general definitions and references for **types** and **properties** used in schemas across all openMINDS repositories (cf. below). And last but not least, it holds the schema representations for all supported metadata formats created by the openMINDS integration pipeline (cf. below). 20 20 21 21 (% style="text-align: justify;" %) 22 - The **main branch**hoststhegeneralREADME,theLICENSE document,theCONTRIBUTING document,andthegeneralpenMINDSlogo.Inaddition,it maintains the openMINDSvocabulary (vocab;cf. below) which providesgeneraldefinitions andreferencesfor schema types andpropertiesused across all openMINDS metadata modelsand theirversions, as well asthebash scriptthat builds thecontentofthedocumentationand version branches.22 +For this to work smoothly for the existing, but also for all new openMINDS metadata models, the corresponding openMINDS submodules (GitHub repositories) have to meet the following requirements: 23 23 24 24 (% style="text-align: justify;" %) 25 - The**documentation**branch hosts the HTML files that build the[[openMINDSGitHub pages>>https://humanbrainproject.github.io/openMINDS/||rel="noopenernoreferrer" target="_blank"]],aswell as a ZIP file foreachversion branchand officialreleasecontainingtherespectiveopenMINDSschemasinthe currentlysupportedformats, such astheopenMINDSsyntax (`.schema.tpl.json`;cf.below), JSON-Schema (`.schema.json`), or HTML (`.html`).25 +**(1)** The openMINDS metadata model has to be located on a **public GitHub repository** and published under an **MIT license**. 26 26 27 27 (% style="text-align: justify;" %) 28 - The**version**brancheshost the respective openMINDS schemas of a major version by ingesting the corresponding metadata models as git-submodules.Note that these version branches can have official release tags. If a version branch has an official release tag, only backwards compatible changes can be mergedon thisbranch. This can include corrections of typos in instructions, introduction of additional properties to schemas, loosening constraints on expected value numbers or formats, granting additional relations between schemas, and adding new schemas (if theydo not require relational changesin existing schemas). Except for typo corrections, these changes are typically tagged as sub-releases for the respective major version (e.g., v1.1). If a version branchdoesnothave an official releasetag,yet, also non-backwards compatiblechangescan be merged onthisbranch. This can include renamingof existing properties,increasing constraints on expectedvaluenumbersor formats, removing relationsbetween schemas and adding new schemas, if they causerelationalchangesinexisting schemas.In case all version branches have official release tags,a new non-backwards compatible change would lead to the creation of a newversion branch (with a respectively increased major version number).28 +**(2)** The GitHub repository should have at least one **version branch** (e.g., "v1"). 29 29 30 30 (% style="text-align: justify;" %) 31 - Asmentionedalready above, thesetup of the centralopenMINDS GitHubrepository is maintainedbythe openMINDSintegrationpipeline (cf. below).Notethat thepipeline isconfiguredin such a way, that each commit ononeof theopenMINDS submoduleswill trigger anew buildof the central openMINDSrepository ensuring thatits content isalways up-to-date.31 +**(3)** The version branch should have the following **main directory folders**: **##schemas##** (required), **##tests##** (recommended), **##examples##** (recommended), and **##img##** (optional). 32 32 33 33 (% style="text-align: justify;" %) 34 - Forthistoworksmoothlyforthe existing,but alsoforallnew openMINDSmetadata models,thecorrespondingopenMINDS submodules (GitHubrepositories) have tomeetthefollowingrequirements:34 +**(4)** The **##schemas##** folder should contain the schemas of that metadata model implemented in the **openMINDS schema template syntax** (cf. below). The directory of the schemas can be further structured or flat. 35 35 36 36 (% style="text-align: justify;" %) 37 -**( 1)** The openMINDSmetadatamodelhastobelocatedon a**public GitHubrepository**andpublishedunder an**MITlicense**.37 +**(5)** The **##tests##** folder should contain test-instances (JSON-LDs) for the schemas in a flat directory. The file names for these test-instances should follow the convention of 38 38 39 +(% style="text-align: center;" %) 40 +**##<<XXX>>-<<YYY>>.jsonld##** 41 + 39 39 (% style="text-align: justify;" %) 40 - **(2)** The GitHub repositoryofucha metadatamodelshouldhave at least one **versionbranch**(naming convention: vX,where X isamajor versionnumber).43 +for files that should pass the tests, and 41 41 45 +(% style="text-align: center;" %) 46 +**##<<XXX>>-<<YYY>>-nok.jsonld##** 47 + 42 42 (% style="text-align: justify;" %) 43 - **(3)**Theversion branch shouldhave thefollowing**folders**&**files**:49 +for files that should fail the test. In both cases, **##<<XXX>>##** should be replaced with the label of the schema that is tested, and **##<<YYY>>##** with a user defined label for what aspect is tested (e.g., **##person-withoutCI.jsonld##**). 44 44 45 -* **##schemas/##** (required) - contains the schemas of the respective metadata model implemented in the reduced openMINDS syntax (cf. below). The sub-directory of the "schemas" folder can be further structured or flat. 46 -* **##tests/##** (recommended) - contains test-instances (JSON-LDs) for checking the constraints defined in the schemas of the respective metadata model. The sub-directory of the "tests" folder should follow the same structure as the "schemas" folder with an additional sub-directory for each schema. The file names of the test-instances should be written in lowerCamelCase and state first the name of the respectively tested schema and second, separated with an underscore, what schema constrain is tested (e.g., **##contactInformation_validEmail.jsonld##**). If a test-instance is expected to fail the schema validation the file name should receive the postfix **##"_nok"##** (e.g., **##contactInformation_invalidEmail_nok.jsonld##**). 47 -* **##examples/##** (recommended) - contains examples for valid instance collections for the respective metadata model. Each example should receive its own directory (folder) with a **##README.md##** describing the example, and an **##metadataCollection##** subfolder containing the openMINDS instances (JSON-LDs). This subfolder can be further structured or flat. 48 -* **##img/##** (optional) - contains typically the logo of the openMINDS submodule. 49 -* **##instances/##** (optional) - contains the controlled metadata instances (JSON-LDs) for selected schemas of the respective metadata model. The sub-directory of the "instances" folder should follow the same structure as the "schemas" folder with an additional sub-directory for each schema. The file names of the controlled instances should be written in lowerCamelCase and state the simple, human-readable identifier of the instance (e.g., **##homoSapiens.jsonld##** for the controlledTerms schema **##Species##**). 50 -* **##version.txt##** (required) - states the identifier of the version branch (e.g., **##v1##**) of the respective metadata model. 51 -* **##README.md##** (required) - contains a short content description of the respective metadata model. 52 -* **##LICENSE.txt##** (required) - states the license for the respective metadata model (has to be MIT). 51 +(% style="text-align: justify;" %) 52 +**(6)** The **##examples##** folder should contain examples for valid instance collections for that metadata model. Each example should receive its own directory (folder) with a **##README.md##** describing the example, and an **##metadataCollection##** subfolder containing the openMINDS instances (JSON-LDs). This subfolder can be further structured or flat. 53 53 54 +(% style="text-align: justify;" %) 55 +**(7)** The **##img##** folder should contain image files used on that GitHub repository (e.g., the logo of the new openMINDS metadata model). The directory of the images can be further structured or flat. 56 + 54 54 === The openMINDS vocabulary === 55 55 56 56 (% style="text-align: justify;" %) ... ... @@ -89,7 +89,7 @@ 89 89 "schemas": [ 90 90 "RELATIVE_PATH_TO_OPENMINDS-SCHEMA_USING_THIS_PROPERTY" 91 91 ] 92 - } 95 + } 93 93 } 94 94 {{/code}} 95 95 ... ... @@ -96,18 +96,15 @@ 96 96 (% style="text-align: justify;" %) 97 97 With each new property committed to a schema of one of the openMINDS metadata models, a new entry is appended to the **##properties.json##** file, with the display label and list of schemas in which this property occurs automatically derived. The remaining attributes are initially provided with a null value. Once an entry for a property is made in the **##properties.json##** file, the values of all attributes (**##"name"##**, **##"description"##**, **##"nameForReversedLink"##**, and **##"sameAs"##**) can be manually edited, except for **##"schemas"##** which will be always automatically updated. All those manual editions will be preserved and not overwritten when the file is updated again with a new commit. In case a property is not used anymore in any of the schemas from the openMINDS metadata models, the corresponding entry in the **##properties.json##** file is marked as being deprecated (additional attribute-value pair; **##"deprecated": true##**). It only can be permanently removed from the **##properties.json##** file, if the entry is manually deleted. 98 98 99 -=== The openMINDS syntax === 102 +=== The openMINDS schema template syntax === 100 100 101 101 (% style="text-align: justify;" %) 102 -All openMINDS metadata models are defined using a light-weighted schema syntax. Although this schema syntax is inspired by JSON-Schema, it outsources most schema technicalities to be handled by the openMINDS integration pipeline, making the openMINDS schemas more human-readable, especially for untrained eyes. 105 +All openMINDS metadata models are defined using a light-weighted schema template syntax. Although this schema template syntax is inspired by JSON-Schema, it outsources most schema technicalities to be handled by the openMINDS integration pipeline, making the openMINDS schemas more human-readable, especially for untrained eyes. 103 103 104 104 (% style="text-align: justify;" %) 105 105 The few remaining customized technical properties which need additional interpretation or translation to a formal schema languages (e.g. JSON-Schema) have an underscore as prefix (e.g., **##"_type"##**). Within the openMINDS integration pipeline (cf. below), the schema template syntax is interpreted, extended and flexibly translated to various formal schema languages. All further specifications of the openMINDS schema template syntax are described below. 106 106 107 107 (% style="text-align: justify;" %) 108 -==== Basic openMINDS schema structure ==== 109 - 110 -(% style="text-align: justify;" %) 111 111 All openMINDS schemas need to have the extension **##.schema.tpl.json##** and each schema is defined as a nested associative array (dictionary) with the following conceptual structure: 112 112 113 113 {{code language="json"}} ... ... @@ -134,29 +134,14 @@ 134 134 Under **##"required"##** a list of property names can be provided that are obligatory to be present in a correctly instantiated metadata instance of the respective schema. If none of the properties are required, this key-value pair does not have to be specified. 135 135 136 136 (% style="text-align: justify;" %) 137 - ====Schemas extending a context-schema====137 +In the case that several schemas are highly related and contain a common set of properties, it is possible to define a non-type context-schema with these common properties that can be extended and modified by the group of related schemas. All properties and constraints (e.g. required properties, expected data types) defined in the context-schema are passed on to the schemas extending this context-schema. Each of these schemas can define additional properties, or (if necessary) can overwrite the constraints of the context-schema. In order to state that a schema is extending a context-schema, the following additional key-value pair has to be added to the schema template above: 138 138 139 -(% style="text-align: justify;" %) 140 -In the case that several schemas are highly related and contain a common set of properties, it is possible to define a non-type context-schema with these common properties that can be extended and modified by the group of related schemas. 141 - 142 -(% style="text-align: justify;" %) 143 -All properties and constraints (e.g. required properties, expected data types) defined in the context-schema are passed on to the schemas extending this context-schema. Each of these schemas can define additional properties, or (if necessary) can overwrite the constraints of the context-schema (incl. **##"_instructions"##**). In order to state that a schema is extending a context-schema, the following additional key-value pair has to be added to the schema template above: 144 - 145 145 (% style="text-align: center;" %) 146 146 **##"_extends": "RELATIVE_PATH_TO_OPENMINDS-CONTEXT-SCHEMA"##** 147 147 148 148 (% style="text-align: justify;" %) 149 -This design not only makes it easier to identify highly related schemas, but also facilitates the maintenance of the commonly used properties. A good hands-on example, is the context-schema [[ResearchProduct>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/researchProduct.schema.tpl.json||rel="noopener noreferrer" target="_blank"]] which is extended by the following schema set: [[Dataset>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/dataset.schema.tpl.json||rel="noopener noreferrer" target="_blank"]], [[MetaDataModel>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/metaDataModel.schema.tpl.json]], [[Model>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/model.schema.tpl.json||rel="noopener noreferrer" target="_blank"]], and [[Software>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/software.schema.tpl.json||rel="noopener noreferrer" target="_blank"]]. 150 - 151 -(% style="text-align: justify;" %) 152 -==== Data type depending constraints ==== 153 - 154 -(% style="text-align: justify;" %) 155 155 Depending on the expected data **##"type"##** additional constraints can be made for the metadata entry of a respective property. Currently, the openMINDS schema template syntax supports the following data types: **##"string"##**, ##**"integer"**##, **##"float"##**, **##"boolean"##**, **##"array"##** and **##"object"##**. 156 156 157 -(% style="text-align: justify;" %) 158 -If the expected data **##"type"##** is a **##"string"##** the expected number of characters, the format or a regular expression pattern of the string can be further defined. 159 - 160 160 === The openMINDS integration pipeline === 161 161 162 162 (//**coming soon**//) If you'd like to learn more about the openMINDS integration pipeline, especially if you'd like to contribute to it, please get in touch with us (the openMINDS development team) via the issues on the openMINDS or openMINDS_generator GitHub or the support email: openminds@ebrains.eu