Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
stuchalk committed Mar 5, 2024
2 parents 244248b + ba00253 commit 3d0e6c3
Show file tree
Hide file tree
Showing 23 changed files with 1,032 additions and 60 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,28 @@ jobs:
run: |
python -m pip install check-jsonschema
- name: Run Unit schema validation
- name: Run JSON schema validation
run: |
check-jsonschema -o json --schemafile schema/basisset.json examples/sections/basisset.jsonld
check-jsonschema -o json --schemafile schema/calculation.json examples/sections/calculation.jsonld
check-jsonschema -o json --schemafile schema/chemical.json examples/sections/chemical.jsonld
check-jsonschema -o json --schemafile schema/computer.json examples/sections/computer.jsonld
check-jsonschema -o json --schemafile schema/dataseries.json examples/sections/dataseries.jsonld
check-jsonschema -o json --schemafile schema/dataset.json examples/sections/dataset.jsonld
check-jsonschema -o json --schemafile schema/framework_outline.json examples/sections/framework_outline.jsonld
check-jsonschema -o json --schemafile schema/framework_plus.json examples/sections/framework_plus.jsonld
check-jsonschema -o json --schemafile schema/framework.json examples/sections/framework.jsonld
check-jsonschema -o json --schemafile schema/measurement.json examples/sections/measurement.jsonld
check-jsonschema -o json --schemafile schema/methodology.json examples/sections/methodology_cc.jsonld
check-jsonschema -o json --schemafile schema/methodology.json examples/sections/methodology_exp.jsonld
check-jsonschema -o json --schemafile schema/mixture.json examples/sections/mixture.jsonld
check-jsonschema -o json --schemafile schema/molsystem.json examples/sections/molsystem.jsonld
check-jsonschema -o json --schemafile schema/parameter.json examples/sections/parameter.jsonld
check-jsonschema -o json --schemafile schema/procedure.json examples/sections/procedure.jsonld
check-jsonschema -o json --schemafile schema/resource.json examples/sections/resource.jsonld
check-jsonschema -o json --schemafile schema/software.json examples/sections/software.jsonld
check-jsonschema -o json --schemafile schema/substance.json examples/sections/substance.jsonld
check-jsonschema -o json --schemafile schema/system.json examples/sections/system_cc.jsonld
check-jsonschema -o json --schemafile schema/system.json examples/sections/system_exp.jsonld
check-jsonschema -o json --schemafile schema/unit.json examples/sections/unit.jsonld
- name: Run Value schema validation
run: |
check-jsonschema -o json --schemafile schema/value.json examples/sections/value.jsonld
4 changes: 2 additions & 2 deletions examples/sections/basisset.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dct": "http://purl.org/dc/terms/",
"gc": "http://purl.org/gc/",
"obo": "http://purl.obolibrary.org/obo/",
"wd": "http://www.wikidata.org/entity/",
"wd": "http://www.wikidata.org/entity/"
},
{"@base": "https://stuchalk.github.io/scidata/examples/sections/basisset/"}
],
Expand Down Expand Up @@ -72,4 +72,4 @@
]
}
]
}
}
6 changes: 3 additions & 3 deletions examples/sections/measurement.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"@context": [
"https://stuchalk.github.io/scidata/contexts/crg_measurement.jsonld",
{
"sdo": "https://stuchalk.github.io/scidata/ontology/scidata.owl#"
"cao": "https://champ.stuchalk.domains.unf.edu/images/ontology/cao.owl#",
"sdo": "https://stuchalk.github.io/scidata/ontology/scidata.owl#",
"cao": "https://champ.stuchalk.domains.unf.edu/images/ontology/cao.owl#"
},
{"@base": "https://stuchalk.github.io/scidata/examples/sections/measurement"}
],
Expand Down Expand Up @@ -91,4 +91,4 @@
}
}
]
}
}
4 changes: 2 additions & 2 deletions examples/sections/procedure.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"afr": "http://purl.allotrope.org/ontologies/result#",
"afre": "http://purl.allotrope.org/ontologies/realizable",
"repome": "https://w3id.org/reproduceme#",
"repome": "https://w3id.org/reproduceme#"
},
{"@base": "https://stuchalk.github.io/scidata/examples/procedure/"}
],
Expand Down Expand Up @@ -70,4 +70,4 @@
],
"notes": "If the electrode is not in 'Good condition' repeat the calibration procedure. If it is still not showing 'Good condition' report to your supervisor and obtain a replacement."
}
}
}
39 changes: 39 additions & 0 deletions schema/basisset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Basis Set Schema",
"description": "JSON schema for a basis set",
"type": "object",
"properties": {
"@id": { "type": "string" },
"title": { "type": "string" },
"description": { "type": "string" },
"format": { "type": "string" },
"setType": { "type": "string" },
"harmonicType": { "type": "string" },
"contractionType": { "type": "string" },
"sets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"symbol": { "type": "string" },
"contractions": {
"shell": { "type": "string" },
"matrix": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"datatype": { "type": "string" },
"rows": { "type": "number" },
"columns": { "type": "number" },
"delimiter": { "type": "string" },
"values": { "type": "string" }
}
}
}
}
}
}
}
}
27 changes: 27 additions & 0 deletions schema/calculation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Calculation Schema",
"description": "JSON schema for a calculation",
"type": "object",
"properties": {
"@id": { "type": "string" },
"approach": { "type": "string" },
"calcclass": { "type": "string" },
"calcType": { "type": "string" },
"submethod": { "type": "string" },
"calculations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"class": { "type": "string" },
"calcType": { "type": "string" },
"referenceState": { "type": "string" },
"determinant": { "type": "string" },
"spin#": { "type": "string" }
}
}
}
}
}
17 changes: 17 additions & 0 deletions schema/chemical.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Methodology CC Schema",
"description": "JSON schema for a methodology",
"type": "object",
"properties": {
"@id": { "type": "string" },
"name": { "type": "string" },
"sourcetype": { "type": "string" },
"vendor": { "type": "string" },
"grade": { "type": "string" },
"properties": {
"type": "array",
"items": {"$ref": "parameter.json"}
}
}
}
38 changes: 38 additions & 0 deletions schema/computer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Calculation Schema",
"description": "JSON schema for a calculation",
"type": "object",
"properties": {
"@id": { "type": "string" },
"architecture": { "type": "string" },
"cpu": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"opmodes": { "type": "string" },
"count": { "type": "number" },
"speed": { "type": "string" },
"vendorid": { "type": "string" },
"family": { "type": "string" },
"model": { "type": "string" },
"modelname": { "type": "string" }
}
},
"byteorder": { "type": "string" },
"threadspercore": { "type": "number" },
"corespersocket": { "type": "number" },
"sockets": { "type": "number" },
"cache": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"l1datacache": { "type": "string" },
"l1instcache": { "type": "string" },
"l2cache": { "type": "string" },
"l3cache": { "type": "string" }
}
},
"ram": { "type": "string" }
}
}
34 changes: 34 additions & 0 deletions schema/dataseries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Data Series Schema",
"description": "JSON schema for a data series",
"type": "object",
"properties": {
"@id": { "type": "string" },
"label": { "type": "string" },
"axis": { "type": "string" },
"uid": { "type": "string" },
"parameter": {
"type": "object",
"required": [ "@id" ],
"properties": {
"@id": { "type": "string" },
"datatype": { "type": "string" },
"numberarray": {
"type": "array",
"items": {
"type": "number"
}
},
"quantity": { "type": "string" },
"valuearray": {
"@id": { "type": "string" },
"textarray": {
"type": "array",
"items": { "type": "string" }
}
}
}
}
}
}
64 changes: 64 additions & 0 deletions schema/dataset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Data Set Schema",
"description": "JSON schema for a data set",
"type": "object",
"properties": {
"@id": { "type": "string" },
"datapoint": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"scope": { "type": "string" },
"quantity": { "type": "string" },
"property": { "type": "string" },
"value": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"number": { "type": "string" },
"unitstr": { "type": "string" }
}
}
}
}
},
"datagroup": {
"type": "array",
"items": {"$ref": "#/definitions/datagroup"}
}
},
"definitions": {
"datagroup" : {
"type": "object",
"items": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"scope": { "type": "string" },
"group": { "type": "string" },
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": { "type": "string" },
"number": { "type": "number" }
}
}
},
"dataseries": {
"type": "array",
"items": {"$ref": "dataseries.json"}
},
"datagroup": {
"type": "array",
"items": {"$ref": "#/definitions/datagroup"}
}
}
}
}
}
}
Loading

0 comments on commit 3d0e6c3

Please sign in to comment.