clearex.io.cli
Functions
Create the primary ClearEx command-line parser. |
|
Print the ClearEx ASCII logo to stdout. |
|
|
Resolve the imaging round integer from CLI or environment. |
Parse SLURM-related command-line arguments. |
- clearex.io.cli.parse_slurm_args()
Parse SLURM-related command-line arguments.
This convenience helper builds an argparse.ArgumentParser configured to accept common SLURM-related options used by the registration workflow and returns the parsed namespace.
- Parameters:
None –
- Returns:
Namespace with parsed values for
imaging_roundandsave_directory.- Return type:
argparse.Namespace
Notes
The function does not inspect environment variables; it only parses command-line arguments. Use
get_imaging_round()to resolve a final imaging round value that may come from the CLI or environment.
- clearex.io.cli.get_imaging_round(cli_value)
Resolve the imaging round integer from CLI or environment.
The function returns the imaging round with the following priority: 1. The explicitly provided
cli_value(if notNone). 2. TheIMAGING_ROUNDenvironment variable (if set and an integer). 3. TheSLURM_ARRAY_TASK_IDenvironment variable (if set and an integer). 4. A fallback default of3.- Parameters:
cli_value (Optional[int]) – Value provided on the CLI; if not
Nonethis is returned directly.- Returns:
The resolved imaging round integer.
- Return type:
int
- Raises:
ValueError – If an environment variable is present but cannot be parsed as an integer.
- clearex.io.cli.create_parser()
Create the primary ClearEx command-line parser.
- Parameters:
None –
- Returns:
Parser configured with data input options, workflow selections, and GUI/headless execution controls.
- Return type:
argparse.ArgumentParser
- clearex.io.cli.display_logo()
Print the ClearEx ASCII logo to stdout.
- Parameters:
None –
- Returns:
The function prints output and does not return a value.
- Return type:
None