DerwenAI / kglab

Graph Data Science: an abstraction layer in Python for building knowledge graphs, integrated with popular graph libraries – atop Pandas, NetworkX, RAPIDS, RDFlib, pySHACL, PyVis, morph-kgc, pslpython, pyarrow, etc.
https://derwen.ai/docs/kgl/
MIT License
574 stars 65 forks source link

Add rdf-tests algebra #253

Closed Mec-iS closed 2 years ago

Mec-iS commented 2 years ago

@Tpt Can you give some insight about the error You performed a query operation requiring a dataset (i.e. ConjunctiveGraph), but operating currently on a single graph. I have run into that while running the algebra and dataset in sparql11/data-r2/

Tpt commented 2 years ago

@Mec-iS It's because some tests make use of the GRAPH keyword like https://github.com/DerwenAI/kglab/pull/253/files#diff-d1e949a1d9b8b35b287e78553953b70345bc735110d0638995fa909a527b2d72 These tests requires the existance of multiple graphs and not a single graph just like the rdflib Graph class if providing. I believe it would be safer to run SPARQL tests using the Dataset class that matches well the definition of a "RDF dataset" in the SPARQL specification.

Mec-iS commented 2 years ago

@ceteri should we consider returning a Dataset or have an option to make KnowledgeGraph to return a dataset instead of a graph?

ceteri commented 2 years ago

@ceteri should we consider returning a Dataset or have an option to make KnowledgeGraph to return a dataset instead of a graph?

Good question! @Mec-iS so far kglab has not had support for the rdflib notion of a Dataset or for multi-graphs. We'd need to rework the internally quite a lot, I believe.

For now, let's disable the tests for these cases. I'd like to get some consensus on Slack and Twitter among the kglab community about what's needed here – I'll ask, or take some polls.