-
Notifications
You must be signed in to change notification settings - Fork 21
Model querying, loading local ontology in memory #351
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
base: master
Are you sure you want to change the base?
Conversation
68d2bfe to
93c99d4
Compare
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.
This is the parameter ontology, I assume a dummy ontology file would be more appropriate
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.
Yes, you could keep just a part of the file, not all of it
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've made the file shorter
d667953 to
6034d3d
Compare
kgforge/specializations/models/rdf/rdf_model_service_from_directory.py
Outdated
Show resolved
Hide resolved
kgforge/specializations/models/rdf/rdf_model_service_from_store.py
Outdated
Show resolved
Hide resolved
kgforge/specializations/models/rdf/rdf_model_service_from_store.py
Outdated
Show resolved
Hide resolved
| self._load_shape(self.context.expand(dependency)) | ||
|
|
||
| def _type_shape(self, iri: URIRef): | ||
| def _load_and_get_type_shape(self, iri: URIRef) -> ShapeWrapper: |
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 actual return type is Shape.
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.
_shapes_graph is a ShapesGraphWrapper, and the lookup_shape_from_node method is overridden, and the shape is being wrapped in a ShapeWrapper, no?
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #351 +/- ##
==========================================
+ Coverage 74.36% 74.45% +0.08%
==========================================
Files 100 101 +1
Lines 6315 6376 +61
==========================================
+ Hits 4696 4747 +51
- Misses 1619 1629 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
db7a865 to
651f198
Compare
651f198 to
642f340
Compare
|
Hasn't been updated in a while, out of sync, to refresh |
DKE-1239
Modelarchetype.get_context_prefix_vocababstract method toModelarchetype: the reason for this is that when rewriting sparql queries, you need to use the context. However,BlueBrainNexus(the store) cannot simply just use aContextobject, because it is merging the metadata context's document with the data context's document, and keeping data context's vocab, and the data context's prefixes. As a result, if you want to use theSparqlQueryBuilder(to do sparql queries, which is what we're trying to enable), you need to implement this function that returns prefixes, a context document (as a dict) and prefixes.Contextinto a dict from theReadOnlyStoreto theContextclass: formatting theContextis no longer just aReadOnlyStore's concern, but aModelmay need to as well. In any case, it's the manipulation of aContext, so it makes sense for it to live there.get_modelandget_storeaccessors inKnowledgeGraphForgeRdfModelService:_build_shapes_mapmethod to implement: it returns the shapes into a Graph, a dictionary indicating the source the shape originates from, and a dictionary that says which class is constrained by which shape. By centralizing it in the same method (which was not the case before), it enables knowing which file contained which schema (for the implementation inRdfModelServiceFromDirectory)RdfModelServiceFromDirectory: formerly namedDirectoryService,get_shape_sourcecan now be implemented (formerly namedschema_source_id) due to the change inRdfModelServicebase classspecializations.stores.service: bug with the context cache not being used fixed