Skip to content

Commit 1fce3ba

Browse files
committed
REF: Move ask* subcommands under octue question ask group
skipci
1 parent 386f508 commit 1fce3ba

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

octue/cli.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,15 @@ def octue_cli(id, logger_uri, log_level, force_reset):
7878

7979
@octue_cli.group()
8080
def question():
81-
"""Ask and interact with questions to an Octue Twined data service."""
81+
"""Ask a new question to an Octue Twined data service or interact with a previous question."""
8282

8383

84-
@question.command()
84+
@question.group()
85+
def ask():
86+
"""Ask a new question to an Octue Twined data service."""
87+
88+
89+
@ask.command()
8590
@click.argument("sruid", type=str)
8691
@click.option(
8792
"-i",
@@ -112,7 +117,7 @@ def question():
112117
help="If provided, ask the question and detach (the result and other events can be retrieved from the event store "
113118
"later).",
114119
)
115-
def ask(sruid, input_values, input_manifest, project_name, asynchronous):
120+
def remote(sruid, input_values, input_manifest, project_name, asynchronous):
116121
"""Ask a question to a remote Octue Twined service.
117122
118123
SRUID should be a valid service revision unique identifier for an existing Octue Twined service
@@ -142,7 +147,7 @@ def ask(sruid, input_values, input_manifest, project_name, asynchronous):
142147
return json.dumps(answer, cls=OctueJSONEncoder)
143148

144149

145-
@question.command()
150+
@ask.command()
146151
@click.option(
147152
"-i",
148153
"--input-values",
@@ -166,7 +171,7 @@ def ask(sruid, input_values, input_manifest, project_name, asynchronous):
166171
"`OCTUE_SERVICE_CONFIGURATION_PATH` environment variable is used if present, otherwise the local path `octue.yaml` "
167172
"is used.",
168173
)
169-
def ask_local(input_values, input_manifest, service_config):
174+
def local(input_values, input_manifest, service_config):
170175
"""Ask a question to a local Octue Twined service."""
171176
if input_values:
172177
input_values = json.loads(input_values, cls=OctueJSONDecoder)

0 commit comments

Comments
 (0)