VirtualFlyBrain / VFB_json_schema

VFB json schema spec + code for rolling queries producing VFB json schema + related integration tests
Apache License 2.0
0 stars 0 forks source link

VFB_json_schema PDB schema tests

VFB json schema spec + code for rolling queries producing VFB json schema + related integration tests

PDB Staging Dev P2
Build1 Build2 Build3 Build4

How to add a query:

Queries are composed of clauses. Clauses are encoded by functions in vfb_query_builder.query_roller.QueryLibraryCore. There main arguments are used to construct a clause (see pydoc for full args): MATCH : A Match statement - it is generally safer to use OPTIONAL MATCH here in case no info is returned. WITH: defines what goes in the WITH statement that follows. This might be used to define simple literals (e.g expression_level) or blobs of JSON - most typically minimal node info. vars: list of vars from the with clause to pass along in subsequent with clauses and into the return clause.

Queries typically start with a 'term' clause.

To add a new query:

  1. Add new clauses to query_roller.QueryLibraryCore

e.g.

  1. Add any new keys specified in vars to the relevant JSON schema doc.

  2. Add a query to the query_library using the querybuilder function, e.g.

  3. Add a new test to the relevant test library,

e.g.