lambdamusic / Ontospy

Python library and command-line interface for inspecting and visualizing RDF models aka ontologies.
http://lambdamusic.github.io/Ontospy/
MIT License
219 stars 52 forks source link

Improving Ontodocs to display concepts labels instead of URIs #96

Closed vemonet closed 2 years ago

vemonet commented 3 years ago

Improvement already mentioned in this issue: https://github.com/lambdamusic/Ontospy/issues/82

Example of an ontology docs generated using this new version: https://vemonet.github.io/semanticscience/browse/entities-tree-classes.html

I mostly replaced .qname by .bestLabel in the links rendering in the templates (and utils.py for the classes tree)

Thanks a lot for ontospy, it's a really useful and easy to use tool for ontology manipulation!

lambdamusic commented 2 years ago

I get the underlying intent here, however this update is inconsistent with those (preexisting) use-cases where one does want to use qnames.

Hence this PR fundamentally changes the existing functionalities, rather than extending them.

I'll think of a solution where end users can decide what kind of 'default' label should be used..

lambdamusic commented 2 years ago

This feature is now included in https://github.com/lambdamusic/Ontospy/releases/tag/v1.9.9.1

eg ontospy gendocs -l --preflabel label

vemonet commented 2 years ago

Thanks a lot @lambdamusic !

I was looking into adding a CLI option to my changes, when I realized you already did it, and it works as expected