Skip to content

Batch 2: close v2 parity on 8 image/dataset/expression queries#43

Merged
Robbie1977 merged 1 commit into
mainfrom
feature/v2-parity-batch-2
May 29, 2026
Merged

Batch 2: close v2 parity on 8 image/dataset/expression queries#43
Robbie1977 merged 1 commit into
mainfrom
feature/v2-parity-batch-2

Conversation

@Robbie1977
Copy link
Copy Markdown
Contributor

Closes the v2 to v2-dev column gaps the parity sweep flagged after v1.10.1 + v1.11.0:

  • NeuronsPresynapticHere — Template_Space, Imaging_Technique (owlery helper extension)
  • TractsNervesInnervatingHere — Template_Space, Imaging_Technique (same)
  • LineageClonesIn — Template_Space, Imaging_Technique (same)
  • AlignedDatasets — Reference, License, Template_Space, Imaging_Technique, Images, Image_count (full Cypher rewrite)
  • AllDatasets — same column shape as AlignedDatasets
  • PaintedDomains — Definition (expose existing description in headers/rows)
  • TransgeneExpressionHere — Template_Space, Imaging_Technique, Images, Reference (replace delegate with proper Cypher)
  • SimilarMorphologyToNBexp — Type (pipe-joined via CALL subquery)

Expressed_in on TransgeneExpressionHere is the one prod column NOT in this PR — rendering shape needs design discussion. TODO in function body.

Each Cypher OPTIONAL chain is wrapped in CALL subqueries scoped to the row key, matching the pattern PR #42 introduced for get_similar_neurons. Shared helpers keep the AlignedDatasets/AllDatasets pair in lockstep.

Refs: projects/geppetto-vfbquery-migration/V2_V2DEV_PARITY_SWEEP.md

Live parity sweep against v2 prod (May 2026) flagged that v2-dev
/run_query returned a leaner column set than v2 SOLR-backed
processor for 8 queries, even after v1.10.1 batch fixed 6
image-bearing queries and v1.11.0 fixed get_similar_neurons.
Each gap is a single missing column or group the V2 frontend
already understands via COL_HEADER_MAP in uk.ac.vfb.geppetto
VFBqueryJsonProcessor, so the fix is upstream Cypher + schema
preview_columns.

Owlery-backed (Template_Space + Imaging_Technique)

Extend _owlery_query_to_results to extract template and technique
from the same anatomy_channel_image[0].channel_image SOLR structure
thumbnail already comes from. Bumps headers (both
_get_standard_query_headers and _get_neurons_part_here_headers)
and preview_columns for the three queries explicitly flagged:
NeuronsPresynapticHere, TractsNervesInnervatingHere, LineageClonesIn.

AlignedDatasets / AllDatasets (full v2 column shape)

Both functions previously returned only [id, name, tags]. Replace
with Cypher following prod XMI Datasets-available chain. Returns
pubs (Reference), license, template, technique, thumbnail,
image_count. Each branch wrapped in CALL subquery scoped to ds so
the outer carrier row stays one-per-ds. Shared helpers keep the
pair in lockstep.

PaintedDomains (Definition column)

Cypher already populated description; response builder did not list
it in headers/rows. Add it. COL_HEADER_MAP[description] = Definition.

TransgeneExpressionHere (replace delegate, add image columns)

Function previously delegated to get_expression_overlaps_here so
v2-dev got the lean 4-column output. Replace with proper Cypher
matching prod XMI dataSources.0/queries.7. Returns name (the ep),
pubs (Reference), tags, template, technique, thumbnail.
Expressed_in deferred — TODO comment in function body.

SimilarMorphologyToNBexp (Type column)

Mirrors the PR #42 / v1.11.0 fix for get_similar_neurons: add a
pipe-joined type column from primary INSTANCEOF Class inside a CALL
subquery so the outer row stays one-per-primary.

Files

src/vfbquery/vfb_queries.py
  - _owlery_query_to_results
  - _get_standard_query_headers, _get_neurons_part_here_headers
  - get_aligned_datasets, get_all_datasets (+ 3 shared helpers)
  - get_painted_domains
  - get_transgene_expression_here
  - get_similar_morphology_nb_exp
  - 5 *_to_schema preview_columns updates

Refs: projects/geppetto-vfbquery-migration/V2_V2DEV_PARITY_SWEEP.md
@Robbie1977 Robbie1977 merged commit ab0bc15 into main May 29, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant