-
Notifications
You must be signed in to change notification settings - Fork 560
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
Draft: Dataset add named graph #2592
base: main
Are you sure you want to change the base?
Conversation
TODO: add tests and other needed methods
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.
Thanks for the draft PR @Murloc6 - I'm not sure that the setter for identifier will interface properly with the backing store.
I'm also not entirely sure about named graph, I think we need to ensure the semantics is clear for this in terms of pre and post conditions, but if it will ensure all triples in g will go into the graph named named_graph_identifier
then it is good.
@@ -2522,6 +2530,13 @@ def add_graph( | |||
"""alias of graph for consistency""" | |||
return self.graph(g) | |||
|
|||
def add_named_graph( | |||
self, named_graph_identifier: IdentifiedNode, g: Optional[Union[_ContextIdentifierType, _ContextType, str]] |
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.
self, named_graph_identifier: IdentifiedNode, g: Optional[Union[_ContextIdentifierType, _ContextType, str]] | |
self, identifier: IdentifiedNode, graph: Optional[Union[_ContextIdentifierType, _ContextType, str]] |
I'm not sure why g/graph is not of type Graph
though, which it ideally should be. It could also maybe be worth it to take Iterable[_TripleType]
as type.
Can we add |
We should get rid of Graph.identifier but |
Maintainers will try to incorporate all these changes into a new Dataset API scheduled for RDFLib 8.x due for release in late 2024 |
This is a draft PR to add to the discussion from #2591