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.
How does the "Graph" class work? Does it inserts everything inside the file already nested?
There was a problem hiding this comment.
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 |
* Added id as optional string to definitions Added extraction of id after instantiation as the class name Fix testing * Added rdflib to dependencies Added _base_attrs to BaseEntity property Added entities_to_rdf cli * Adding referenceTo and fixing properties of data type OBJECT * Ignoring typing in to_rdf function * Fix pydantic versioning problem for _base_attrs Fix encoding in rdf file * Added dataType and propertyLabel annotations Using only rdfs and dc for annotations Restricted pydantic version * Fix descriptions of annotated properties Deleted inheritance from ObjectType and other types * Adding back the placeholders for object, collections and datasets Changed OWL.Class to OWL.Thing Added descriptions for relationships * Renamed model_to_rdf for BaseEntity * Fixed code_to_class_name when the code does not exist * Added docstrings to entities_to_rdf.py * Fix duplicated property problems Added duplicated_property_types function in CLI * Moved duplicated_property_types to utils and added tests * Added testing for entities_to_rdf * Fix imports
This pull request introduces several new features and improvements to the
bam_masterdataproject, 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:
idfield toEntityDefclass and updated model validation to generateidfromcode(bam_masterdata/metadata/definitions.py). [1] [2]BaseEntityclass to enhance entity handling (bam_masterdata/metadata/entities.py).Bug Fixes:
property_types.pyby renaming them (bam_masterdata/datamodel/property_types.py). [1] [2]Minor Improvements:
bam_masterdata/cli/fill_masterdata.py). [1] [2] [3]