vO.5.2 Release Notes¶
This release adds enhancements and fixes bugs to both Nexus Forge core and specialization modules.
Enhancements¶
Querying¶
Added support for using dictionary as filters in forge.search(*filters, **params) -> List[Resource] when using BlueBrainNexus store. #117 (usage: 04 - Querying notebook on Github or on
)
from kgforge.core import KnowledgeGraphForge
forge = KnowledgeGraphForge("config_filepath_or_url")
# Search for resources of type Dataset with contributor of type Person and name "John Doe"
filters = {"type": "Dataset", "contribution":{"type":"Person"}, "name":"John Doe"}
resources = forge.search(filters, limit=3)
# The above dict filters are equivalent to the following path based filters:
path = forge.paths("Dataset")
resources = forge.search(path.type=="Dataset",
path.contribution.type =="Person",
path.contribution.name =="John Doe", limit=3)
Note
When providing a dictionary as filter to forge.search(*filters, **params) -> List[Resource]:
only the ‘==’ operator is supported.
in the contrary of path based filters, it is not mandatory for the provided properties and values to be defined in the forge Model.