Skip to content

Commit 1bcdb18

Browse files
committed
Improve some CLI help and log messages
1 parent b463a53 commit 1bcdb18

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

xcengine/cli.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ def cli(verbose):
3030
"-f",
3131
"--from-saved",
3232
is_flag=True,
33-
help="If --batch and --server both used, serve datasets from saved Zarrs",
33+
help="If --batch and --server both used, serve datasets from saved Zarrs "
34+
"rather than computing them on the fly.",
3435
)
3536

3637
notebook_argument = click.argument(
@@ -127,7 +128,7 @@ def image_cli():
127128
type=click.Path(path_type=pathlib.Path, writable=True),
128129
default=None,
129130
help="Write a CWL file defining an Earth Observation Application Package "
130-
"to the specified path",
131+
"to the specified path.",
131132
)
132133
@notebook_argument
133134
def build(
@@ -153,12 +154,13 @@ def build(
153154
print(f"Built image with tags {image.tags}")
154155

155156

156-
@image_cli.command(help="Run a compute engine image as a Docker container")
157+
@image_cli.command(help="Run a compute engine image as a Docker container.")
157158
@click.option(
158159
"-b",
159160
"--batch",
160161
is_flag=True,
161-
help="Run the compute engine as a batch script",
162+
help="Run the compute engine as a batch script. Use with the --output "
163+
"option to copy output out of the container.",
162164
)
163165
@click.option(
164166
"-s",
@@ -179,7 +181,7 @@ def build(
179181
"-o",
180182
"--output",
181183
type=click.Path(path_type=pathlib.Path, dir_okay=True, file_okay=False),
182-
help="Write output data to this directory, which will be created if it "
184+
help="Write any output data to this directory, which will be created if it "
183185
"does not exist already.",
184186
)
185187
@click.option(

xcengine/core.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ def run(
336336
)
337337
time.sleep(2)
338338
container.reload()
339-
LOGGER.info(f"Container {container.short_id} is {container.status}.")
339+
LOGGER.info(
340+
f'Container {container.short_id} has status "{container.status}".'
341+
)
340342
if self.output_dir:
341343
LOGGER.info(
342344
f"Copying results from container to {self.output_dir}..."

0 commit comments

Comments
 (0)