Changes for page Technical details
Last modified by lzehl on 2021/07/05 18:57
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,1 @@ 1 -Collabs.openminds. Documentation.WebHome1 +Collabs.openminds.openMINDS core.WebHome - Content
-
... ... @@ -13,174 +13,108 @@ 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**(naming convention:vX;e.g.,v1). Official releases(namingconvention:vX.Y;e.g.,v1.0)areggedandprovided 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 submodules. Furthermore it defines the openMINDS vocabulary (**##vocab##**) used for **##types##** and **##properties##** across all schemas independent of their original repository. And last but not least, it holds the schema representations for all supported metadata formats created by the openMINDS generator pipeline. 20 20 21 21 (% style="text-align: justify;" %) 22 -The **main branch** hosts the general README, the LICENSE document, the CONTRIBUTING document, and the general openMINDS logo. In addition, it maintains the openMINDS vocabulary (vocab; cf. below) which provides general definitions and references for schema types and properties used across all openMINDS metadata models and their versions, as well as the bash script that builds the content of the documentation and version branches. 23 - 24 -(% style="text-align: justify;" %) 25 -The **documentation** branch hosts the HTML files that build the [[openMINDS GitHub pages>>https://humanbrainproject.github.io/openMINDS/||rel="noopener noreferrer" target="_blank"]], as well as a ZIP file for each version branch and official release containing the respective openMINDS schemas in the currently supported formats, such as the openMINDS syntax (`.schema.tpl.json`; cf. below), JSON-Schema (`.schema.json`), or HTML (`.html`). 26 - 27 -(% style="text-align: justify;" %) 28 -The **version** branches host 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 merged on this branch. 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 they do not require relational changes in 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 branch does not have an official release tag, yet, also non-backwards compatible changes can be merged on this branch. This can include renaming of existing properties, increasing constraints on expected value numbers or formats, removing relations between schemas and adding new schemas, if they cause relational changes in existing schemas. In case all version branches have official release tags, a new non-backwards compatible change would lead to the creation of a new version branch (with a respectively increased major version number). 29 - 30 -(% style="text-align: justify;" %) 31 -As mentioned already above, the setup of the central openMINDS GitHub repository is maintained by the openMINDS integration pipeline (cf. below). Note that the pipeline is configured in such a way, that each commit on one of the openMINDS submodules will trigger a new build of the central openMINDS repository ensuring that its content is always up-to-date. 32 - 33 -(% style="text-align: justify;" %) 34 34 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 +((% style="color:#7f8c8d" %)//**coming soon**//(%%)) 35 35 36 -(% style="text-align: justify;" %) 37 -**(1)** The openMINDS metadata model has to be located on a **public GitHub repository** and published under an **MIT license**. 25 +=== The openMINDS schema template syntax === 38 38 39 39 (% style="text-align: justify;" %) 40 - **(2)**TheGitHub repository of such ametadata modelhould havetleastone**versionbranch**(naming convention:vX,whereXisamajorversionnumber).28 +All openMINDS metadata models use a light-weighted schema template syntax for defining the expected metadata. The correspondingly formatted schema files use the extension: **##.schema.tpl.json##**. 41 41 42 42 (% style="text-align: justify;" %) 43 - **(3)**Theversionbranch should have the following**folders**&**files**:31 +Although, as the file extension suggests, this openMINDS schema template syntax is inspired by JSON-Schema, it facilitates or even excludes technical aspects that are generally expected for the openMINDS schemas making them more human-readable, especially for untrained eyes. Behind the scenes, within the openMINDS integration pipeline (cf. below), this schema template syntax is then interpreted and flexibly translated to various formal metadata formats (e.g., JSON-Schema). 44 44 45 -* **##schemas/##** (required) - contains the schemas of that 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 metadata model. The sub-directory of the "tests" folder should follow the same structure as the "schemas" folder. The file names of the test-instances should state in lowerCamelCase 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) 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 metadata model. The sub-directory of the "instances" folder should follow the same structure as the "schemas" folder. 50 -* **##version.txt##** (required) 51 -* **##README.md##** (required) 52 -* **##LICENSE.txt##** (required) 53 - 54 - 55 55 (% style="text-align: justify;" %) 56 - **(5)** The**##tests##**folderhouldforthe schemasinaflatdirectory.The file namesfor thesetest-instancesshouldfollowtheconvention of34 +Despite the simplification in comparison to JSON-Schema, the openMINDS schema templates are also, at the core, specially formatted JSON files using a particular syntax, meaning special key-value pairs that define the validation rules of a schema. 57 57 58 -(% style="text-align: center;" %) 59 -**##<<XXX>>-<<YYY>>.jsonld##** 60 - 61 61 (% style="text-align: justify;" %) 62 -f orfilesthat shouldpassthe tests,and37 +Please find in the following a full documentation of the openMINDS schema template syntax and how it's key-value pairs need to be defined and interpreted. 63 63 64 -(% style="text-align: center;" %) 65 -**##<<XXX>>-<<YYY>>-nok.jsonld##** 66 - 67 67 (% style="text-align: justify;" %) 68 - forfiles that should fail theest.Inbothcases, **##<<XXX>>##** should be replaced withthelabel of the schema that is tested, and **##<<YYY>>##** with a user definedlabel for whataspect istested (e.g., **##person-withoutCI.jsonld##**).40 +===== Target & concept templates ===== 69 69 70 70 (% style="text-align: justify;" %) 71 - **(6)**The**##examples##**foldershouldcontain examplesfor validinstance collectionsforthatmetadatamodel.Each example should receive itsown directory(folder)witha**##README.md##**describingthe example,andan**##metadataCollection##**subfoldercontainingtheopenMINDSinstances(JSON-LDs). This subfoldercan be furtherstructuredorflat.43 +Same as in JSON-Schema, all openMINDS schema templates define the expected name (written in **##lowerCamelCase##**) and value of the metadata, typically called property, under the key **##properties##** as nested dictionaries. Furthermore, the names of obligatory metadata can be listed under the key **##required##**. Here a generalized example: 72 72 73 -(% style="text-align: justify;" %) 74 -**(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. 75 - 76 -=== The openMINDS vocabulary === 77 - 78 -(% style="text-align: justify;" %) 79 -Located under the folder **##vocab##** in the main openMINDS GitHub directory, the openMINDS vocabulary is semi-automatically gathered and stored in dedicated JSON files ([[**##types.json##**>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS/v2/vocab/types.json||rel="noopener noreferrer" target="_blank"]] and [[**##properties.json##**>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS/v2/vocab/properties.json||rel="noopener noreferrer" target="_blank"]]). The openMINDS integration pipeline makes sure that both files are updated with each commit to any of the GitHub repositories for the openMINDS metadata models. With that, the openMINDS vocab reflects always an up-to-date status of the general attributes of existing **schemas** and **properties** across all openMINDS metadata models, while providing the opportunity to centrally review and maintain their consistency. In addition, this design allows us to centrally define and maintain multiple references to related schemas and matching schema properties of other metadata initiatives. How this works in detail is explained in the following. 80 - 81 -(% style="text-align: justify;" %) 82 -The **##types.json##** file is an associative array listing all existing openMINDS schemas (via their type). For each openMINDS schema, a small list of general attributes are provided in a nested associative array. Currently, the following attributes are captured: 83 - 84 84 {{code language="json"}} 85 85 { 86 - "OPENMINDS_SCHEMA_TYPE": { 87 - "description": "GENERAL_DESCRIPTION", 88 - "name": "DISPLAY_LABEL", 89 - "translatableTo": [ 90 - "REFERENCE_TO_RELATED_SCHEMA_OF_OTHER_INITIATIVE" 91 - ] 92 - } 47 + "properties": { 48 + "propertyNameA": {}, 49 + "propertyNameB": {}, 50 + "propertyNameC": {} 51 + }, 52 + "required": [ 53 + "propertyNameA", 54 + "propertyNameC" 55 + ] 93 93 } 94 94 {{/code}} 95 95 96 96 (% style="text-align: justify;" %) 97 - With eachnewschemacommitted tooneof the openMINDSmetadatamodels,anewentry isappendedto the **##types.json##**file, withthe display labelautomatically derived from the respectiveschema typeand theremainingattributes predefined witha null value. Once an entry for a schemais made inthe##types.json##**file,thevaluesof all attributes(**##"name"##**,**##"description"##**,and**##"translatableTo"##**)can be manually edited.All manual editionswill bepreservedand notverwrittenwhen thefile is updated againwith a newcommit. In case a schemais deleted from the openMINDS metadatamodels,thecorrespondingentry in the**##types.json##** file ismarkedasbeingdeprecated(additional attribute-value pair;**##"deprecated": true##**). It only can be permanentlyremoved fromthe **##types.json##**file,iftheentry is manuallydeleted.60 +In addition, an openMINDS schema //has to have// a key **##"_type"##** to be recognized as **target template**. In other words, the **##"_type"##** is used to define the openMINDS namespace of a corresponding schema using a particular naming convention. Here again a generalized example: 98 98 99 -(% style="text-align: justify;" %) 100 -Similar to the **##types.json##** file, the **##properties.json##** file is an associative array listing all properties across all existing openMINDS schemas (via the property name). For each openMINDS property, a small list of general attributes are provided in a nested associative array. Currently, the following attributes are captured: 101 - 102 102 {{code language="json"}} 103 103 { 104 - "PROPERTY_NAME": { 105 - "description": "GENERAL_DESCRIPTION", 106 - "name": "DISPLAY_LABEL", 107 - "nameForReverseLink": "DISPLAY_LABEL_OF_REVERSED_LINK", 108 - "sameAs": [ 109 - "REFERENCE_TO_MATCHING_SCHEMA-PROPERTY_OF_OTHER_INITIATIVE" 110 - ], 111 - "schemas": [ 112 - "RELATIVE_PATH_TO_OPENMINDS-SCHEMA_USING_THIS_PROPERTY" 113 - ] 114 - } 64 + "_type": "https:~/~/openminds.ebrains.eu/<<schema-model>>/<<schema-name>>", 65 + "properties": {} 115 115 } 116 116 {{/code}} 117 117 118 118 (% style="text-align: justify;" %) 119 - With each new property committedtoa schemaof one of the openMINDSmetadata models,anew entry isappendedtothe**##properties.json##** file,with thedisplay labeland listofschemasin which this propertyoccurs automaticallyderived. The remaining attributesareinitially provided with a nullvalue. Once an entry fora propertyismade inthe**##properties.json##** file,thevaluesof all attributes (**##"name"##**, **##"description"##**,**##"nameForReversedLink"##**, and **##"sameAs"##**)can beuallyedited, except for **##"schemas"##**which will bealwaysautomaticallyupdated. All those manual editions willbepreservedand not overwritten whenthefile is updated again with a newcommit. In caseapropertyisnotused anymorein anyof the schemasfromthe openMINDS metadata models, the correspondingentryinthe**##properties.json##** file is marked asbeing deprecated (additional attribute-value pair; **##"deprecated": true##**).It only can be permanently removed from the **##properties.json##** file, if the entry is manually deleted.70 +Note that **##<<schema-model>>##** has to be replaced with the label of the openMINDS metadata model to which the corresponding schema belongs to, and **##<<schema-name>>##** has to be replaced with the corresponding name of the schema (written in **##CamelCase##**). 120 120 121 -=== The openMINDS syntax === 122 - 123 123 (% style="text-align: justify;" %) 124 - AllopenMINDSmetadatamodelsaredefinedusingalight-weightedschemayntax.Althoughthisschemasyntaxis inspiredbyJSON-Schema,itoutsources mostschemachnicalities to behandledbytheopenMINDSintegrationpipeline, makingthe openMINDS schemas morehuman-readable, especially for untrained eyes.73 +If an openMINDS schema template //does not// define a key **##"_type"##** (as in the first example above), it is interpreted as a **concept template** which //has to be// extended to a target template. 125 125 126 126 (% style="text-align: justify;" %) 127 - The few remainingcustomizedtechnicalpropertieswhich needadditionalinterpretationor translationtoaformalschemalanguages(e.g.JSON-Schema)haveanunderscoreasprefix (e.g.,**##"_type"##**).Withinthe openMINDS integrationpipeline(cf.below),the schematemplateyntaxisinterpreted,extendedandflexiblytranslatedtovarious formalschemalanguages.All furtherspecificationsofthe openMINDS schematemplate syntaxaredescribedbelow.76 +Concept templates are and should be used when multiple target templates have the same subset of properties, because they facilitate the long-term maintenance of those shared properties: Instead of defining the same properties repeatedly within multiple target templates, the common subset can be defined within a single concept template and passed on to all extending target templates. 128 128 129 129 (% style="text-align: justify;" %) 130 - ====Basic openMINDSschema structure====79 +To define that a target template is the extension of a concept template, the target template can state under **##"_extends"##** the relative path to the concept template. For example, the openMINDS core target template **##Dataset##** extends the core concept template **##researchProduct##** as indicated here: 131 131 132 -(% style="text-align: justify;" %) 133 -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: 134 - 135 135 {{code language="json"}} 136 136 { 137 - "_type": "https://openminds.ebrains.eu/LABEL_OF_METADATA_MODEL/SCHEMA_NAME", 138 - "properties": { 139 - "PROPERTY_NAME": { 140 - "type": "DATA_TYPE", 141 - "_instruction": "METADATA_ENTRY_INSTRUCTION" 142 - }, 143 - "required": [ 144 - "PROPERTY_NAME" 145 - ] 83 + "_type": "https:~/~/openminds.ebrains.eu/core/Dataset", 84 + "_extends": "products/researchProduct.schema.tpl.json" 146 146 } 147 147 {{/code}} 148 148 149 149 (% style="text-align: justify;" %) 150 - **##"_type"##**definestheschematype (ornamespace)withthedepictednamingconvention,where theloftherespectiveopenMINDS metadata model(e.g.,**##"core"##**)andthe schemaname (format:UpperCamelCase; e.g. **##"ContactInformation"##**) haveto bespecified. Obviously, theschema name should be meaningful andprovidesomeinsides into what metadatacontent theschemacovers.89 +Note that this convention requires the concept and corresponding target templates to be located in the same openMINDS metadata model repository. Note also that for properties, the following rules apply for target and concept template: 151 151 152 -(% style="text-align: justify;" %) 153 -Under **##"properties"##** a nested associative array is defined, where each key defines the property name (format: lowerCamelCase; e.g. **##"givenName"##**). The corresponding value is again a nested associative array defining the expected data **##"type"##** (cf. below) and the **##"_instructions"##** for entering the correct metadata for the respective property. 91 +1. A concept template has to define some properties which will be inherited by all extending target templates. 92 +1. If a concept template additionally states that some of these properties are required, all extending target templates will require the same properties. 93 +1. A target template can require properties of the concept template, that are not explicitly required within the concept template. In such a case, the other target templates extending the same concept template will not require those properties. 94 +1. A target template can (but does not have to) define and require additional properties that were not defined and required in the concept template. These additionally defined and required properties will not be shared with the other target templates extending the same concept template. 154 154 155 155 (% style="text-align: justify;" %) 156 - Under**##"required"##** a listfpropertynamescan be providedthat are obligatoryto bepresent in a correctly instantiatedmetadatainstanceof therespectiveschema. Ifnone ofthepropertiesare required,this key-valuepair does nothavetobespecified.97 +How to define the expected value of a property will be explained for the different property types in the following sections. 157 157 158 158 (% style="text-align: justify;" %) 159 -==== Schemas extendinga context-schema ====100 +===== Defining expected values ===== 160 160 161 161 (% style="text-align: justify;" %) 162 - In thecasehat severalschemasarehighlyrelatedandcontain acommon setofproperties,itispossibletodefinea non-typecontext-schema withthese commonpropertiesthatcanbe extendedand modified by the group of relatedschemas.103 +The expected value of a property can be defined in large parts in the same way as in JSON-Schema, with some openMINDS syntax specific simplifications and modifications. 163 163 164 164 (% style="text-align: justify;" %) 165 -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: 106 +On the first level, the **##"type"##** of the expected property value needs to be defined. In principle, the openMINDS template syntax supports the same value types as JSON-Schema Draft 7.0, meaning: 107 ++ **##"string"##** 108 ++ **##"number"##** 109 ++ **##"integer"##** 110 ++ **##"array"##** 111 ++ **##"boolean"##** 112 ++ **##"null"##** 113 ++ **##"object"##** 166 166 167 -(% style="text-align: center;" %) 168 -**##"_extends": "RELATIVE_PATH_TO_OPENMINDS-CONTEXT-SCHEMA"##** 115 +Also very similar to JSON-Schema, additional type-specific keys can be used to set further requirements for the expected value. H 169 169 170 -(% style="text-align: justify;" %) 171 -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"]]. 172 172 173 -(% style="text-align: justify;" %) 174 -==== Data type depending constraints ==== 175 - 176 -(% style="text-align: justify;" %) 177 -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"##**. 178 - 179 -(% style="text-align: justify;" %) 180 -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. 181 - 182 182 === The openMINDS integration pipeline === 183 183 184 -(//**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 185 - 186 -{{putFootnotes/}} 120 +(//**coming soon**//)