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,24 +13,12 @@ 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** 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: 35 35 36 36 (% style="text-align: justify;" %) ... ... @@ -37,134 +37,84 @@ 37 37 **(1)** The openMINDS metadata model has to be located on a **public GitHub repository** and published under an **MIT license**. 38 38 39 39 (% style="text-align: justify;" %) 40 -**(2)** The GitHub repository ofsucha metadata model should have at least one **version branch** (naming convention: vX,where X is a majorversion number).28 +**(2)** The GitHub repository should have at least one **version branch** (e.g., "v1"). 41 41 42 42 (% style="text-align: justify;" %) 43 -**(3)** The version branch should have the following **folders** &**files**:31 +**(3)** The version branch should have the following **main directory folders**: **##schemas##** (required), **##tests##** (recommended), **##examples##** (recommended), and **##img##** (optional). 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) - defines the MIT license for the respective metadata model. 53 - 54 -For more information on the content of the existing openMINDS metadata models, please go to [[Metadata models & schemas>>doc:Collabs.openminds.Documentation.Metadata models and schemas.WebHome||target="_blank"]]. 55 - 56 -=== The openMINDS vocabulary === 57 - 58 58 (% style="text-align: justify;" %) 59 - Locatedunder thefolder**##vocab##**in the main branch ofthe centralopenMINDS GitHubdirectory,theopenMINDS vocabulary is semi-automatically gatheredand stored in dedicated JSON files ([[**##types.json##**>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS/v2/vocab/types.json||rel="noopenernoreferrer"target="_blank"]]and [[**##properties.json##**>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS/v2/vocab/properties.json||rel="noopenernoreferrer"target="_blank"]]). The openMINDS integrationpipelinemakes surethat both files are updated with eachcommit toany of theGitHub repositories for the openMINDSmetadatamodels. Withthat, the openMINDSvocab reflectsalwaysan up-to-datestatus of the generaltributesof existing **schematypes**and**properties**acrossall openMINDS metadata models,whileproviding theopportunity to centrally review andmaintain theirconsistency. In addition, this design allows us to centrallydefineand maintain multiplereferencesto related schemas andmatching schemaproperties of othermetadata initiatives. Howthis works in detail isexplainedinthefollowing.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. 60 60 61 61 (% style="text-align: justify;" %) 62 -The **##t ypes.json##** fileisanssociativearray listing all existing openMINDSschematypes. ForeachopenMINDSschematype,asmalllistfgeneralattributesareprovidedintedassociative array. Currently,thefollowingattributesarecaptured: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 63 63 64 -{{code language="json"}} 65 -{ 66 - "https://openminds.ebrains.eu/«METADATA_MODEL_LABEL»/«SCHEMA_NAME»": { 67 - "description": "«GENERAL_DESCRIPTION»", 68 - "label": "«HUMAN-READABLE_LABEL»", 69 - "name": "«SCHEMA_NAME»", 70 - "schemas": [ 71 - "«METADATA_MODEL_LABEL»/«VERSION_BRANCH»/«SCHEMA_NAME»" 72 - ], 73 - "translatableTo": [ 74 - "«REFERENCE_TO_RELATED_SCHEMA_OF_OTHER_INITIATIVE»" 75 - ] 76 - } 77 -} 78 -{{/code}} 39 +(% style="text-align: center;" %) 40 +**##<<XXX>>-<<YYY>>.jsonld##** 79 79 80 80 (% style="text-align: justify;" %) 81 - With each new schema committed to one oftheopenMINDS metadata models, a new entryis appended to the **##types.json##**file, with the **##"name"##** and **##"label"##** automatically derived from the respectiveschematype. The remaining attributesare predefined with a null value and frequently, manually edited by a corresponding expert of theopenMINDS development team. If necessary the auto-derived "label" can be editedas well. All manual editions will bepreservedand not overwritten when the file isupdated again with a new commit. In casea schema is deleted from theopenMINDS metadata models,the corresponding entry in the **##types.json##** file is marked as being deprecated (additional attribute-value pair; **##"deprecated": true##**). It only can be permanently removed from the **##types.json##** file,if the entry is manuallydeleted.43 +for files that should pass the tests, and 82 82 83 -(% style="text-align: justify;" %)84 - Similar to the**##types.json##** file, the **##properties.json##**file is an associative array listing all properties across all existing openMINDS schemas. For each openMINDS property, a small list of general attributes are provided in a nested associative array. Currently, the following attributes are captured:45 +(% style="text-align: center;" %) 46 +**##<<XXX>>-<<YYY>>-nok.jsonld##** 85 85 86 -{{code language="json"}} 87 -{ 88 - "https://openminds.ebrains.eu/vocab/«PROPERTY_NAME": { 89 - "description": "GENERAL_DESCRIPTION", 90 - "name": "DISPLAY_LABEL", 91 - "nameForReverseLink": "DISPLAY_LABEL_OF_REVERSED_LINK", 92 - "sameAs": [ 93 - "REFERENCE_TO_MATCHING_SCHEMA-PROPERTY_OF_OTHER_INITIATIVE" 94 - ], 95 - "schemas": [ 96 - "RELATIVE_PATH_TO_OPENMINDS-SCHEMA_USING_THIS_PROPERTY" 97 - ] 98 - } 99 -} 100 -{{/code}} 101 - 102 102 (% style="text-align: justify;" %) 103 - With each new propertycommittedtoa schemaofone of theopenMINDS metadata models, a new entryis appendedtoproperties.json##**file,with thedisplay label andlist of schemas inwhichthisproperty occurs automatically derived. Theremaining attributes are initiallyprovidedwitha null value.Oncean entry for a property ismadeinthe **##properties.json##**file, the valuesof all attributes(**##"name"##**, **##"description"##**, **##"nameForReversedLink"##**, and **##"sameAs"##**)can be manually edited, except for **##"schemas"##**which will bealwaysautomatically updated. All thosemanual editions will be preservedandnot overwrittenwhenthe file is updatedagainwithnew commit.In case apropertyisnotused anymore in any of theschemas fromtheopenMINDS metadatamodels,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.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##**). 104 104 105 -=== The openMINDS syntax === 106 - 107 107 (% style="text-align: justify;" %) 108 - AllopenMINDSmetadatamodelsare definedusinga light-weighted schemasyntax. Althoughthisschemasyntaxis inspiredby JSON-Schema,it outsourcesmostchematechnicalities tobe handledbytheopenMINDSintegrationpipeline,making the openMINDS schemasmorehuman-readable,especiallyfor untrainedeyes.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. 109 109 110 110 (% style="text-align: justify;" %) 111 -The few remainingcustomizedtechnical propertieswhich need additionalinterpretationortranslationto a formal schemalanguages(e.g.JSON-Schema)haveanunderscoreas prefix(e.g.,**##"_type"##**). Within the openMINDS integrationpipeline (cf.below),theschematemplatesyntaxis interpreted, extendedandflexibly translated to variousformal schemalanguages.All furtherspecificationsof theopenMINDSschematemplate syntax are describedbelow.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. 112 112 57 +=== The openMINDS vocabulary === 58 + 113 113 (% style="text-align: justify;" %) 114 - ====BasicopenMINDS schema structure====60 +Through the integration pipeline of the openMINDS generator, the openMINDS vocabulary is automatically gathered and stored in the main openMINDS GitHub in order to centrally maintain general definitions and references for **types** and **properties** used in schemas across all openMINDS repositories. How this works is explained in the following. 115 115 116 116 (% style="text-align: justify;" %) 117 - All openMINDSschemas needtohave the extension**##.schema.tpl.json##**and each schemaisdefinedas anestedassociative array(dictionary) withthefollowingconceptualstructure:63 +Schema types and properties are stored in dedicated JSON files (**##types.json##** and **##properties.json##**) under the folder **##vocab##** located in the main openMINDS GitHub directory. Each schema type and property occurring in the openMINDS metadata models is automatically represented in those files as nested dictionaries. Here a cutout of the **##types.json##** and **##properties.json##**: 118 118 119 -{{code language="json"}} 65 +{{code language="json" title="Cutout of the openMINDS/vocab/types.json"}} 120 120 { 121 - "_type": "https://openminds.ebrains.eu/LABEL_OF_METADATA_MODEL/SCHEMA_NAME", 122 - "properties": { 123 - "PROPERTY_NAME": { 124 - "type": "DATA_TYPE", 125 - "_instruction": "METADATA_ENTRY_INSTRUCTION" 67 + ..., 68 + "https://openminds.ebrains.eu/core/Person": { 69 + "deprecated": false, 70 + "description": "Structured information on a person (alive or dead).", 71 + "name": "Person", 72 + "translatableTo": [ 73 + "https://schema.org/Person" 74 + ] 126 126 }, 127 - "required": [ 128 - "PROPERTY_NAME" 129 - ] 76 + ... 130 130 } 131 131 {{/code}} 132 132 133 133 (% style="text-align: justify;" %) 134 - **##"_type"##**defines the schema type(or namespace)withthedepictednamingconvention,where thelabeloftherespective openMINDSmetadatamodel(e.g.,**##"core"##**)and theschemaname(format:UpperCamelCase;e.g.**##"ContactInformation"##**)have tobespecified.Obviously,theschemanameshouldbe meaningfulandprovidesomeinsidesintowhatmetadatacontenttheschema covers.81 +The keywords of those nested dictionaries are pre-defined to consistently capture for all schema types and properties their namespace, their occurrence, their general description, and possible references to related or matching schema types and properties of other metadata initiatives (e.g., schema.org). This setup also allows us to define some values/entries to be automatically filled in by the openMINDS integration pipeline with each commit to one of the openMINDS repositories (e.g., the namespace and occurrence) and others to be manually editable later on (e.g., the general description and references). 135 135 136 136 (% style="text-align: justify;" %) 137 - Under**##"properties"##**a nestedassociative array isdefined,where each keydefines the propertyname(format:lowerCamelCase;e.g. **##"givenName"##**).The correspondingvalue isagainanestedassociative arraydefiningtheexpecteddata **##"type"##**(cf. below)andthe**##"_instructions"##**for enteringthecorrect metadataforthe respectiveproperty.84 +For security, outdated entries in those openMINDS vocabulary files (e.g., because the namespace of the schema type or property changed or the schema type or property was deleted) are not automatically deleted, but kept and marked as being deprecated. After evaluation, deprecated schema types or properties can be deleted manually from openMINDS vocabulary. 138 138 139 139 (% style="text-align: justify;" %) 140 - Under **##"required"##**alist ofpropertynamescanbeprovidedthatareobligatorytobe presentina correctlyinstantiatedmetadatainstanceof therespectiveschema.If noneofthepropertiesare required,thiskey-value pairdoesnothaveto bespecified.87 +With that, the openMINDS vocab reflects always an up-to-date status of the schema types and properties in use across all openMINDS metadata models, while providing the opportunity to centrally review and maintain their consistency and references. 141 141 142 -(% style="text-align: justify;" %) 143 -==== Schemas extending a context-schema ==== 89 +=== The openMINDS schema template syntax === 144 144 145 145 (% style="text-align: justify;" %) 146 - Inthecasehatseveral schemasarehighly related andcontaina commonsetofproperties,it is possible todefine anon-typecontext-schemawiththesecommon propertiesthatcan be extendedandmodifiedbythegroup of relatedschemas.92 +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##**. 147 147 148 148 (% style="text-align: justify;" %) 149 -Al l propertiesand constraints(e.g. requiredproperties,expecteddatatypes)definedinthe context-schemaarepassedonto theschemasextendingthisontext-schema.Eachof these schemascandefine additional properties,or(ifnecessary)can overwritethe constraintsofthecontext-schema (incl.**##"_instructions"##**).Inordertostate thataschemaisextendinga context-schema,thefollowingadditionalkey-valuepairhastobededtotheschematemplate above:95 +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). 150 150 151 -(% style="text-align: center;" %) 152 -**##"_extends": "RELATIVE_PATH_TO_OPENMINDS-CONTEXT-SCHEMA"##** 153 - 154 154 (% style="text-align: justify;" %) 155 - This design notonly makesitasier toidentify highly related schemas, butalsofacilitates the maintenanceof thecommonly usedproperties. A good hands-onexample, isthe context-schema[[ResearchProduct>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/researchProduct.schema.tpl.json||rel="noopenernoreferrer"target="_blank"]] which isextended by the followingschemaset:[[Dataset>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/dataset.schema.tpl.json||rel="noopenernoreferrer" 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="noopenernoreferrer"target="_blank"]],and[[Software>>https://raw.githubusercontent.com/HumanBrainProject/openMINDS_core/v3/schemas/products/software.schema.tpl.json||rel="noopenernoreferrer"target="_blank"]].98 +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. 156 156 157 157 (% style="text-align: justify;" %) 158 - ====Data typedependingconstraints ====101 +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. 159 159 160 160 (% style="text-align: justify;" %) 161 - Depending on the expected data**##"type"##** additionalconstraints can bemade for the metadata entry of a respective property. Currently, the openMINDS schema template syntax supports the followingdata types: **##"string"##**, ##**"integer"**##, **##"float"##**, **##"boolean"##**, **##"array"##** and **##"object"##**.104 +(//**coming soon**//) 162 162 163 -(% style="text-align: justify;" %) 164 -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. 165 - 166 166 === The openMINDS integration pipeline === 167 167 168 -(//**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 169 - 170 -{{putFootnotes/}} 108 +(//**coming soon**//)