Skip to content

feat: Unified binary (CLI)#252

Draft
Charlotte-Knight wants to merge 7 commits into
mainfrom
unified_binary
Draft

feat: Unified binary (CLI)#252
Charlotte-Knight wants to merge 7 commits into
mainfrom
unified_binary

Conversation

@Charlotte-Knight
Copy link
Copy Markdown
Contributor

@Charlotte-Knight Charlotte-Knight commented Jun 1, 2026

User interface

This PR adds the MCMCTutorial executable to the unified CLI introduced in MaCh3 core by this PR: mach3-software/MaCh3#917.

This executable is now accessed via the tutorial subcommand, like:

mach3 tutorial TutorialConfigs/FitterConfig.yaml

Upon running mach3 tutorial --help, you get:

Usage:  tutorial [--help] [--MCMCSteps VAR] [--override VAR]... CONFIG

Positional arguments:
  CONFIG       Config file. [required]

Optional arguments:
  -h, --help   shows help message and exits
  --MCMCSteps  specify the number of steps.
  --override   specify any config overrides. [may be repeated]

and you can identify the --override option which allows users to override config yaml as before, e.g.

mach3 tutorial TutorialConfigs/FitterConfig.yaml --override General:MCMC:NSteps:100000

and we have added a special option for the number of MCMC steps, so you could instead write:

mach3 tutorial TutorialConfigs/FitterConfig.yaml --MCMCSteps 100000

The advantage of having options like --MCMCSteps is that they are visible upon calling mach3 tutorial --help so we recommend implementing options like this for the configurables that are most often changed. For the sake of the tutorial, we may also want to add --outputfile, for example.

When overriding the config, the usual standard output like this:

[MaCh3Factory.cpp][info] Overriding setting: Section=General, Key=MCMC, Key=NSteps, Value=1000

is shown, regardless of whether you use --MCMCSteps or --override.

Future Plans

We may also want to update the tutorial README with this PR, but this depends on how we want to introduce the CLI. Until we have all of the executables implemented, I suggest making a small mention that the CLI exists, e.g. in a block like

Tip

A MaCh3 CLI is in development, you can try it already by running this command with mach3 tutorial ... instead. Please provide feedback etc...

Implementation

TODO

Deprecation warning for MCMCTutorial still needs to be added.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

This is your first PR, thank you for contributing to MaCh3!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants