You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a knowledge-mapper sparql config.yaml subcommand that starts a Knowledge Base with auto-generated ANSWER and REACT handlers, where each handler queries a SPARQL endpoint defined in the config.
Motivation
Simple "read-only" knowledge bases that expose existing SPARQL data to the KE network should require zero Python code — just a config file and one command.
Load and validate the config file using KnowledgeBaseSettings (or a subclass).
For each ANSWER/REACT KI in config: register it with an auto-generated handler that executes the configured SPARQL query, maps result variables to graph pattern variables (implicitly by name, or explicitly via variable_mapping), and returns the binding set.
Register the KB and start the handling loop.
On SIGINT/SIGTERM: unregister and exit cleanly.
Out of scope for this issue
ASK and POST interactions (no auto-handler, since they require knowing when to fire).
SQL and other data sources (separate issues when the time comes).
Implementation notes
Variable mapping: implicit (SPARQL var name == graph pattern var name) by default; explicit mapping optional per KI.
Use typer as the CLI framework (same as the run subcommand).
Goal
Add a
knowledge-mapper sparql config.yamlsubcommand that starts a Knowledge Base with auto-generated ANSWER and REACT handlers, where each handler queries a SPARQL endpoint defined in the config.Motivation
Simple "read-only" knowledge bases that expose existing SPARQL data to the KE network should require zero Python code — just a config file and one command.
Usage
Config structure (sketch)
Behaviour
KnowledgeBaseSettings(or a subclass).variable_mapping), and returns the binding set.Out of scope for this issue
Implementation notes
runsubcommand).