-
Notifications
You must be signed in to change notification settings - Fork 0
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
Interface with webprotege #53
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 12949275347Details
💛 - Coveralls |
|
||
|
||
def entities_to_rdf( | ||
graph: "Graph", module_path: str, logger: "BoundLoggerLazyProxy" |
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.
How does the "Graph" class work? Does it inserts everything inside the file already nested?
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.
Graph is the class to describe the triples in notologies, and hence when printing to RDF/XML already has the format looked for
"triples" are normally 2 nodes connected via a relationship. Something like: (node_1, relationship, node_2)
, which you can see some examples when using Graph.add()
. Basically it is a way of defining DAGs.
Here the complication is not printing to RDF/XML, or to create the Graph, but actually mapping the openBIS info into the triples.
Added extraction of id after instantiation as the class name Fix testing
Added _base_attrs to BaseEntity property Added entities_to_rdf cli
784aa8f
to
b8c2430
Compare
Fix encoding in rdf file
Using only rdfs and dc for annotations Restricted pydantic version
TODO:
|
Deleted inheritance from ObjectType and other types
77be8a7
to
f020504
Compare
Changed OWL.Class to OWL.Thing Added descriptions for relationships
Closes #35
@carlosmada22 do you mind reviewing this? It is working quite well, I can also drive you through the WebProtege thingy to export from the generated
.owl
file, but it is quite easyList of main changes:
export_to_rdf
CLIentities_to_rdf.py
moduleto_rdf()
method for BaseEntity in entities.pyid
field of entities (instead ofcode
). This is extracted without the need of populating it when defining a new entity.