-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add files for new uo import #1633
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest looks good. Thanks!
src/scripts/uo/extract-uo-module.sh
Outdated
@@ -0,0 +1,22 @@ | |||
# Download current UO release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document, which release exactly is imported. Ideally, here and in changelog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to change the link as well (the one in the previous commit pointed to "whichever version is most current"), but now it should point at a specific version, which has been added to both the description and the change log
I only ran in one problem where sed was not adding a new line when introducing the new namespace. I had to fix it manually. But it is probably because I am using a windows computer. Otherwise I can reproduce the results 100% from the script. How were we importing UO before? what happened to that file? Edit: We can probably get rid of uo-module isn't it? |
Yes, getting rid of the old import file (uo-module) should be fine. |
I'd be fine to delete the old module once the new import is done. Are you palnning to do that in a separate PR @h-spinde ? |
I was planning to leave the file in for transparancy's sake (so that users can still see the contents of the current import in their local repo) and only remove it once all files use the new import, but if that's not a concern I can also add the deletion of this file to this pull request |
To summarise the current status of this pull request and future plans: Currently, the old import file for the UO (uo-module.owl) is still being used. This is because imports have the form |
Summary of the discussion
As propsed in issue #1612 this updates the UO import process.
To this end I have created a script that automatically extracts everything listed in "uo-w-hierarchy.txt" (thus named in case other modules need to be imported without their hierarchy later on) and creates an owl-file (uo-extracted.owl) in the imports directory.
The current list of imported modules is composed of every UO class mentioned in any of the files under src/ontology.
This script also automatically updates the classes so that their definitions are displayed as "definition" (iao_0000115) instead of "rdfs:comment". To realise this, the Sed Stream Editor is utalised, which was accordingly added to "requirements.txt".
What this PR does not do:
Import the new uo-extracted.owl file into the ontology.
This can currently be done manually in Protege, but since imports have the form
Import: <http://openenergy-platform.org/ontology/oeo/dev/imports/module-to-be-imported.owl>
they can only be added to the oeo files once they have been uploaded to the appropriate site.
Type of change (CHANGELOG.md)
Added
Workflow checklist
PR-Assignee
Reviewer