Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pydantic generated classes #380

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ install:
poetry install
.PHONY: install

all: gen-project gendoc gen-excel get-context
all: gen-project gendoc gen-excel get-context gen-pydantic
%.yaml: gen-project
deploy: all mkd-gh-deploy

Expand Down
5 changes: 5 additions & 0 deletions project.Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
## Add your own custom Makefile targets here
# Added by H2
EXCEL_DIR = $(DEST)/excel
PYDANTIC_DIR = $(DEST)/pydantic

gen-excel:
mkdir -p $(EXCEL_DIR)
$(RUN) gen-excel --output $(EXCEL_DIR)/sssom_schema.xlsx $(SOURCE_SCHEMA_PATH)

gen-pydantic:
mkdir -p $(PYDANTIC_DIR)
$(RUN) gen-pydantic $(SOURCE_SCHEMA_PATH) > $(PYDANTIC_DIR)/sssom_schema.py

build:
poetry build

Expand Down
Binary file modified project/excel/sssom_schema.xlsx
Binary file not shown.
47 changes: 47 additions & 0 deletions project/graphql/sssom_schema.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
# metamodel_version: 1.7.0
type LiteralMapping
{
literal: String!
literalDatatype: Uri
predicateId: EntityReference!
predicateLabel: String
predicateModifier: PredicateModifierEnum
objectId: EntityReference!
objectLabel: String
objectCategory: String
mappingJustification: EntityReference!
authorId: [EntityReference]
authorLabel: [String]
reviewerId: [EntityReference]
reviewerLabel: [String]
creatorId: [EntityReference]
creatorLabel: [String]
license: Uri
literalSource: EntityReference
literalSourceVersion: String
objectType: EntityTypeEnum
objectSource: EntityReference
objectSourceVersion: String
mappingProvider: Uri
mappingSource: EntityReference
mappingCardinality: MappingCardinalityEnum
mappingTool: String
mappingToolVersion: String
mappingDate: Date
confidence: Double
objectMatchField: [EntityReference]
matchString: [String]
literalPreprocessing: [EntityReference]
objectPreprocessing: [EntityReference]
similarityScore: Double
similarityMeasure: String
seeAlso: [String]
other: String
comment: String
}

type Mapping
{
subjectId: EntityReference!
Expand Down Expand Up @@ -100,3 +142,8 @@ type MappingSetReference
localName: String
}

type Propagatable
{
propagated: Boolean
}

Loading
Loading