Skip to content

#594 Added command line options to skip checkouts or stop after checkout - #595

Open
Joerg Henrichs (hiker) wants to merge 4 commits into
mainfrom
594_skip_checkout
Open

#594 Added command line options to skip checkouts or stop after checkout#595
Joerg Henrichs (hiker) wants to merge 4 commits into
mainfrom
594_skip_checkout

Conversation

@hiker

Copy link
Copy Markdown
Collaborator

A rather small change. It requires changes in the actual application scripts (since they are the ones actually doing any git/svn/... checkout). I've tested this with lfric_atm.

@github-actions github-actions Bot added the cla-required The CLA has not yet been signed by the author of this PR - added by GA label Aug 14, 2026
@github-actions github-actions Bot added cla-signed The CLA has been signed as part of this PR - added by GA and removed cla-required The CLA has not yet been signed by the author of this PR - added by GA labels Aug 14, 2026
Comment on lines +475 to +485
parser.add_argument(
'--checkout-only', action="store_true", default=False,
help=("Only do the checkout steps, not any actual build steps."
"This can be useful if checkout and compilation steps "
"need to run on different nodes."))
parser.add_argument(
'--skip-checkout', action="store_true", default=False,
help=("Do not do any checkouts. This flag can be used if a "
"checkout was already done, to just do the compilation. "
"This is useful if checkout and compilation needs to be "
"done on different nodes."))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 options are mutually exclusive. Is it worth explicitly marking them as such? Something along the lines of:

checkout_group = parser.add_mutually_exclusive_group()
checkout_group.add_argument('--checkout-only', action="store_true", default=False)
checkout_group.add_argument('--skip-checkout', action="store_true", default=False)

Otherwise, you can add an explicit check in handle_command_line_options. Something along the lines of:

if self.args.checkout_only and self.args.skip_checkout:
  raise RuntimeError(f"--checkout-only and --skip-checkout are mutually exclusive arguments")

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

Labels

cla-signed The CLA has been signed as part of this PR - added by GA

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants