Skip to content

Commit

Permalink
Working webpage
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore committed May 25, 2024
1 parent 45863c1 commit 05cb8da
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 17 deletions.
13 changes: 7 additions & 6 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ book: docs
jupyter-book build ../static

.PHONY: docs
docs: ../static/core/core.yaml
gen-doc ../static/core/core.yaml -d ../static/core/ --hierarchical-class-view -vvv --log_level=DEBUG --stacktrace
docs: ../static/core/model.yaml
cp index.md ../static/core/index.md
gen-project ../static/core/model.yaml -d ../static/core/

../static/core/core.yaml:
validate:
linkml-validate --legacy-mode -s ../static/core/model.yaml

../static/core/model.yaml:
mkdir ../static/core
./mklinkml.py ../static/core

validate:
linkml-validate --legacy-mode -s ../static/core/core.yaml

.PHONY: clean
clean:
rm -rf ../static/core
9 changes: 9 additions & 0 deletions src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# OME Core Model

Other resources:

* {download}`./jsonld/model.jsonld`
* {download}`./jsonld/model.context.jsonld`
* {download}`./shex/model.shex`
* {download}`./owl/model.owl.ttl`
* {download}`./excel/model.xlsx`
10 changes: 5 additions & 5 deletions src/linkml.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id: https://ld.openmicroscopy.org/core
name: core
id: https://ld.openmicroscopy.org/core/
name: OME-Core-Model

description: |-
Linked data description of the OME Data Model
Expand All @@ -12,7 +12,7 @@ imports:
- linkml:types

prefixes:
core: https://ld.openmicroscopy.org/core
core: https://ld.openmicroscopy.org/core/
linkml: https://w3id.org/linkml/
schema: http://schema.org/
rdfs: http://www.w3.org/2000/01/rdf-schema#
Expand Down Expand Up @@ -51,9 +51,9 @@ classes:
{%- endif %}

description: |-
```

{{ schema.get("description", "TODO") | indent(8) }}
```


{%- if schema["mixins"] %}
mixins:
Expand Down
2 changes: 1 addition & 1 deletion src/mklinkml.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def generate(output_dir):
print(f"Processing {name}...")
classes[name] = schema

with open(os.path.join(output_dir, "core.yaml"), "w") as o:
with open(os.path.join(output_dir, "model.yaml"), "w") as o:
o.write(template.render(classes=classes, enums=enums))


Expand Down
2 changes: 2 additions & 0 deletions static/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
core
_build
7 changes: 4 additions & 3 deletions static/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ root: index

parts:

- caption: Core model
file: core/index
- caption: Models
chapters:
- glob: core/*
- file: core/index
- glob: core/docs/*
- glob: core/docs/types/*
2 changes: 0 additions & 2 deletions static/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@

This [JupyterBook](https://jupyterbook.org/) provides a
landing page for the Linked Data support in OME ("ome-ld").

![logo](logo.png "OME logo")

0 comments on commit 05cb8da

Please # to comment.