Release Notes

This release adds new features and enhancements to Nexus Forge as well as bug fixes.

New Features

Resolving

  • Added ontology resource resolving based on skos:prefLabel and skos:altLabel in addition to label and skos:notation. #245 (Binder_Querying to try it)

Modeling

  • Add support for validation against a schema. #217 (Binder_Modeling to try it)

from kgforge.core import KnowledgeGraphForge
# see https://github.com/BlueBrain/nexus-forge/blob/master/examples/notebooks/use-cases/prod-forge-nexus.yml for a full forge config example.
forge = KnowledgeGraphForge(configuration="./config.yml", **kwargs)
person = Resource(type="Person", name="Jane Doe")
# By default the schema associated with the resource type is picked for validation. A different type can be set using the type_ argument.
forge.validate(person, type_="Agent")

Enhancements

Querying

Binder_Querying to try the querying enhancements.

  • Added support for searching using filters (except when Paths syntax is used) from _store_metadata properties (i.e _createdAt, _updatedAt,…) #224 #240 (issue #209)

  • Added support for searching using datetime filters which can be specify as string suffixed with ^^xsd:dateTime #224

from kgforge.core import KnowledgeGraphForge
# see https://github.com/BlueBrain/nexus-forge/blob/master/examples/notebooks/use-cases/prod-forge-nexus.yml for a full forge config example.
forge = KnowledgeGraphForge(configuration="./config.yml", **kwargs)
filters = {
       "type": "Dataset",
       "_createdAt":'"2022-04-12T21:29:14.410Z"^^xsd:dateTime'
      }
forge.search(filters)
  • Added support for disabling SPARQL rewriting when a correct SPARQL is provided #224 (issue #218)

  • Inline query limit/offset arguments are now superseded by limit/offset provided as argument for forge.search() #224 (issue #189)

  • Added support for IN SPARQL clause when rewriting SPARQL queries in forge.search() #240 (issue #242)

  • Using filters as argument when calling forge.search(*filters, **params) now raises an exception #240

  • When using BlueBrainNexusStore, forge.retrieve() and forge.search() now get the original registered JSON payload to avoid any JSON transformation #232

  • forge.search() returns resources at the exact revision they are stored in the configured searchendpoint and no longer at the latest revision. As a consequence search results are no longer _sychronized #232

  • _last_action property is now added to resources obtained from forge.retrieve() #232

  • Added the property distribution.atLocation.store.type and distribution.atLocation.store.type._rev to BlueBrainNexusStore file metadata mapping file #232

  • When using BlueBrainNexusStore, it is possible to set (in the forge config file) GET params when calling forge.retrieve() `#232

Converting

Binder_JSON-LD-IO to try the JSON-LD enhancements.

  • forge.as_jsonld(r, form=”expanded”) now outputs expanded JSON-LD with @value added for literals. #244

  • forge.as_jsonld(r, form=”compacted”) keeps unchanged JSON null values and arrays. The param array_as_set is no longer needed and is thus removed along with the na argument #244

Resolving

Binder_Querying to try the resolving enhancements.

Bug Fixes

  • Added an identifier and the forge model configured JSON-LD context to resources obtained from an ElasticSearch query #238 (issue #230) (Binder_Querying to try it)

  • Fixed failing SPARQL query rewriting when a used JSON-LD context term does not have @id #231

Changelog

Full changelog