Skip to content

Commit

Permalink
Rewriting ontodoc based on domain-battery (#742)
Browse files Browse the repository at this point in the history
# Description
Rewriting and simplifying the ontodoc tool based on domain-battery. For now the python module is called ontodoc_rst.py.

For each module, document:
- classes
- object properties
- data properties
- annotation properties
- individuals
- datatypes

## Tasks done so far (see #759 for remaining tasks):
- [x] Reproduce all information included in the [battery.rst](https://github.com/emmo-repo/domain-battery/blob/master/sphinx/battery.rst) file
- [x] Add tooling for creating other needed files, like `index.rst` (just a template that the user can improve)
- [x] Add a new ontodoc script/tool - instead of adding a new tool, the old ontodoc tool was extended to support `.rst` output. It doesn't run sphinx automatically, though...

## Type of change
- [ ] Bug fix.
- [x] New feature.
- [ ] Documentation update.
- [x] Test update.

Co-authored-by: francescalb <[email protected]>
  • Loading branch information
jesper-friis and francescalb authored May 25, 2024
1 parent 60dda59 commit 15c7e76
Show file tree
Hide file tree
Showing 16 changed files with 856 additions and 60 deletions.
3 changes: 3 additions & 0 deletions docs/api_reference/ontopy/ontodoc_rst.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ontodoc_rst

::: ontopy.ontodoc_rst
2 changes: 1 addition & 1 deletion ontopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
from owlready2 import onto_path


__all__ = ("patch", "World", "get_ontology", "onto_path")
__all__ = ("__version__", "World", "get_ontology", "onto_path")
2 changes: 2 additions & 0 deletions ontopy/excelparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,8 @@ def _add_entities(
owlready2.DataPropertyClass,
]:
rowheader = "subPropertyOf"
else:
raise TypeError(f"Unexpected `entitytype`: {entitytype!r}")

# Dictionary with lists of entities that raise errors
entities_with_errors = {
Expand Down
Loading

0 comments on commit 15c7e76

Please sign in to comment.