Skip to content

Commit

Permalink
fix: improve help text
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Crowe <[email protected]>
  • Loading branch information
crowecawcaw committed Aug 27, 2024
1 parent be57617 commit c8dced6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 64 deletions.
23 changes: 16 additions & 7 deletions src/deadline/client/cli/_groups/bundle_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
48 changes: 2 additions & 46 deletions src/deadline/client/cli/_groups/config_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""


Expand Down
15 changes: 7 additions & 8 deletions src/deadline/client/cli/_groups/job_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/deadline/client/cli/_groups/worker_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/deadline/client/config/config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c8dced6

Please sign in to comment.