ontology
ontology copied to clipboard
Export of existing terms and definitions #1020
Summary of the discussion
Create a script that writes an auto-generated glossary in a markdown table.
Type of change (CHANGELOG.md)
Added
Workflow checklist
Automation
Closes #
PR-Assignee
- [X] 🐙 Follow the Pull Request Workflow
- [ ] 📝 Update the CHANGELOG.md
- [ ] 📙 Add #'s to
term tracker item
Reviewer
- [X] 🐙 Follow the Reviewer Guide
- [ ] 🐙 Provided feedback and show sufficient appreciation for the work done
Thanks for the script @stage1407 Could you please add information (to the README?), where the glossary be accessible? Will the glossary be updated (automaticcaly), when there's a new release?
Yes, I have added this information. No, this has to be done manually in the terminal so far. But if this is to be automatic, then someone more familiar with the Makefile should implement this procedure. It should be nothing more than adding the command to the Makefile, but I don't know where in the Makefile. I think a new issue should be started for this one.
The python script is missing a requirements.txt this should include both pandas, openpyxl and tabulate. I would say that this requirements.txt should include also the dependencies of the rest of the scripts. I had to do some adjustments to be able to run it on windows but these are not critical as we are building this in github aren't we?
There is an issue with some terms appearing as IRIs. I think having all the term appearing as IRIs would be nice. Like making them into a link like:
Ok, got it working in GitHub. Now we need to find a place to put it. Should I publish it in the wiki for now?
I added the links feature. Please look at the Artifacts to get an idea how it looks like @stage1407 you might need to adapt your local environment so the script runs from the ontology base path. I did it like this so it is easier to call from the github actions
I added the links feature. Please look at the Artifacts to get an idea how it looks like @stage1407 you might need to adapt your local environment so the script runs from the ontology base path. I did it like this so it is easier to call from the github actions
https://github.com/OpenEnergyPlatform/ontology/actions/runs/3204865960 here is an example artifact
Now the list is being published in the wiki! 🎉 https://github.com/OpenEnergyPlatform/ontology/wiki/ETD
https://github.com/OpenEnergyPlatform/ontology/wiki/glossary Now we have to add it to the index and perhabs change the title to something more appealing
Now this pipeline will trigger ONLY in release
Currently it seems that GitHub is cutting down the table. We might need to divide it in different tables.
Now the list appears as a glossary in the wiki
Looks great, thanks! @areleu @stage1407 and @carstenhoyerklick can you please take a look?
Once we agreed on a final place (I like the idea of storing it in the wiki), we should also adjust the respective README.md and maybe link the glorrary to the main README.md, too. EDIT: And if it stays in the wiki, update wiki sidebar.
Once we agreed on a final place (I like the idea of storing it in the wiki), we should also adjust the respective README.md and maybe link the glorrary to the main README.md, too.
A while ago, we discussed in the OEO Dev meeting, that this should be part of the release cycle:
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.
Originally posted by @l-emele in https://github.com/OpenEnergyPlatform/ontology/issues/1020#issuecomment-1034915337
So it should be not only in the wiki, but also part of the files that is transferred to the OEP after release.
If I remember correctly, the OEP is able to render markdown files. Is that right, @wingechr ?
On one hand, I like having the the possibility to jump to a specific letter. But if I see correctly, there are now multiple markdown files. But the original idea was to export all definitions to one single file for easy for facilitate simple re-use.
On one hand, I like having the the possibility to jump to a specific letter. But if I see correctly, there are now multiple markdown files. But the original idea was to export all definitions to one single file for easy for facilitate simple re-use.
I don't think these have mutually exclusive. We can use the same script to generate a csv file on the side. The reason I divided it in different pages was that It seems that GitHub has a limit on the page height and it was being cut.
Okay then. I just wanted to avoid that we create a solution, that does not solve the original problem, ;)
I put this PR on the agenda for the next dev meeting to finalize it.
I added the changes we agreed on the last dev meeting. I will also add the option to upload a csv file with the list. I would like to know how can I integrate this into the OEP, is there a way to upload this with the API?
The existing terms and definitions are there as a table availible. We can output markdown and csv files. The open question is where this information should be made availible. Directly in the OEP? if so. How can this be made and where?
Independently of this, I think this PR can be merged as it does not break anything and any further changes needed for the OEP integration can be worked in a new one.
I think having both a markdown and a csv file to download on the OEP is fine as these target different users. The markdown file can probably also be rendered directly on the OEP.
EDIT: I opened an issue in the OEP repo: https://github.com/OpenEnergyPlatform/oeplatform/issues/1123
@stap-m If you look at the bottom of the job summary there is an optiion to download a zip file with the contents of the tables:
https://github.com/OpenEnergyPlatform/ontology/actions/runs/3713531310
Let me know if there is anything critical to change, otherwise I will just merge it.
Looks fine from my side!