Contributing
We welcome contributions to this collection of Ontology Design Patterns. Whether you have a new pattern, an improvement to an existing one, or a bug fix, your help is valued.
Getting Started
- Fork the repository and clone it locally.
- Create a new branch for your contribution:
git checkout -b my-pattern - Make your changes following the guidelines below.
- Push and open a Pull Request against
main.
Adding a New Pattern
- Copy the template from
Patterns/template.md. - Create a folder under
Patterns/<OntologyName>/<requirement>/. - Add your pattern file (
.ttlpreferred) and fill in the template with:- Motivation — What modeling problem does this solve?
- Intent — What is the goal of the pattern?
- Competency Questions — What questions can be answered using this pattern?
- Diagram — A visual representation (optional but recommended).
- Examples — At least one usage example with instance data.
- References — Links to related ontologies, papers, or standards.
- Ensure your
.ttlfile is valid by parsing it withrdfliborROBOT:
Adding a New Ontology
- Place the ontology file (
.ttl,.owl,.rdf, or.obo) in theOntologies/directory. - The build pipeline will automatically extract entities and generate documentation.
- If the ontology has import dependencies, ensure they are resolvable or provide a merged version.
Code Style
- Turtle files: Use consistent prefix declarations and indentation.
- Python: Follow PEP 8 conventions for any build script changes.
- Markdown: Use standard GitHub-flavored Markdown.
CI Checks
Pull requests are automatically checked by CI workflows:
- Build Test — The MkDocs site builds successfully with your changes.
- Validation — ROBOT and rdflib verify ontology and pattern files have no errors.
Please ensure all checks pass before requesting a review.
Reporting Issues
Found a bug, broken link, or incorrect pattern? Open an issue with:
- A clear description of the problem.
- Steps to reproduce (if applicable).
- The affected file(s) or URL(s).