From 3ac97572835b872258b681203199500ebe657ca3 Mon Sep 17 00:00:00 2001 From: Izaskun Mallona Date: Fri, 7 Jun 2024 14:54:39 +0200 Subject: [PATCH] Add envmodules --- README.md | 6 + project/excel/omni_schema.xlsx | Bin 8306 -> 8323 bytes project/graphql/omni_schema.graphql | 1 + project/jsonld/omni_schema.context.jsonld | 2 +- project/jsonld/omni_schema.jsonld | 22 ++- project/jsonschema/omni_schema.schema.json | 6 + project/owl/omni_schema.owl.ttl | 176 ++++++++++---------- project/protobuf/omni_schema.proto | 1 + project/shacl/omni_schema.shacl.ttl | 181 +++++++++++---------- project/shex/omni_schema.shex | 3 +- project/sqlschema/omni_schema.sql | 7 + src/omni_schema/datamodel/omni_schema.py | 12 +- src/omni_schema/schema/omni_schema.yaml | 5 + 13 files changed, 243 insertions(+), 179 deletions(-) diff --git a/README.md b/README.md index 9dc95c2..6ff918b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ Data model for omnibenchmark. +# How to operate + +1. Modify `src/omni_schema/schema/omni_schema.yaml` manually +2. `make all` +3. Consider `make deploy` + ## Website [https://omnibenchmark.github.io/omni-schema](https://omnibenchmark.github.io/omni-schema) diff --git a/project/excel/omni_schema.xlsx b/project/excel/omni_schema.xlsx index 62ee8dd4035813a72f46da01dd6aeee31e333798..a8df993af48c24aa94badd1eb69cf673db5c1b38 100644 GIT binary patch delta 1300 zcmez5(Co+?;LXe;!oa}5!LYLI_(a~d^*}1Zgyo^uYoOq1Mg|5!Af1w*98i>BP^_Pv zUzDm>k(;x0qObp91D>}3r><1L-qNbLXw7s*KLtfY&Lg^Bdvv2dFFdm1?*8Sv(dxvZ*2)>ZH$7KgUBfef<6M>~#%&oF1DiH!JUk@iHv3=hj7c-!OrE)N z-RrJ(^L8XI7P>coe%$h>#gBzNmm6fagvGc{d6H}#C(>7|{lGnNPFlTqfPNe2oIb|z zo0gTUuk+77zGh`a>Ez9+=iZs69?j2=yI0?{PCovx_`FF-Q(9q0O(W-`J6}8wZrHKqx}~6m_2j1O z@@BLBtt7-lqt9=w&dQd#xtrsA$WucW=l|;tKEATTyOhgj$KM0R^$y!hjjAhH{!MLB zSZDV-LR=xOeWTI~>91cuy?S?GhTwi#pP#+4Q`5>i{Ez-jl-{ao+SuOL-7@j9;L1Ca#CMiL&d6$tLhHCw3ey<^&{$0Z{p=^ zEy1o!Z*F_n6&S>I;piuiejlOw@=2Z1O)Xo~RxbFl%lgs!>mNQ``g!pXQ|fLv&o&s_lESiTWd#zK_e`)(Ic6}sS;s1X@kDL^iS*?;XMVol@}ChDtDNwZ zzgb(L8xn~-1@j;bE#Z6!V~$7_6DXo5ONu`OM>vzjVTjBLNj?bUrc^qZG1*zhniHOb zCb!F&fi)hGk!CzK`HqYdn8zq9&BVR>0n1{$F!3^qbm9%8DYyfov2 z$-eS3U(Fi4?jJ|hX%9A7kZ!e@x0F}{r*n4*dwBRT6?V(yufDbx0$D}H9k0I z_|Lw6+f=FMLwc8r-!Qr6X{=?t{%eWBnxpe9H5yu~i`1SfKRjM=+cmwS=9nx?b3OZJ zWsRkK*xYm0Br;Dn;O-8bGet~1^+(5BoedmUCMloi?Ap`7eOe^;*XBe&u_BMNPG4*1 zf4_RBS6cMLw=X}8^yiz}ZT#rrbX`o;&FGG+ZLCP2bM)cuNwu^7hAQlqQrEC!i|Q`^ z6m|D*zFdo5YUR|ET9eIZFADk;HuY0&(cc$x`#ECMXXk$Ae;m0W`^VS(U&1IMwD~%t z9UC(+j5bSf>}3QqZg7@C7=hdk5XKdrEsVUNaOAwGeIXkZhLi8{NKIbP$6kLM6l{N| zYRNmW35hS%)bKWs|ybjKNKId`vX~vhfUm0R*D#e4A zRz0g&S(;V#K}|NXML}P7lDUrF+LA7oWwM_4UQWLG#-}>DdDUsdZyu$c*=1%2ltnY& z?p^pkyTBskRm58+|FWx}B`%aoo~`Ga*BHM@;KAuL z#IZd~|C{JezP&ct_*9J+e_NQ@l0%N_MVl8FOIqZn?JtygToL7+;$}Z&`2)NenM9c31;OM3IcX+20kCv}0ILp~ zbVQ@BsI)cES}_bKuMq@mdLajK@*ki%vch1Ycwts;baO7Tesl{0n&HmHz`zR&ARyhq z*grW=UIy&zT6yVu9&rYS_@dODVtqXjiEhjZ8Ma?DfzJ5>^ddisF<*fiD{}P9^NX^R z^7FGnWf!_;5x)1TH-Vadu`)17p=jPM3Dz86G+A6h5$qOg1!=}JlfxC%*i2+VN&$e& B%WD7t diff --git a/project/graphql/omni_schema.graphql b/project/graphql/omni_schema.graphql index 5d384ed..9b41321 100644 --- a/project/graphql/omni_schema.graphql +++ b/project/graphql/omni_schema.graphql @@ -39,6 +39,7 @@ type Module repo: String! exclude: [Module] parameters: [Parameter] + envmodules: [String] } type Orchestrator diff --git a/project/jsonld/omni_schema.context.jsonld b/project/jsonld/omni_schema.context.jsonld index 8b3d4c0..62b87e6 100644 --- a/project/jsonld/omni_schema.context.jsonld +++ b/project/jsonld/omni_schema.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2024-03-08T14:09:12", + "generation_date": "2024-06-07T14:53:13", "source": "omni_schema.yaml" }, "@context": { diff --git a/project/jsonld/omni_schema.jsonld b/project/jsonld/omni_schema.jsonld index 80c6335..a7275c9 100644 --- a/project/jsonld/omni_schema.jsonld +++ b/project/jsonld/omni_schema.jsonld @@ -677,6 +677,19 @@ ], "range": "IOFile", "@type": "SlotDefinition" + }, + { + "name": "envmodules", + "definition_uri": "https://w3id.org/omnibenchmark/omni-schema/envmodules", + "from_schema": "https://w3id.org/omnibenchmark/omni-schema", + "slot_uri": "https://w3id.org/omnibenchmark/omni-schema/envmodules", + "multivalued": true, + "owner": "Module", + "domain_of": [ + "Module" + ], + "range": "string", + "@type": "SlotDefinition" } ], "classes": [ @@ -780,7 +793,8 @@ "description", "repo", "exclude", - "parameters" + "parameters", + "envmodules" ], "slot_usage": {}, "class_uri": "https://w3id.org/omnibenchmark/omni-schema/Module", @@ -829,9 +843,9 @@ ], "metamodel_version": "1.7.0", "source_file": "omni_schema.yaml", - "source_file_date": "2024-03-08T14:09:08", - "source_file_size": 4222, - "generation_date": "2024-03-08T14:09:12", + "source_file_date": "2024-06-07T14:53:10", + "source_file_size": 4296, + "generation_date": "2024-06-07T14:53:14", "@type": "SchemaDefinition", "@context": [ "project/jsonld/omni_schema.context.jsonld", diff --git a/project/jsonschema/omni_schema.schema.json b/project/jsonschema/omni_schema.schema.json index 5bd5894..2cdb98a 100644 --- a/project/jsonschema/omni_schema.schema.json +++ b/project/jsonschema/omni_schema.schema.json @@ -106,6 +106,12 @@ "description": "A human-readable description for a thing", "type": "string" }, + "envmodules": { + "items": { + "type": "string" + }, + "type": "array" + }, "exclude": { "description": "Ignore these module's outputs as input.", "items": { diff --git a/project/owl/omni_schema.owl.ttl b/project/owl/omni_schema.owl.ttl index af63efd..8bad3f0 100644 --- a/project/owl/omni_schema.owl.ttl +++ b/project/owl/omni_schema.owl.ttl @@ -11,56 +11,56 @@ omni_schema:Benchmark a owl:Class, linkml:ClassDefinition ; rdfs:label "Benchmark" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty omni_schema:version ], - [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty omni_schema:orchestrator ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty omni_schema:platform ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty omni_schema:version ], + owl:allValuesFrom omni_schema:Step ; + owl:onProperty omni_schema:steps ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty omni_schema:version ], + owl:minCardinality 1 ; + owl:onProperty omni_schema:orchestrator ], [ a owl:Restriction ; - owl:allValuesFrom omni_schema:Step ; + owl:minCardinality 1 ; owl:onProperty omni_schema:steps ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:allValuesFrom omni_schema:Orchestrator ; + owl:onProperty omni_schema:orchestrator ], + [ a owl:Restriction ; + owl:minCardinality 1 ; owl:onProperty omni_schema:platform ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty omni_schema:storage ], + owl:minCardinality 1 ; + owl:onProperty omni_schema:version ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty omni_schema:validator ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty omni_schema:orchestrator ], + owl:onProperty omni_schema:storage ], [ a owl:Restriction ; owl:allValuesFrom omni_schema:Validator ; owl:onProperty omni_schema:validator ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom linkml:String ; owl:onProperty omni_schema:storage ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty omni_schema:validator ], + owl:onProperty omni_schema:platform ], [ a owl:Restriction ; owl:maxCardinality 1 ; + owl:onProperty omni_schema:storage ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty omni_schema:version ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; owl:onProperty omni_schema:platform ], [ a owl:Restriction ; owl:minCardinality 1 ; owl:onProperty omni_schema:validator ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty omni_schema:steps ], - [ a owl:Restriction ; - owl:allValuesFrom omni_schema:Orchestrator ; - owl:onProperty omni_schema:orchestrator ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty omni_schema:storage ], + owl:maxCardinality 1 ; + owl:onProperty omni_schema:version ], omni_schema:IdentifiableEntity ; skos:definition "A multi-step workflow to evaluate processing steps for a specific task." ; skos:inScheme . @@ -84,19 +84,19 @@ omni_schema:Orchestrator a owl:Class, owl:maxCardinality 1 ; owl:onProperty omni_schema:url ], [ a owl:Restriction ; - owl:minCardinality 1 ; + owl:allValuesFrom linkml:String ; owl:onProperty omni_schema:name ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty omni_schema:url ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty omni_schema:name ], [ a owl:Restriction ; owl:minCardinality 1 ; owl:onProperty omni_schema:url ], [ a owl:Restriction ; owl:maxCardinality 1 ; + owl:onProperty omni_schema:name ], + [ a owl:Restriction ; + owl:minCardinality 1 ; owl:onProperty omni_schema:name ] ; skos:definition "The orchestrator of the benchmark." ; skos:inScheme . @@ -105,10 +105,10 @@ omni_schema:Parameter a owl:Class, linkml:ClassDefinition ; rdfs:label "Parameter" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom linkml:String ; owl:onProperty omni_schema:values ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:minCardinality 0 ; owl:onProperty omni_schema:values ] ; skos:definition "A parameter and its scope." ; skos:inScheme . @@ -117,29 +117,29 @@ omni_schema:Validator a owl:Class, linkml:ClassDefinition ; rdfs:label "Validator" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 1 ; + owl:maxCardinality 1 ; owl:onProperty omni_schema:schema_url ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty omni_schema:url ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; owl:onProperty omni_schema:schema_url ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty omni_schema:name ], + owl:onProperty omni_schema:schema_url ], [ a owl:Restriction ; - owl:minCardinality 1 ; + owl:maxCardinality 1 ; owl:onProperty omni_schema:name ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty omni_schema:schema_url ], + owl:onProperty omni_schema:name ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty omni_schema:url ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 1 ; owl:onProperty omni_schema:name ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty omni_schema:url ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty omni_schema:url ] ; @@ -159,6 +159,12 @@ omni_schema:entries a owl:ObjectProperty, rdfs:range omni_schema:IOFile ; skos:inScheme . +omni_schema:envmodules a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "envmodules" ; + rdfs:range linkml:String ; + skos:inScheme . + omni_schema:exclude a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "exclude" ; @@ -292,10 +298,10 @@ omni_schema:IOFile a owl:Class, owl:allValuesFrom linkml:String ; owl:onProperty omni_schema:path ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty omni_schema:path ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty omni_schema:path ], omni_schema:IdentifiableEntity ; skos:definition "Represents an input / output file." ; @@ -305,32 +311,32 @@ omni_schema:IdentifiableEntity a owl:Class, linkml:ClassDefinition ; rdfs:label "IdentifiableEntity" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom linkml:Uriorcurie ; - owl:onProperty omni_schema:id ], - [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty omni_schema:name ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty omni_schema:description ], - [ a owl:Restriction ; - owl:minCardinality 1 ; owl:onProperty omni_schema:name ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty omni_schema:name ], + owl:onProperty omni_schema:id ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom linkml:String ; + owl:onProperty omni_schema:description ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uriorcurie ; owl:onProperty omni_schema:id ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty omni_schema:id ], + owl:onProperty omni_schema:name ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:maxCardinality 1 ; owl:onProperty omni_schema:description ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty omni_schema:description ] ; + owl:onProperty omni_schema:description ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty omni_schema:id ] ; skos:definition "A generic grouping for any identifiable entity" ; skos:exactMatch schema1:Thing ; skos:inScheme . @@ -339,26 +345,32 @@ omni_schema:Module a owl:Class, linkml:ClassDefinition ; rdfs:label "Module" ; rdfs:subClassOf [ a owl:Restriction ; + owl:allValuesFrom omni_schema:Parameter ; + owl:onProperty omni_schema:parameters ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty omni_schema:repo ], + [ a owl:Restriction ; + owl:allValuesFrom omni_schema:Module ; + owl:onProperty omni_schema:exclude ], + [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty omni_schema:repo ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty omni_schema:parameters ], + owl:onProperty omni_schema:exclude ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty omni_schema:repo ], [ a owl:Restriction ; - owl:allValuesFrom omni_schema:Parameter ; + owl:minCardinality 0 ; owl:onProperty omni_schema:parameters ], - [ a owl:Restriction ; - owl:allValuesFrom omni_schema:Module ; - owl:onProperty omni_schema:exclude ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty omni_schema:exclude ], + owl:onProperty omni_schema:envmodules ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty omni_schema:repo ], + owl:allValuesFrom linkml:String ; + owl:onProperty omni_schema:envmodules ], omni_schema:IdentifiableEntity ; skos:definition "A single benchmark component assigned to a specific step." ; skos:inScheme . @@ -367,47 +379,47 @@ omni_schema:Step a owl:Class, linkml:ClassDefinition ; rdfs:label "Step" ; rdfs:subClassOf [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty omni_schema:terminal ], + [ a owl:Restriction ; + owl:allValuesFrom omni_schema:IOFile ; + owl:onProperty omni_schema:outputs ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty omni_schema:terminal ], + [ a owl:Restriction ; + owl:allValuesFrom omni_schema:InputCollection ; + owl:onProperty omni_schema:inputs ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty omni_schema:after ], + [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty omni_schema:initial ], + owl:onProperty omni_schema:terminal ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty omni_schema:members ], [ a owl:Restriction ; owl:allValuesFrom omni_schema:Step ; owl:onProperty omni_schema:after ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty omni_schema:initial ], [ a owl:Restriction ; owl:allValuesFrom omni_schema:Module ; owl:onProperty omni_schema:members ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty omni_schema:inputs ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty omni_schema:initial ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty omni_schema:terminal ], + owl:onProperty omni_schema:initial ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty omni_schema:outputs ], - [ a owl:Restriction ; - owl:allValuesFrom omni_schema:IOFile ; - owl:onProperty omni_schema:outputs ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty omni_schema:after ], - [ a owl:Restriction ; - owl:allValuesFrom omni_schema:InputCollection ; - owl:onProperty omni_schema:inputs ], + owl:onProperty omni_schema:initial ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty omni_schema:terminal ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty omni_schema:terminal ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty omni_schema:members ], + owl:onProperty omni_schema:initial ], omni_schema:IdentifiableEntity ; skos:definition "A benchmark subtask with equivalent and independent modules." ; skos:inScheme . diff --git a/project/protobuf/omni_schema.proto b/project/protobuf/omni_schema.proto index e36794a..80413d6 100644 --- a/project/protobuf/omni_schema.proto +++ b/project/protobuf/omni_schema.proto @@ -33,6 +33,7 @@ message Module string repo = 0 repeated module exclude = 0 repeated parameter parameters = 0 + repeated string envmodules = 0 } // The orchestrator of the benchmark. message Orchestrator diff --git a/project/shacl/omni_schema.shacl.ttl b/project/shacl/omni_schema.shacl.ttl index f386ba3..27b05f2 100644 --- a/project/shacl/omni_schema.shacl.ttl +++ b/project/shacl/omni_schema.shacl.ttl @@ -14,16 +14,16 @@ schema1:Thing a sh:NodeShape ; sh:minCount 1 ; sh:order 1 ; sh:path schema1:name ], - [ sh:description "A unique identifier for a thing" ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 0 ; - sh:path schema1:identifier ], [ sh:datatype xsd:string ; sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; sh:order 2 ; - sh:path schema1:description ] ; + sh:path schema1:description ], + [ sh:description "A unique identifier for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 0 ; + sh:path schema1:identifier ] ; sh:targetClass schema1:Thing . omni_schema:Benchmark a sh:NodeShape ; @@ -31,58 +31,58 @@ omni_schema:Benchmark a sh:NodeShape ; sh:description "A multi-step workflow to evaluate processing steps for a specific task." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:order 8 ; - sh:path schema1:description ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; + sh:description "The place hosting all benchmark components" ; sh:maxCount 1 ; sh:minCount 1 ; - sh:order 7 ; - sh:path schema1:name ], + sh:order 1 ; + sh:path omni_schema:platform ], [ sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 6 ; sh:path schema1:identifier ], - [ sh:class omni_schema:Step ; - sh:minCount 1 ; - sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path omni_schema:steps ], [ sh:datatype xsd:string ; sh:description "The place hosting all benchmark data." ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 2 ; sh:path omni_schema:storage ], - [ sh:class omni_schema:Orchestrator ; - sh:description "The orchestrator of the benchmark." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:BlankNode ; - sh:order 3 ; - sh:path omni_schema:orchestrator ], [ sh:datatype xsd:string ; sh:description "The version of the benchmark." ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 0 ; sh:path omni_schema:version ], - [ sh:datatype xsd:string ; - sh:description "The place hosting all benchmark components" ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path omni_schema:platform ], [ sh:class omni_schema:Validator ; sh:description "The validator of the benchmark." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:BlankNode ; sh:order 4 ; - sh:path omni_schema:validator ] ; + sh:path omni_schema:validator ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:order 8 ; + sh:path schema1:description ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 7 ; + sh:path schema1:name ], + [ sh:class omni_schema:Step ; + sh:minCount 1 ; + sh:nodeKind sh:IRI ; + sh:order 5 ; + sh:path omni_schema:steps ], + [ sh:class omni_schema:Orchestrator ; + sh:description "The orchestrator of the benchmark." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:BlankNode ; + sh:order 3 ; + sh:path omni_schema:orchestrator ] ; sh:targetClass omni_schema:Benchmark . omni_schema:InputCollection a sh:NodeShape ; @@ -100,17 +100,17 @@ omni_schema:Orchestrator a sh:NodeShape ; sh:description "The orchestrator of the benchmark." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:string ; - sh:description "Url to the full benchmark description in workflow format" ; + sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; sh:minCount 1 ; - sh:order 1 ; - sh:path omni_schema:url ], + sh:order 0 ; + sh:path schema1:name ], [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; + sh:description "Url to the full benchmark description in workflow format" ; sh:maxCount 1 ; sh:minCount 1 ; - sh:order 0 ; - sh:path schema1:name ] ; + sh:order 1 ; + sh:path omni_schema:url ] ; sh:targetClass omni_schema:Orchestrator . omni_schema:Parameter a sh:NodeShape ; @@ -155,12 +155,6 @@ omni_schema:IOFile a sh:NodeShape ; sh:minCount 1 ; sh:order 1 ; sh:path schema1:identifier ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 2 ; - sh:path schema1:name ], [ sh:datatype xsd:string ; sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; @@ -170,59 +164,78 @@ omni_schema:IOFile a sh:NodeShape ; sh:description "The code repository hosting the module." ; sh:maxCount 1 ; sh:order 0 ; - sh:path omni_schema:path ] ; + sh:path omni_schema:path ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 2 ; + sh:path schema1:name ] ; sh:targetClass omni_schema:IOFile . omni_schema:Module a sh:NodeShape ; sh:closed true ; sh:description "A single benchmark component assigned to a specific step." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "A unique identifier for a thing" ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 3 ; - sh:path schema1:identifier ], - [ sh:datatype xsd:string ; - sh:description "The code repository hosting the module." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 0 ; - sh:path omni_schema:repo ], - [ sh:class omni_schema:Module ; + sh:property [ sh:class omni_schema:Module ; sh:description "Ignore these module's outputs as input." ; sh:nodeKind sh:IRI ; sh:order 1 ; sh:path omni_schema:exclude ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 4 ; - sh:path schema1:name ], [ sh:datatype xsd:string ; sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; - sh:order 5 ; + sh:order 6 ; sh:path schema1:description ], [ sh:class omni_schema:Parameter ; sh:nodeKind sh:BlankNode ; sh:order 2 ; - sh:path omni_schema:parameters ] ; + sh:path omni_schema:parameters ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 5 ; + sh:path schema1:name ], + [ sh:description "A unique identifier for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 4 ; + sh:path schema1:identifier ], + [ sh:datatype xsd:string ; + sh:description "The code repository hosting the module." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 0 ; + sh:path omni_schema:repo ], + [ sh:datatype xsd:string ; + sh:order 3 ; + sh:path omni_schema:envmodules ] ; sh:targetClass omni_schema:Module . omni_schema:Step a sh:NodeShape ; sh:closed true ; sh:description "A benchmark subtask with equivalent and independent modules." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:class omni_schema:Module ; + sh:property [ sh:class omni_schema:IOFile ; + sh:nodeKind sh:IRI ; + sh:order 5 ; + sh:path omni_schema:outputs ], + [ sh:datatype xsd:boolean ; + sh:description "Is the initial benchmark step?" ; + sh:maxCount 1 ; + sh:order 0 ; + sh:path omni_schema:initial ], + [ sh:class omni_schema:Module ; sh:minCount 1 ; sh:nodeKind sh:IRI ; sh:order 3 ; sh:path omni_schema:members ], - [ sh:class omni_schema:InputCollection ; - sh:nodeKind sh:BlankNode ; - sh:order 4 ; - sh:path omni_schema:inputs ], + [ sh:class omni_schema:Step ; + sh:description "Step(s) that have to be finished before this step." ; + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path omni_schema:after ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; @@ -230,33 +243,23 @@ omni_schema:Step a sh:NodeShape ; sh:order 7 ; sh:path schema1:name ], [ sh:datatype xsd:boolean ; - sh:description "Is the initial benchmark step?" ; + sh:description "Is the terminal benchmark step?" ; sh:maxCount 1 ; - sh:order 0 ; - sh:path omni_schema:initial ], + sh:order 1 ; + sh:path omni_schema:terminal ], + [ sh:class omni_schema:InputCollection ; + sh:nodeKind sh:BlankNode ; + sh:order 4 ; + sh:path omni_schema:inputs ], [ sh:datatype xsd:string ; sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; sh:order 8 ; sh:path schema1:description ], - [ sh:class omni_schema:Step ; - sh:description "Step(s) that have to be finished before this step." ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path omni_schema:after ], - [ sh:datatype xsd:boolean ; - sh:description "Is the terminal benchmark step?" ; - sh:maxCount 1 ; - sh:order 1 ; - sh:path omni_schema:terminal ], [ sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 6 ; - sh:path schema1:identifier ], - [ sh:class omni_schema:IOFile ; - sh:nodeKind sh:IRI ; - sh:order 5 ; - sh:path omni_schema:outputs ] ; + sh:path schema1:identifier ] ; sh:targetClass omni_schema:Step . diff --git a/project/shex/omni_schema.shex b/project/shex/omni_schema.shex index 1b0fb33..8f8a397 100644 --- a/project/shex/omni_schema.shex +++ b/project/shex/omni_schema.shex @@ -89,7 +89,8 @@ linkml:Sparqlpath xsd:string rdf:type [ schema1:Thing ] ? ; @linkml:String ; @ * ; - @ * + @ * ; + @linkml:String * ) ; rdf:type [ ] ) diff --git a/project/sqlschema/omni_schema.sql b/project/sqlschema/omni_schema.sql index 4d95951..5cfb124 100644 --- a/project/sqlschema/omni_schema.sql +++ b/project/sqlschema/omni_schema.sql @@ -68,3 +68,10 @@ CREATE TABLE "Parameter" ( PRIMARY KEY ("values", "Module_id"), FOREIGN KEY("Module_id") REFERENCES "Module" (id) ); + +CREATE TABLE "Module_envmodules" ( + backref_id TEXT, + envmodules TEXT, + PRIMARY KEY (backref_id, envmodules), + FOREIGN KEY(backref_id) REFERENCES "Module" (id) +); diff --git a/src/omni_schema/datamodel/omni_schema.py b/src/omni_schema/datamodel/omni_schema.py index 8171f34..807ea8c 100644 --- a/src/omni_schema/datamodel/omni_schema.py +++ b/src/omni_schema/datamodel/omni_schema.py @@ -1,5 +1,5 @@ # Auto generated from omni_schema.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-03-08T14:09:16 +# Generation date: 2024-06-07T14:53:16 # Schema: omni-schema # # id: https://w3id.org/omnibenchmark/omni-schema @@ -284,6 +284,7 @@ class Module(IdentifiableEntity): repo: str = None exclude: Optional[Union[Union[str, ModuleId], List[Union[str, ModuleId]]]] = empty_list() parameters: Optional[Union[Union[dict, "Parameter"], List[Union[dict, "Parameter"]]]] = empty_list() + envmodules: Optional[Union[str, List[str]]] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self._is_empty(self.id): @@ -304,6 +305,10 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.parameters = [self.parameters] if self.parameters is not None else [] self.parameters = [v if isinstance(v, Parameter) else Parameter(**as_dict(v)) for v in self.parameters] + if not isinstance(self.envmodules, list): + self.envmodules = [self.envmodules] if self.envmodules is not None else [] + self.envmodules = [v if isinstance(v, str) else str(v) for v in self.envmodules] + super().__post_init__(**kwargs) @@ -453,4 +458,7 @@ class slots: model_uri=OMNI_SCHEMA.values, domain=None, range=Optional[Union[str, List[str]]]) slots.entries = Slot(uri=OMNI_SCHEMA.entries, name="entries", curie=OMNI_SCHEMA.curie('entries'), - model_uri=OMNI_SCHEMA.entries, domain=None, range=Optional[Union[Union[str, IOFileId], List[Union[str, IOFileId]]]]) \ No newline at end of file + model_uri=OMNI_SCHEMA.entries, domain=None, range=Optional[Union[Union[str, IOFileId], List[Union[str, IOFileId]]]]) + +slots.envmodules = Slot(uri=OMNI_SCHEMA.envmodules, name="envmodules", curie=OMNI_SCHEMA.curie('envmodules'), + model_uri=OMNI_SCHEMA.envmodules, domain=None, range=Optional[Union[str, List[str]]]) \ No newline at end of file diff --git a/src/omni_schema/schema/omni_schema.yaml b/src/omni_schema/schema/omni_schema.yaml index 1abd3c9..5c032ca 100644 --- a/src/omni_schema/schema/omni_schema.yaml +++ b/src/omni_schema/schema/omni_schema.yaml @@ -78,6 +78,7 @@ classes: - repo - exclude - parameters + - envmodules IOFile: is_a: IdentifiableEntity @@ -213,4 +214,8 @@ slots: entries: range: IOFile + multivalued: true + + envmodules: + range: string multivalued: true \ No newline at end of file