Batch 2: close v2 parity on 8 image/dataset/expression queries#43
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the v2 to v2-dev column gaps the parity sweep flagged after v1.10.1 + v1.11.0:
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