fix failed Beauti tests #143 - #144
Merged
Merged
Conversation
BeautiSimpleTest still used the clickOn/eraseText/write pattern that setPartitionTableCell was introduced to replace, so it remained subject to the focus race that appends instead of replaces the cell text. AlignmentListInputEditor's cell factory sets the same id and combo box graphic on every TableCell it creates, including the recycled cells backing empty rows, and those keep a live action handler. An unfiltered lookup could therefore return an empty cell, whose action handler calls tableEntries.get(-1). Match the cell on visibility and row index, and fail with a clear message when no such cell exists.
Make partition table cell edits deterministic (review of #144)
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.
issue #143
All 6 partition-deletion tests in LinkUnlinkTest are now fixed and re-enabled (StarBeast test left disabled per your earlier instruction). Summary:
Root cause: There wasn't actually a partition-deletion cleanup bug in Beauti itself — deletion of ClockPrior/tree priors already worked correctly. The real bug was in the test helper assertParameterCountInPriorIs (BeautiBase.java): it only recognized the legacy beast.base.inference.distribution.Prior class, which no fxtemplate uses anymore. BEAST3's new spec priors (Gamma, LogNormal, Dirichlet, etc., all extending TensorDistribution) wrap both the target parameter and their own hyperparameters (e.g. alpha/theta) directly, so the helper always counted 0 for them.
Fixes:
i. BeautiBase.assertParameterCountInPriorIs now also handles TensorDistribution-based priors, counting each prior's active StateNode objects.
ii. LinkUnlinkTest.linkSiteModelsAndDeleteTest's hardcoded expected counts were updated (3→9, 5+3→14, 9+9→18, 6+6→13, 3+3→8) to reflect that BEAST3 priors carry extra hyperparameter objects the old counts didn't account for. I verified at each step that the assertPriorsEqual ID lists were clean (no stale entries from deleted partitions), confirming this is a counting-semantics fix, not a masked deletion bug.
iii. Removed the now-unused @disabled annotations and the unused Function import.