Closed SeanBryan51 closed 10 months ago
The current method of executing subcommands can be improved using a "parse and dispatch" strategy. Whereby you don't need to run a conditional to work out which subcommand to use.
See: https://github.com/AusClimateService/axiom/blob/54de78d3c490800bdf6806e15a1e8d23f2e82430/bin/axiom#L207
I basically set the desired command as a default on the sub parser and then pop it to call when dispatching.
https://github.com/AusClimateService/axiom/blob/54de78d3c490800bdf6806e15a1e8d23f2e82430/bin/axiom#L15
Originally posted by @bschroeter in https://github.com/CABLE-LSM/benchcab/pull/191#pullrequestreview-1707340422
The current method of executing subcommands can be improved using a "parse and dispatch" strategy. Whereby you don't need to run a conditional to work out which subcommand to use.
See: https://github.com/AusClimateService/axiom/blob/54de78d3c490800bdf6806e15a1e8d23f2e82430/bin/axiom#L207
I basically set the desired command as a default on the sub parser and then pop it to call when dispatching.
https://github.com/AusClimateService/axiom/blob/54de78d3c490800bdf6806e15a1e8d23f2e82430/bin/axiom#L15
Originally posted by @bschroeter in https://github.com/CABLE-LSM/benchcab/pull/191#pullrequestreview-1707340422