From c88d29c0b965b1dcb8c4d37a8b7584da01b9fba1 Mon Sep 17 00:00:00 2001 From: Stephen Crowe Date: Tue, 27 Aug 2024 01:37:21 -0700 Subject: [PATCH] fix: improve help text Signed-off-by: Stephen Crowe --- .../client/cli/_groups/bundle_group.py | 23 ++++++--- .../client/cli/_groups/config_group.py | 48 +------------------ src/deadline/client/cli/_groups/job_group.py | 15 +++--- .../client/cli/_groups/worker_group.py | 4 +- src/deadline/client/config/config_file.py | 2 +- 5 files changed, 28 insertions(+), 64 deletions(-) diff --git a/src/deadline/client/cli/_groups/bundle_group.py b/src/deadline/client/cli/_groups/bundle_group.py index a920dc5c..b861e47b 100644 --- a/src/deadline/client/cli/_groups/bundle_group.py +++ b/src/deadline/client/cli/_groups/bundle_group.py @@ -73,13 +73,22 @@ def validate_parameters(ctx, param, value): @cli_bundle.command(name="submit") @click.option( - "-p", "--parameter", multiple=True, callback=validate_parameters, help="Job template parameters" + "-p", + "--parameter", + multiple=True, + callback=validate_parameters, + help='The values for the job template\'s parameters. Can be provided as key-value pairs, inline JSON strings, or as paths to a JSON or YAML document. If provided more than once, the values are combined in the order that they appear. Examples: --parameter MyParam=5 -p file://parameter_file.json -p \'{"MyParam": "5"}\'', ) @click.option("--profile", help="The AWS profile to use.") @click.option("--farm-id", help="The AWS Deadline Cloud Farm to use.") @click.option("--queue-id", help="The AWS Deadline Cloud Queue to use.") @click.option("--name", help="The job name to use in place of the one in the job bundle.") -@click.option("--priority", type=int, default=50, help="The priority of the job.") +@click.option( + "--priority", + type=int, + default=50, + help="The priority of the job. The highest priority is 100.", +) @click.option( "--max-failed-tasks-count", type=int, @@ -92,9 +101,9 @@ def validate_parameters(ctx, param, value): ) @click.option( "--job-attachments-file-system", - help="The method for accessing files from job attachments. " - + "COPIED means to copy files to the host and " - + "VIRTUAL means to load files when needed with a virtual file system.", + help="The method workers use to access job attachments. " + + "COPIED means to copy files to the worker and " + + "VIRTUAL means to load files as needed from a virtual file system.", type=click.Choice([e.value for e in JobAttachmentsFileSystem]), ) @click.option( @@ -105,7 +114,7 @@ def validate_parameters(ctx, param, value): @click.option( "--require-paths-exist", is_flag=True, - help="Require all input paths to exist", + help="Return an error if any input files are missing.", ) @click.option( "--submitter-name", @@ -256,7 +265,7 @@ def _decide_cancel_submission(upload_group: AssetUploadGroup) -> bool: @click.option( "--browse", is_flag=True, - help="Allows user to choose Bundle and adds a 'Load a different job bundle' option to the Job-Specific Settings UI", + help="Opens a file browser to select a bundle.", ) @click.option( "--install-gui", diff --git a/src/deadline/client/cli/_groups/config_group.py b/src/deadline/client/cli/_groups/config_group.py index 18c6d882..713a7abb 100644 --- a/src/deadline/client/cli/_groups/config_group.py +++ b/src/deadline/client/cli/_groups/config_group.py @@ -14,52 +14,8 @@ @_handle_error def cli_config(): """ - Manage AWS Deadline Cloud's workstation configuration. - - The available AWS Deadline Cloud settings are: - - defaults.aws_profile_name: - - The default AWS profile to use for AWS Deadline Cloud commands. Set to '' to use the default credentials. Other settings are saved with the profile. - - defaults.farm_id: - - The default farm ID to use for job submissions or CLI operations. - - defaults.queue_id: - - The default queue ID to use for job submissions or CLI operations. - - settings.storage_profile_id: - - The storage profile that this workstation conforms to. It specifies - where shared file systems are mounted, and where named job attachments - should go. - - defaults.job_id: - - The Job ID to use by default. This gets updated by job submission so is normally the most recently submitted job. - - settings.job_history_dir: - - The directory in which to create new job bundles for submitting to AWS Deadline Cloud, to produce a history of job submissions. - - settings.auto_accept: - - Flag to automatically confirm any confirmation prompts. - - settings.log_level: - - Setting to change the log level. Must be one of ["ERROR", "WARNING", "INFO", "DEBUG"] - - defaults.job_attachments_file_system: - - Setting to determine if attachments are copied on to workers before a job executes - or fetched in realtime. Must be one of ["COPIED", "VIRTUAL"] - - telemetry.opt_out: - - Flag to specify opting out of telemetry data collection. + Manage AWS Deadline Cloud's workstation configuration. Config options are organized + and documented in config_file.SETTINGS. """ diff --git a/src/deadline/client/cli/_groups/job_group.py b/src/deadline/client/cli/_groups/job_group.py index 98ec16d6..70a8d85f 100644 --- a/src/deadline/client/cli/_groups/job_group.py +++ b/src/deadline/client/cli/_groups/job_group.py @@ -62,8 +62,8 @@ def cli_job(): @click.option("--profile", help="The AWS profile to use.") @click.option("--farm-id", help="The AWS Deadline Cloud Farm to use.") @click.option("--queue-id", help="The AWS Deadline Cloud Queue to use.") -@click.option("--page-size", default=5, help="The number of items shown in the page.") -@click.option("--item-offset", default=0, help="The starting offset of the items.") +@click.option("--page-size", default=5, help="The number of jobs to load at a time.") +@click.option("--item-offset", default=0, help="The index of the job to start listing from.") @_handle_error def job_list(page_size, item_offset, **args): """ @@ -151,7 +151,7 @@ def job_get(**args): "--mark-as", type=click.Choice(["CANCELED", "FAILED", "SUCCEEDED"], case_sensitive=False), default="CANCELED", - help="The run status to mark the job as.", + help="The task run status to mark the job as.", ) @click.option( "--yes", @@ -608,11 +608,10 @@ def _assert_valid_path(path: str) -> None: ], case_sensitive=False, ), - help="The resolution method to use when a file already exists." - "Please choose one from the following options. If it is not provided, it defaults to CREATE_COPY:\n" - "[1] SKIP: Do not download these files\n" - "[2] OVERWRITE: Download these files and overwrite existing files\n" - "[3] CREATE_COPY: Download the file with a new name, appending '(1)' to the end", + help="The resolution method to use when a file already exists:\n" + "CREATE_COPY (default): Download the file with a new name, appending '(1)' to the end\n" + "SKIP: Do not download the file\n" + "OVERWRITE: Download and replace the existing file", ) @click.option( "--yes", diff --git a/src/deadline/client/cli/_groups/worker_group.py b/src/deadline/client/cli/_groups/worker_group.py index 6c2098d0..a464e677 100644 --- a/src/deadline/client/cli/_groups/worker_group.py +++ b/src/deadline/client/cli/_groups/worker_group.py @@ -25,8 +25,8 @@ def cli_worker(): @click.option("--profile", help="The AWS profile to use.") @click.option("--farm-id", help="The AWS Deadline Cloud Farm to use.") @click.option("--fleet-id", help="The AWS Deadline Cloud Fleet to use.", required=True) -@click.option("--page-size", default=5, help="The number of items shown in the page.") -@click.option("--item-offset", default=0, help="The starting offset of the items.") +@click.option("--page-size", default=5, help="The number of workers to load at a time.") +@click.option("--item-offset", default=0, help="The index of the worker to start listing from.") @_handle_error def worker_list(page_size, item_offset, fleet_id, **args): """ diff --git a/src/deadline/client/config/config_file.py b/src/deadline/client/config/config_file.py index 67007803..e3d0b9d2 100644 --- a/src/deadline/client/config/config_file.py +++ b/src/deadline/client/config/config_file.py @@ -100,7 +100,7 @@ }, "settings.conflict_resolution": { "default": FileConflictResolution.NOT_SELECTED.name, - "description": "How to handle duplicate files when downloading (if a file with the same path/name already exists.)", + "description": "How to handle duplicate files while downloading if a file with the same name already exists", }, "settings.log_level": { "default": "WARNING",