gchq / gchq/sleeper

Alphabetise optional parameters in help summaries

Open Beginner friendly
#7,951 2 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Java
Stars
107
Forks
29
Avg merge
19h 46m
Merged PRs (30d)
141

Description

We have a number of scripts in the Sleeper repo that can provide help text to the user through the commands "./script.sh --help" method.
These don't currently have an ordering so it can look confusing to the user when they're trying view it.

We want to go through the help summaries and ensure both the .helpSummary() and the .options() on the CommandLineUsage builder are in alphabetical order. Below is a table of places we need to edit this.

| Script | Class | Options (actual order) | Correct alphabetical order |
|---|---|---|---|
| `scripts/table/addTable.sh` | `AddTableClient` | `table-name`, `schema`, `table-properties`, `config-dir` | `config-dir`, `schema`, `table-name`, `table-properties` |
| `scripts/report/filesStatusReport.sh` | `FilesStatusReport` | `max-no-ref-files`, `verbose`, `report-type` | `max-no-ref-files`, `report-type`, `verbose` |
| `scripts/deploy/deployExisting.sh` | `DeployExistingInstance` | `paused`, `force-cdk-app` | `force-cdk-app`, `paused` |
| `scripts/deploy/deployNew.sh` | `DeployNewInstance` | `properties-file`, `config-dir`, `paused` | `config-dir`, `paused`, `properties-file` |
| `scripts/deploy/uploadArtefacts.sh` | `UploadArtefacts` | `properties`, `id`, `create-builder`, `create-deployment`, `upload`, `cdk-app` | `cdk-app`, `create-builder`, `create-deployment`, `id`, `properties`, `upload` |
| `scripts/dev/buildDockerImage.sh` | `BuildDockerImage` | `lambda`, `multiplatform`, `default-base-image` | `default-base-image`, `lambda`, `multiplatform` |

We can test this by calling any of the scripts along with the --help flag.

Contributor guide

Open the contributing guide

Research direction

Start with the six listed scripts and their corresponding CommandLineUsage classes: AddTableClient, FilesStatusReport, DeployExistingInstance, DeployNewInstance, UploadArtefacts, and BuildDockerImage. Compare each .helpSummary() and .options() order with the table, then run each script with --help to confirm the optional parameters appear alphabetically.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, shell
Domain
cli
Issue type
Refactor
Difficulty
2/5
Estimated time
Half a day
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.