vO.6.1 Release Notes

This release adds new enhancements:

  • to the Nexus Forge’s SPARQL query rewriting by supporting DISTINCT and Graph clauses when using forge.search()

  • to Dataset which can now be created from Resource instances

  • to the BlueBrainNexus store specialization by supporting cross bucket download as well as more configuration options (BlueBrainNexus store’s max_connection when searching and http headers for its endpoint, ElasticSearch and SPARQL views, files upload and download)

Enhancements

  • Added cross bucket download support in Nexus Forge core and in the BlueBrainNexus store specialization. #146, #147 (usage: 04 - Querying notebook on Github or on Binder)

from kgforge.core import KnowledgeGraphForge
from kgforge.specializations.resources import Dataset

forge = KnowledgeGraphForge("config_filepath_or_url")
dataset = Dataset(forge, name="Interesting dataset")
dataset.add_distribution("path/to/file.jpg", content_type="image/jpeg")
forge.register(dataset)
#Download with the Dataset
dataset.download(dataset, cross_bucket=True)
#Download with forge
forge.download(dataset, cross_bucket=True)
  • SPARQL query rewriting now supports DISTINCT and Graph clauses when performing forge.search(). #144 (usage: 04 - Querying notebook on Github or on Binder)

from kgforge.core import KnowledgeGraphForge
from kgforge.specializations.resources import Dataset
forge = KnowledgeGraphForge(configuration="config_filepath_or_url")

filters = {"type":"Dataset"}
# Filter by type using a dictionary and get distinct results looked up within named graphs
distinct_results_filters = forge.search(filters, distinct=True, search_in_graph=True)
  • Added configuration support (#148) for:

    • BlueBrainNexus store’s max_connection number when searching

    • BlueBrainNexus store’s endpoint, ElasticSearch and SPARQL views, files upload and download http headers.

The BlueBrainNexus store’s SPARQL endpoint default http headers are changed to text/plain for Content-Type and application/sparql-results+json for Accept.

  • Added creation of Dataset instance from Resource instances. #150 (usage: 02 - Datasets notebook on Github or on Binder)

from kgforge.core import KnowledgeGraphForge
from kgforge.specializations.resources import Dataset, Resource
forge = KnowledgeGraphForge(configuration= "config_filepath_or_url")
resource = Resource(name="Jane Doe", type="Person", email="jane.doe@example.org")
dataset = Dataset.from_resource(forge, resource, store_metadata=True)