Skip to content

Commit 31a3622

Browse files
committed
Refactor
1 parent be0ee50 commit 31a3622

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

meorg_client/cli.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,22 @@ def analysis_start(id: str):
218218
@click.argument("model_id")
219219
@click.argument("exp_id")
220220
@click.argument("name")
221-
def new_model_output(model_id: str, exp_id: str, name: str):
221+
def create_new_model_output(model_id: str, exp_id: str, name: str):
222222
"""
223223
Create a new model output entity
224224
225+
226+
Parameters
227+
----------
228+
model_id : str
229+
Model profile ID.
230+
231+
exp_id : str
232+
Experiment ID.
233+
234+
name : str
235+
New model output name
236+
225237
Prints modeloutput ID of created object, and whether it already existed or not.
226238
"""
227239
client = _get_client()
@@ -234,7 +246,7 @@ def new_model_output(model_id: str, exp_id: str, name: str):
234246
output_id = response.get("data").get("modeloutputId")
235247
created = response.get("data").get("created")
236248
click.echo(f"Model Output ID: {output_id}")
237-
click.echo(f"Already created: {created}")
249+
click.echo(f"Override (existing) Model Output ID: {created}")
238250
pass
239251

240252

@@ -334,7 +346,7 @@ def cli_output():
334346
cli_analysis.add_command(analysis_status)
335347

336348
# Add output command
337-
cli_output.add_command(new_model_output)
349+
cli_output.add_command(create_new_model_output)
338350

339351
# Add subparsers to the master
340352
cli.add_command(cli_endpoints)

meorg_client/tests/test_cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def test_create_model_output(
6161
):
6262
"""Test Creation of Model output"""
6363
result = runner.invoke(
64-
cli.new_model_output, [model_profile_id, experiment_id, model_output_name]
64+
cli.create_new_model_output,
65+
[model_profile_id, experiment_id, model_output_name],
6566
)
6667
assert result.exit_code == 0
6768

0 commit comments

Comments
 (0)