Skip to content

Commit

Permalink
linkml-1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Aug 19, 2021
1 parent 7c63429 commit 7c711a3
Show file tree
Hide file tree
Showing 10 changed files with 502 additions and 206 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SCHEMA_NAMES = $(patsubst $(SCHEMA_DIR)/%.yaml, %, $(SOURCE_FILES))

SCHEMA_NAME = kgcl
SCHEMA_SRC = $(SCHEMA_DIR)/$(SCHEMA_NAME).yaml
TGTS = graphql jsonschema ldcontext docs owl csv graphql python shex
TGTS = graphql jsonschema ldcontext docs owl csv graphql python shex sql

#GEN_OPTS = --no-mergeimports
GEN_OPTS =
Expand All @@ -22,10 +22,10 @@ t:
echo:
echo $(patsubst %,gen-%,$(TGTS))

test: all pytest
test: all test_framework

pytest:
pytest
test_framework:
pipenv run python -m unittest discover -p 'test_*.py'

install:
. environment.sh
Expand Down Expand Up @@ -80,7 +80,7 @@ target/ldcontext/%.context.jsonld: $(SCHEMA_DIR)/%.yaml tdir-ldcontext

### -- SQL schema --
# TODO: modularize imports. For now imports are merged.
gen-sqlddl: target/sql/$(SCHEMA_NAME).schema.sql
gen-sql: target/sql/$(SCHEMA_NAME).schema.sql
target/sql/%.schema.sql: $(SCHEMA_DIR)/%.yaml tdir-sql
gen-sqlddl $(GEN_OPTS) --dialect sqlite $< > $@

Expand Down
20 changes: 20 additions & 0 deletions graphql/kgcl.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,26 @@ type LogicalDefinition
{
}

type MappingCreation implements Creation
{
id: String!
wasGeneratedBy: Activity
seeAlso: String
pullRequest: String
creator: String
changeDate: String
contributor: String
hasUndo: Change
oldValue: String
newValue: String
aboutEdge: Edge
subject: Node
predicate: Node
object: Node
annotationSet: Annotation
changeDescription: String
}

type MultiNodeObsoletion
{
id: String!
Expand Down
99 changes: 93 additions & 6 deletions jsonschema/kgcl.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$id": "https://w3id.org/kgcl",
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": true,
"definitions": {
"Activity": {
"additionalProperties": false,
Expand Down Expand Up @@ -190,7 +191,7 @@
"type": "string"
},
"owl_type": {
"type": "string"
"$ref": "#/definitions/OwlTypeEnum"
},
"pull_request": {
"type": "string"
Expand Down Expand Up @@ -225,7 +226,7 @@
"type": "string"
},
"owl_type": {
"type": "string"
"$ref": "#/definitions/OwlTypeEnum"
}
},
"required": [
Expand Down Expand Up @@ -260,7 +261,7 @@
"type": "string"
},
"synonym_predicates": {
"$ref": "string"
"$ref": null
}
},
"required": [],
Expand Down Expand Up @@ -636,7 +637,7 @@
"type": "string"
},
"owl_type": {
"type": "string"
"$ref": "#/definitions/OwlTypeEnum"
}
},
"required": [
Expand Down Expand Up @@ -697,6 +698,71 @@
"title": "LogicalDefinition",
"type": "object"
},
"MappingCreation": {
"additionalProperties": false,
"description": "A specific kind of edge creation in which the created edge is a mapping.",
"properties": {
"about_edge": {
"$ref": "#/definitions/Edge"
},
"annotation_set": {
"$ref": "#/definitions/Annotation"
},
"change_date": {
"type": "string"
},
"change_description": {
"type": "string"
},
"contributor": {
"type": "string"
},
"creator": {
"type": "string"
},
"has_undo": {
"description": "A change that reverses this change",
"type": "string"
},
"id": {
"type": "string"
},
"new_value": {
"description": "The value of a property held in the new instance of the ontology",
"type": "string"
},
"object": {
"description": "This corresponds to object_id in SSSOM",
"type": "string"
},
"old_value": {
"description": "The value of a property held in the old instance of the ontology",
"type": "string"
},
"predicate": {
"description": "This corresponds to predicate_id in SSSOM. The value of this is typically a predicate from SKOS",
"type": "string"
},
"pull_request": {
"type": "string"
},
"see_also": {
"type": "string"
},
"subject": {
"description": "This corresponds to subject_id in SSSOM",
"type": "string"
},
"was_generated_by": {
"type": "string"
}
},
"required": [
"id"
],
"title": "MappingCreation",
"type": "object"
},
"MultiNodeObsoletion": {
"additionalProperties": false,
"description": "A complex change consisting of multiple obsoletions.",
Expand Down Expand Up @@ -913,7 +979,7 @@
"type": "string"
},
"owl_type": {
"type": "string"
"$ref": "#/definitions/OwlTypeEnum"
}
},
"required": [
Expand Down Expand Up @@ -1061,7 +1127,7 @@
"type": "string"
},
"owl_type": {
"type": "string"
"$ref": "#/definitions/OwlTypeEnum"
},
"pull_request": {
"type": "string"
Expand Down Expand Up @@ -1747,6 +1813,16 @@
"title": "OntologySubset",
"type": "object"
},
"OwlTypeEnum": {
"description": "",
"enum": [
"CLASS",
"OBJECT_PROPERTY",
"NAMED_INDIVIDUAL"
],
"title": "OwlTypeEnum",
"type": "string"
},
"PlaceUnder": {
"additionalProperties": false,
"description": "An edge creation where the predicate is owl:subClassOf",
Expand Down Expand Up @@ -2154,6 +2230,17 @@
"title": "SynonymReplacement",
"type": "object"
},
"SynonymScopeEnum": {
"description": "",
"enum": [
"related",
"broad",
"narrow",
"exact"
],
"title": "SynonymScopeEnum",
"type": "string"
},
"TextDefinitionReplacement": {
"additionalProperties": false,
"description": "A node change where a text definition is modified",
Expand Down
Loading

0 comments on commit 7c711a3

Please sign in to comment.