Conversation
|
Then click all panels, all work. Save to test.xml, and run beast. The results are produced: Loading /tmp/step/step99/likelihood.log, burnin 50%, skipping 500 log lines |---------|---------|---------|---------|---------|---------|---------|---------| Calculating statistics |---------|---------|---------|---------|---------|---------|---------|---------| marginalLs[99 ] = -9557.113325560467 Step theta likelihood contribution ESS marginal L estimate = -5240.616524529081 Total wall time: 120 seconds |
…rapper sites #131 BeautiDoc: the inner-"mcmc" redirect added in f6a369c was applied to connect() only. scrubAll() calls connect() and disconnect() as the two branches of one decision, so with a wrapper Runnable objects were connected to the inner MCMC but never removed from it again -- disconnect() resolved the wrapper, and getInput(inputName) threw IllegalArgumentException into the catch-and-print, silently doing nothing. Extract the redirect as redirectToInnerMCMC() and use it from both. Also give disconnect(BeautiConnector, PartitionContext) the same targetID='mcmc' -> runnable ID translation connect() already has; this is a no-op for the shipped templates, whose runnable is literally id="mcmc". OperatorListInputEditor and MRCAPriorInputEditor read MCMC inputs off doc.mcmc.get() without a cast ("operatorschedule", "operator"), so they were missed by the cast sweep, but they fail the same way: getInput()/setInputValue() throw IllegalArgumentException for an unknown input name. Route both through doc.getMCMC(). This is what still broke the Operators panel and the tip-date sampling toggle for a PathSampler-style runnable.
|
Seems reasonable to me |
|
Reviewed this carefully. The approach is right and the sweep is complete for its stated scope — Two functional gaps in the PR's own scope, both fixed in #133 (stacked on
Remaining, for you to decide:
Happy to approve once 1/2 are in (via #133 or your own fix) and 3 is resolved either way. 4–7 are cleanup I wouldn't block on. |
Make disconnect() symmetric with connect(), and cover two remaining wrapper sites

see #131
Summary
BEAUti's
BeautiDoc.mcmcinput is typed asbeast.base.inference.Runnable, but most ofbeast-fx assumed it was always safe to hard-cast it to
MCMC. That assumption breaks forwrapper Runnables — e.g.
modelselection.inference.PathSampler(from the model-selectionpackage, see BEAST2-Dev/model-selection#15) — which hold their own
MCMCvia a named input"mcmc"instead of extendingMCMCdirectly. Selecting such a template in BEAUti threwClassCastExceptionfrom a dozen+ call sites (Partitions, Clock Model, Site Model, StateNode Initialiser, Operators/connectors, Methods-section text generation).
Changes
BeautiDoc.getMCMC()/BeautiDoc.getMCMC(Runnable): return the value as-is if it'salready an
MCMC, otherwise unwrap its inner"mcmc"input if present, otherwisenull.(MCMC) doc.mcmc.get()/(MCMC) mcmc.get()hard casts withdoc.getMCMC()throughout
BeautiDoc,BeautiConnector,BeautiPanel,BeautiTabPane,AlignmentListInputEditor,ClockModelListInputEditor,StateNodeInitialiserListInputEditor,SiteModelInputEditor(both packages),XML2Text,XML2HTMLPane,XML2HTMLPaneFX, and theBeautiBasetest helper; add null-checks where awrapper may have no MCMC yet.
BeautiDoc.connectByInput(): if a<connect targetID='mcmc' .../>target lacks therequested input but has an inner
"mcmc"input that does, retry against that inner object.BeautiPanelConfig: same fallback when resolving a panel's configured input path, so panelsbuilt against a plain
MCMC(Partitions, Priors, Operators, ...) still populate correctly.XML2Text/XML2HTMLPane/XML2HTMLPaneFX: stop pre-casting a freshly parsed file'stop-level object to
MCMCbefore storing it — keep the realRunnableand letgetMCMC()unwrap it on demand.