Skip to content

Add new features to generate_workflows.sh#25

Draft
Copilot wants to merge 4 commits intodevelopfrom
copilot/fix-24
Draft

Add new features to generate_workflows.sh#25
Copilot wants to merge 4 commits intodevelopfrom
copilot/fix-24

Conversation

Copy link

Copilot AI commented Jul 1, 2025

This PR enhances the generate_workflows.sh script with several new features and improvements to provide better usability and flexibility for workflow generation.

Key Changes

Required Features

  • Made -A (account) option required: The script now validates that an HPC account is provided and fails with a clear error message if missing
  • Added build_compute.sh support: New -B/--build-compute option allows using build_compute.sh instead of build_all.sh for compute node builds
  • Enhanced DATAROOT deletion messaging: Improved error messages when users opt not to delete DATAROOT, providing clear guidance on how to proceed
  • Added skip link workflow option: New -L/--skip-link option allows skipping the link_workflow.sh step when it's not needed

Major Enhancement

  • Converted getopts to getopt: Full conversion to support long arguments for better user experience

Long Options Added

All options now support descriptive long forms:

  • --account (required HPC account)
  • --build-compute (use build_compute.sh)
  • --skip-link (skip link_workflow.sh)
  • --delete (auto-delete directories)
  • --gfs, --gefs, --sfs, --gcafs (test type selection)
  • --yaml, --yaml-dir (YAML configuration)
  • --verbose, --very-verbose, --debug (output control)
  • And more...

Usage Examples

Before (still supported):

./generate_workflows.sh -A myaccount -b -D /path/to/runtests

Now also supports:

./generate_workflows.sh --account myaccount --build-compute --skip-link --delete /path/to/runtests

Backward Compatibility

All existing short options continue to work exactly as before. The only breaking change is the requirement for the -A account option, which improves error detection and user experience.

Testing

  • All argument parsing tested with both short and long options
  • Account requirement validation verified
  • Option combinations tested
  • Shellcheck passes with no issues
  • Backward compatibility maintained

Note: GCAFS support was already implemented in the existing code with the -C/--gcafs option and proper build flags.

Fixes #24.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Add new features to generate_workflows.sh Add new features to generate_workflows.sh Jul 1, 2025
Copilot AI requested a review from DavidHuber-NOAA July 1, 2025 12:38
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.

Add new features to generate_workflows.sh

2 participants