-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6585de1
commit e81cd85
Showing
11 changed files
with
155 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
RUN = poetry run | ||
|
||
# Test documentation locally | ||
serve: mkd-serve | ||
|
||
gendoc: $(DOCDIR) | ||
# DO NOT REMOVE: these cp statements are crucial to maintain the w3 ids for the model artifacts | ||
cp $(DEST)/owl/information_resource_registry.owl.ttl $(DOCDIR)/information_resource_registry.owl.ttl ; \ | ||
cp $(DEST)/jsonld/information_resource_registry.context.jsonld $(DOCDIR)/information_resource_registry.context.jsonld ; \ | ||
cp $(DEST)/jsonld/information_resource_registry.context.jsonld $(DOCDIR)/context.jsonld ; \ | ||
cp $(DEST)/jsonld/information_resource_registry.jsonld $(DOCDIR)/information_resource_registry.jsonld ; \ | ||
cp $(DEST)/jsonschema/information_resource_registry.schema.json $(DOCDIR)/information_resource_registry.json ; \ | ||
cp $(DEST)/graphql/information_resource_registry.graphql $(DOCDIR)/information_resource_registry.graphql ; \ | ||
cp $(DEST)/shex/information_resource_registry.shex $(DOCDIR)/information_resource_registryn.shex ; \ | ||
cp $(DEST)/shacl/information_resource_registry.shacl.ttl $(DOCDIR)/information_resource_registry.shacl.ttl ; \ | ||
cp infores_catalog.yaml $(DOCDIR) ; \ | ||
cp $(SRC)/information_resource_registry/schema/information_resource_registry.yaml $(DOCDIR) ; \ | ||
cp $(SRC)/docs/*md $(DOCDIR) ; \ | ||
cp -r $(SRC)/docs/images $(DOCDIR)/images ; \ | ||
# the .json cp here is the data required for the d3 visualizations | ||
# this supports the display of our d3 visualizations | ||
cp $(SRC)/docs/*.css $(DOCDIR) ; \ | ||
$(RUN) gen-doc -d $(DOCDIR) --template-directory $(SRC)/$(TEMPLATEDIR) $(SOURCE_SCHEMA_PATH) | ||
|
||
testdoc: gendoc serve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
SCHEMA_NAME = $(shell ${SHELL} ./utils/get-value.sh name) | ||
SOURCE_SCHEMA_PATH = $(shell ${SHELL} ./utils/get-value.sh source_schema_path) | ||
SOURCE_SCHEMA_DIR = $(dir $(SOURCE_SCHEMA_PATH)) | ||
SRC = src | ||
DEST = project | ||
PYMODEL = $(SRC)/information_resource_registry/datamodel | ||
DOCDIR = docs | ||
EXAMPLEDIR = examples | ||
TEMPLATEDIR = doc-templates | ||
|
||
# environment variables | ||
include config.env | ||
|
||
GEN_PARGS = | ||
ifdef LINKML_GENERATORS_PROJECT_ARGS | ||
GEN_PARGS = ${LINKML_GENERATORS_PROJECT_ARGS} | ||
endif | ||
|
||
GEN_DARGS = | ||
ifdef LINKML_GENERATORS_MARKDOWN_ARGS | ||
GEN_DARGS = ${LINKML_GENERATORS_MARKDOWN_ARGS} | ||
endif | ||
|
||
test-schema: gen-project | ||
|
||
infores: | ||
$(RUN) gen-python src/information_resource_registry/schema/information_resource_registry.yaml > src/information_resource_registry/datamodel/information_resource_registry.py | ||
# generates all project files | ||
|
||
gen-project: $(PYMODEL) | ||
# keep these in sync between PROJECT_FOLDERS and the includes/excludes for gen-project and test-schema | ||
$(RUN) gen-project \ | ||
--exclude excel \ | ||
--include graphql \ | ||
--include jsonld \ | ||
--exclude markdown \ | ||
--include prefixmap \ | ||
--include proto \ | ||
--include shacl \ | ||
--include shex \ | ||
--exclude sqlddl \ | ||
--include jsonldcontext \ | ||
--include jsonschema \ | ||
--exclude owl \ | ||
--include python \ | ||
--include rdf \ | ||
-d $(DEST) $(SOURCE_SCHEMA_PATH) | ||
$(RUN) gen-pydantic --pydantic-version 2 src/information_resource_registry/schema/information_resource_registry.yaml > $(PYMODEL)/pydanticmodel_v2.py | ||
$(RUN) gen-owl --mergeimports --no-metaclasses --no-type-objects --add-root-classes --mixins-as-expressions src/information_resource_registry/schema/information_resource_registry.yaml > $(DEST)/owl/information_resource.owl.ttl | ||
$(MAKE) infores |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.