-
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
Export to rdf/xml #53
Conversation
Pull Request Test Coverage Report for Build 13182082025Details
💛 - 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.
77be8a7
to
f020504
Compare
70fa399
to
bf100a8
Compare
TODO:
|
Added extraction of id after instantiation as the class name Fix testing
Added _base_attrs to BaseEntity property Added entities_to_rdf cli
Fix encoding in rdf file
Using only rdfs and dc for annotations Restricted pydantic version
Deleted inheritance from ObjectType and other types
Changed OWL.Class to OWL.Thing Added descriptions for relationships
Added duplicated_property_types function in CLI
73fc526
to
c6f078d
Compare
@carlosmada22 this is ready. I am not sure if you want to do a review of this, it got really big as I was fixing a few things... The summary by Copilot worked nicely, better than what I could have written |
This pull request introduces several new features and improvements to the
bam_masterdata
project, including the addition of RDF export functionality, enhanced validation for property types, and updates to the metadata definitions and entities. The most important changes are summarized below:New Features:
bam_masterdata/cli/cli.py
,bam_masterdata/cli/entities_to_rdf.py
). [1] [2]Validation Enhancements:
bam_masterdata/cli/cli.py
). [1] [2]Metadata Updates:
id
field toEntityDef
class and updated model validation to generateid
fromcode
(bam_masterdata/metadata/definitions.py
). [1] [2]BaseEntity
class to enhance entity handling (bam_masterdata/metadata/entities.py
).Bug Fixes:
property_types.py
by renaming them (bam_masterdata/datamodel/property_types.py
). [1] [2]Minor Improvements:
bam_masterdata/cli/fill_masterdata.py
). [1] [2] [3]