Skip to content

COO-220 Initial scaffolding of cli tool for eregion - #10

Open
prkrtg wants to merge 1 commit into
mainfrom
COO-220-Initial-scaffolding-of-cli-tool-for-eregion
Open

COO-220 Initial scaffolding of cli tool for eregion#10
prkrtg wants to merge 1 commit into
mainfrom
COO-220-Initial-scaffolding-of-cli-tool-for-eregion

Conversation

@prkrtg

@prkrtg prkrtg commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

The CLI uses the typer library. Initially I was planning on using Python's argparse, however since prefect also uses typer , typer was a good option especially since I'm imagining the CLI over time does multiple subcommands, is config-driven, etc. Out of the box the library handles things we'd have to build by hand.

For the initial scaffolding of the cli tool, it calls the commands run and validate of the yaml file

Sample of using validate

% eregion validate src/eregion/configs/pipeline_flows/masterbias_example.yaml 
2026-08-10 21:40:43,132 - PipelineConfig - INFO - Config loaded from file 'src/eregion/configs/pipeline_flows/masterbias_example.yaml'
2026-08-10 21:40:43,132 - eregion.pipeline.engine - INFO - Number of pipelines defined: 2
2026-08-10 21:40:43,726 - eregion.pipeline.engine - INFO - Pipeline order: [('calib_flow',), ('preproc_flow',)]
2026-08-10 21:40:43,726 - eregion.pipeline.engine - INFO - Pipeline calib_flow order: [('calib_flow.image_creator',), ('calib_flow.master_bias',)]
2026-08-10 21:40:43,726 - eregion.pipeline.engine - INFO - Pipeline preproc_flow order: [('preproc_flow.image_creator', 'calib_flow.master_bias'), ('preproc_flow.bias_subtraction',), ('preproc_flow.overscan_subtraction',), ('preproc_flow.badpixel_masking',)]
Config OK: 2 pipeline(s) defined.

pipeline generation 0: ['calib_flow']
    [calib_flow] step 0: ['calib_flow.image_creator']
    [calib_flow] step 1: ['calib_flow.master_bias']
pipeline generation 1: ['preproc_flow']
    [preproc_flow] step 0: ['calib_flow.master_bias', 'preproc_flow.image_creator']
    [preproc_flow] step 1: ['preproc_flow.bias_subtraction']
    [preproc_flow] step 2: ['preproc_flow.overscan_subtraction']
    [preproc_flow] step 3: ['preproc_flow.badpixel_masking']

No tasks were executed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant