Skip to content

Put a template's indexed image first in Examples - #119

Merged
Robbie1977 merged 1 commit into
mainfrom
feature/examples-index-first
Sep 15, 2026
Merged

Robbie1977 merged 1 commit into
mainfrom
feature/examples-index-first

Conversation

@Robbie1977

@Robbie1977 Robbie1977 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Part of VirtualFlyBrain/VFB2#500.

What changed: Examples records now carry index (from channel_image.image.index[0] when present), and each template's list is ordered by a new order_template_examples(): indexed images first, index ascending, then the rest by id descending as before.

Why: an image with an index is a domain in that template's label volume, so it belongs to the template and should lead Available Images. The index was in the vfb_json term_info but dropped here, so nothing downstream could use it.

How to test: python -m unittest test.test_examples_order from src/. Against live vfb_json, term_info_parse_object for FBbt_00003748 now gives JRC2018U VFB_00102107 (index 3) first, followed by the seven unindexed images newest first. Previously it came last.

Follow-ups: cached get_term_info entries keep the old order until they expire or are refreshed. Only order changes (plus an extra optional field), so I've not bumped the major.minor namespace. force_refresh on the neuropil classes that have more than one image on a template is enough. geppetto-vfb needs the matching carousel change (VirtualFlyBrain/geppetto-vfb#1744) or it re-sorts by id.

An image with an index is a domain in that template's label volume, so it
belongs to the template and should lead the Available Images carousel.
Examples records now carry the index and each template's list is ordered
indexed-first (index ascending), then by id descending as before.

Refs VirtualFlyBrain/VFB2#500
@github-actions

Copy link
Copy Markdown

⚠️ 165 test(s) skipped — an upstream data source was unreachable

The full suite ran, but 165 test(s) were skipped because an upstream data source (VFB's Neo4j / SOLR / Owlery, or FlyBase's Chado) did not answer during this run.

These are not failures and not a problem with this branch — but those queries went unverified, so a green check here is an incomplete run.

To re-run: open this workflow run and click Re-run all jobs once the data sources are healthy (re-running the “Run completeness” check itself does nothing — it has no job behind it).

686 passed, 165 skipped, 339 warnings in 582.06s (0:09:42)

Posted automatically. This comment is removed once a run completes with zero skips.

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