Skip to content

Improve documentation examples and comparison#53

Merged
cmungall merged 4 commits intomainfrom
docs/improve-examples
Mar 23, 2026
Merged

Improve documentation examples and comparison#53
cmungall merged 4 commits intomainfrom
docs/improve-examples

Conversation

@cmungall
Copy link
Copy Markdown
Member

Summary

  • Rewrote docs/examples.md — replaced the auto-generated test dump with curated examples covering annotations, existential/universal restrictions, equivalent classes (genus-differentia), disjoint unions, hidden GCIs, data properties, enums mapped to ontology terms, individuals, axiom annotations, Jinja templates, f-strings, GCI meta-patterns, and integration with existing ontologies. Added a summary table of all OWL annotation keywords.
  • Rewrote docs/comparison.md — side-by-side comparison of the same axiom generated via hand-written OWL, ROBOT templates, DOSDP, and linkml-owl, with a feature comparison table and guidance on when to choose each tool.
  • Added docs/example-schemas/ — working anatomy schema and data files (anatomy-schema.yaml, anatomy-data.yaml, defined-anatomy-data.yaml, organ-parts-data.yaml) demonstrating basic structures, equivalent class definitions, and template-based axiom generation. All verified to compile with linkml-data2owl.
  • Fixed Python version in usage.md (3.10+, not 3.8+).

Test plan

  • All example schemas compile with linkml-data2owl
  • mkdocs build succeeds
  • Review rendered docs on the site

🤖 Generated with Claude Code

Rewrite docs/examples.md with curated examples covering the full range of
linkml-owl features: annotations, existential/universal restrictions, equivalent
classes (genus-differentia), disjoint unions, hidden GCIs, data properties,
enums mapped to ontology terms, individuals, axiom annotations, Jinja templates,
f-string shortcuts, GCI meta-patterns, and integration with existing ontologies.

Rewrite docs/comparison.md with side-by-side comparisons showing the same
axiom generated via hand-written OWL, ROBOT templates, DOSDP, and linkml-owl,
with a clear summary table of feature differences.

Add docs/example-schemas/ with a working anatomy schema and data files that
demonstrate basic structures, equivalent class definitions, and template-based
axiom generation.

Fix Python version requirement in usage.md (3.10+, not 3.8+).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings March 20, 2026 16:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refreshes the project documentation by replacing the auto-generated example dump with curated, task-oriented examples and adding a clearer side-by-side comparison against other OWL/template frameworks, backed by new working example schemas/data.

Changes:

  • Rewrote docs/examples.md into a curated examples showcase with schema/data/OFN snippets and a keyword summary table.
  • Rewrote docs/comparison.md with feature matrices and a worked “same axiom across tools” comparison.
  • Added a working anatomy example schema + data files under docs/example-schemas/, and updated documented minimum Python version to 3.10+.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/usage.md Updates documented minimum Python version to 3.10+.
docs/examples.md Replaces auto-generated test output with curated examples and runnable guidance.
docs/comparison.md Adds structured comparison and guidance for choosing LinkML-OWL vs alternatives.
docs/example-schemas/anatomy-schema.yaml Introduces a concrete schema demonstrating key LinkML-OWL patterns.
docs/example-schemas/anatomy-data.yaml Provides baseline anatomy instance data to generate OWL from the example schema.
docs/example-schemas/defined-anatomy-data.yaml Adds data focused on genus–differentia (EquivalentClasses/IntersectionOf) patterns.
docs/example-schemas/organ-parts-data.yaml Adds data focused on template-driven “organ with parts” axiom generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/examples.md Outdated
Comment on lines +716 to +722
ObjectSomeValuesFrom(
ObjectIntersectionOf( {{genus}}
ObjectSomeValuesFrom(
{{differentia_relation}}
ObjectSomeValuesFrom( {{propagation_relation}}
{{differentia_filler}} ))))
ObjectSomeValuesFrom(
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GCIPropagationMetapattern Jinja example appears to emit invalid OWL Functional Syntax: ObjectSomeValuesFrom must have a property and a filler, but here it wraps ObjectIntersectionOf(...) without providing the property argument. Rework the pattern so SubClassOf relates the intended intersection antecedent directly to the inferred consequent.

Suggested change
ObjectSomeValuesFrom(
ObjectIntersectionOf( {{genus}}
ObjectSomeValuesFrom(
{{differentia_relation}}
ObjectSomeValuesFrom( {{propagation_relation}}
{{differentia_filler}} ))))
ObjectSomeValuesFrom(
ObjectIntersectionOf( {{genus}}
ObjectSomeValuesFrom(
{{differentia_relation}}
ObjectSomeValuesFrom( {{propagation_relation}}
{{differentia_filler}} )))
ObjectSomeValuesFrom(

Copilot uses AI. Check for mistakes.
cmungall and others added 3 commits March 20, 2026 13:13
…rison

Add realistic domain examples demonstrating linkml-owl for real-world
ontology engineering workflows:

- Disease ontology (Mondo-style): disease-schema.yaml with DiseaseByLocation,
  DiseaseByAgent, and DiseaseWithInheritance metaclasses showing
  genus-differentia definitions, enum-based inheritance modes, and
  conditional Jinja templates.

- Phenotype ontology (HPO/uPheno-style): phenotype-schema.yaml with
  EntityQualityPhenotype metaclass showing the EQ decomposition pattern
  using nested ObjectIntersectionOf with enum-resolved PATO qualities.

- Quick-start guide (quickstart.md): complete 5-minute walkthrough from
  install to generated OWL, with a self-contained schema and data example.

- Extended comparison.md with a second side-by-side comparison showing
  Mondo's disease-by-location pattern across ROBOT templates, DOSDP,
  and linkml-owl.

- Extended examples.md with disease and phenotype sections showing
  verified OWL output from the new schemas.

All 7 example schemas verified to compile with linkml-data2owl.
mkdocs build passes.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The original examples.md is generated from test_owl_dumper and serves as
a reference for all supported OWL patterns. New examples were added as
separate files in docs/example-schemas/ and are linked from quickstart.md.
Add four new metaclasses to owl_dumper_test.yaml demonstrating
disease ontology patterns commonly used in projects like Mondo:

- DiseaseClass: basic named SubClassOf hierarchy
  (e.g. lung cancer SubClassOf cancer)
- DiseaseByLocation: genus-differentia with anatomical location
  (e.g. brain disease EquivalentTo nervous-system-disorder AND
  has-disease-location some brain)
- DiseaseByPhenotype: genus-differentia with phenotypic feature
  (e.g. parkinsonism EquivalentTo disease AND has-phenotype some tremor)
- DefinedDisease: intersection with multiple differentiae
  (e.g. disease AND has-location some brain AND has-phenotype some tremor)

Add corresponding add_check() entries in test_owl_dumper.py with
axiom assertions. Add disease_location (RO:0004026) and has_phenotype
(RO:0002200) slots. Regenerate docs/examples.md from test output.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@cmungall cmungall merged commit bb042e7 into main Mar 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants