Put a template's indexed image first in Examples - #119
Merged
Merged
Conversation
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
|
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.
Part of VirtualFlyBrain/VFB2#500.
What changed:
Examplesrecords now carryindex(fromchannel_image.image.index[0]when present), and each template's list is ordered by a neworder_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_infobut dropped here, so nothing downstream could use it.How to test:
python -m unittest test.test_examples_orderfromsrc/. Against live vfb_json,term_info_parse_objectfor FBbt_00003748 now gives JRC2018UVFB_00102107(index 3) first, followed by the seven unindexed images newest first. Previously it came last.Follow-ups: cached
get_term_infoentries 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_refreshon 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.