OpenEnergyPlatform / ontology

Repository for the Open Energy Ontology (OEO)
Creative Commons Zero v1.0 Universal
106 stars 19 forks source link

Export of exsting terms and definitions #1020

Closed carstenhoyerklick closed 1 year ago

carstenhoyerklick commented 2 years ago

Description of the issue

I have been asked for a list of existing terms and defintions as list, e.g. in a pdf file.

Ideas of solution

I general it can be done with the export function of the robot library: http://robot.obolibrary.org/export. I will try to setup a unix script which can generate a nicly formatted list of terms based on the robot library.

Workflow checklist

l-emele commented 2 years ago

I gave the issue a proper title.

For documentation: We discussed today at the OEO DEV meeting, that it would be also nice, to produce such a file during the release process. On option would to be to export a list of IDs, labels (terms) and definitions to an markdown file that is then part of the repo.

stap-m commented 2 years ago

Once created, the list should be linked on the OEP @Ludee

l-emele commented 2 years ago

@markus-rothkoetter or @sfluegel05 : Are you familiar enough with ROBOT to create such a script for the release process?

markus-rothkoetter commented 2 years ago

@l-emele It shouldn't be a problem from the ROBOT-side for me. Their HTML export is super. Also a conversion to e.g. PDF via pandoc is straightforward.

I haven't been part of a release-session, yet. So, concerning the exact integration into release-process I cannot comment (yet). Maybe I can simply attend the next release session.

Concerning time allocation I won't find time before the next release as I'm focusing on the script-stuff for #1154

l-emele commented 2 years ago

That is no problem. This is not a super urgent issue and and it is therefore not necessary to have such a script already for the next release. I thus moved the issue to the release milestone 1.12.0.

The last state of discussion was that the script should produce a markdown file and not HTML or a PDF file, see my comment above.

Maybe @mglauer can give some advice in how to best include such a script in the release process?

markus-rothkoetter commented 2 years ago

@l-emele Perfect, thanks for the clarification concerning the timeline. Then I'll take care of it.

Conversion to Markdown will definitely require e.g. pandoc for conversion as there is no native Markdown export from ROBOT, afaik, but this won't be a problem, I think.

markus-rothkoetter commented 1 year ago

Unassigning myself, as @stage1407 has taken over this issue.

stage1407 commented 1 year ago

There is a little problem, because the definitions contain symbols like ',' and '\t', so .csv and .tsv are not suitable for this problem. I will look for a better solution in the next days. Nevertheless, the current version of the script is already available under the respective feature branch.

MGlauer commented 1 year ago

You can quote fields in double quotes in CSV

The row

"A,B"," C"

Contains two fields.

stage1407 commented 1 year ago

I tried this now and found out that it was not because of that, but because of how the export command in ROBOT handles line breaks. For example, in line 11,12 of src/ontology/edits/oeo-social.omn, ROBOT reads a definition that contains '\n' and does not process it as the contents of the definition when converting to a .csv file. This causes another part of the definition to be written to a new line of the .csv, breaking the format. I could try other file formats. But if they are coded and serialized the same by ROBOT, then I could still try owlready2 or we reconsider using new lines in definitions.

l-emele commented 1 year ago

The associated pull request #1319 was merged. Is there a reason why this issue is still open.

areleu commented 1 year ago

I don't think so