Restrict Train Aligners to datasets with manual alignments - #176
Open
BeckettFrey wants to merge 1 commit into
Open
Restrict Train Aligners to datasets with manual alignments#176BeckettFrey wants to merge 1 commit into
BeckettFrey wants to merge 1 commit into
Conversation
Implements the counter-proposal from #166 instead of gating the sidebar step. Train Aligners stays reachable and browsable; the constraint is enforced where the user is already looking, at the point of selection. Both dropdowns now filter: - Dataset dropdown lists only datasets carrying at least one hand or corrected alignment. - Alignment dropdown lists only that dataset's manual alignments. An inline note above the dataset dropdown states the rule and the consequence, and is repeated as the dropdown's tooltip. Inline rather than tooltip-only on purpose: the message explains an absence, and a user whose dataset is missing has no reason to hover a control to find out why -- when the list is empty the dropdown is disabled anyway. The predicate lives in storage/alignments.py as is_manual_alignment, with list_manual_alignments and has_manual_alignments over it. It is defined as "not automatic" rather than an allow-list of {hand, corrected}, because create_corrected_alignment takes an arbitrary alignment_type string -- the Correct Alignments page exposes it as free text defaulting to "corrected", so values like "corrected-v2" reach storage and an allow-list would silently hide real hand-corrected work. The two empty states stay distinct. "No datasets registered" and "No datasets with manual alignments" are different problems: telling a user who already has datasets that none are registered would send them off to register a duplicate. Also folds the dataset-population logic in build_ui and reload_datasets into one method. Those two copies had already drifted -- build_ui showed Name/Date/Description while reload_datasets showed Name/Description/ID, so the columns changed under the user on tab switch. Both now use the Name/Date/Description form the other stackers use. Verified end to end against real storage, not just the mocks: a dataset whose only alignment is automatic is excluded from the dropdown, and one with a hand alignment is listed with that alignment selectable.
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.
No description provided.