Repository navigation
Description
Parent
What to build
Move the two large command builders and the dispatch out of Run.ts. After this ticket Run.ts holds no command-building code.
command/raxmlNg.ts:raxmlNgArgs( run: RaxmlNgInput, platform: Platform ): CmdArg[][].command/raxml.ts:raxmlArgs( run: RaxmlInput, platform: Platform ): CmdArg[][].command/index.tsgainscommandArgs( run: CommandInput, platform: Platform ): CmdArg[][], the dispatch that today lives in theargsgetter.
Each builder declares its own input interface in its own file, listing only the members it reads, mirroring the nesting Run has today. The partition choice (havePartitionFile, partitionFile, finalAlignment: { path, partitionFilePath, partition: { isDefault } }) and the two constraint trees ({ isSet, filePath }) are shared pieces used by both. Value types are copied as they are, including numRepetitions.value and numRepetitionsNg.value as number | string. CommandInput is the intersection of the four builder inputs plus usesAstral, usesModeltestNg and usesRaxmlNg; it must be a type intersection, because the two builders read different parts of tree. The full typed shape is in commandInput.prototype.ts; copy from it, don't merge its branch.
In Run.ts: the raxmlNgArgs and raxmlArgs methods are removed, and the args getter becomes return commandArgs( this, { windows } );. Imports that only the builders used (for example lodash/remove) leave with them.
Builder bodies move with this. replaced by run. and no other edit. Comments move with the code, including the old Python command notes. The 495-line RAxML switch is not restructured. The RAxML-NG ancestral-states builder keeps choosing its partition by "more than one alignment".
Add one small direct test per builder file that runs the builder on a plain object for both platforms.
Acceptance criteria
-
command/raxmlNg.tsandcommand/raxml.tsexist with the signatures above, andcommand/index.tsexportscommandArgs - No file under
command/importsRun, MobX orhost -
Runhas noraxmlArgsorraxmlNgArgsmember, and itsargsgetter only callscommandArgs - The moved builder bodies differ from the originals only by
this.becomingrun.; their comments moved with them - One direct test per builder file runs it on a plain object with
windows: trueandwindows: false - No command pin snapshot file appears in the diff
- The two
@ts-expect-errorlines instartandstartAstralare unchanged - No view,
RunOptions.ts,Alignment.tsorFinalAlignment.tschanges -
yarn verifypasses
Activity
Move the RAxML and RAxML-NG command builders out of Run.ts (#422) (#425)
jtklein-agents commentedon Nov 27, 2026
Merged into spec/419-split-command-building-out-of-run-ts in #425 (966414f).