Commit db693348 authored by Alexandre Boyer's avatar Alexandre Boyer
Browse files

add get-status command

parent 5d3a92b4
......@@ -21,18 +21,19 @@ import logging
import argparse
import sys
from diva_evaluation_cli.bin.actev_get_system import ActevGetSystem
from diva_evaluation_cli.bin.actev_system_setup import ActevSystemSetup
from diva_evaluation_cli.bin.actev_validate_system import ActevValidateSystem
from diva_evaluation_cli.bin.actev_design_chunks import ActevDesignChunks
from diva_evaluation_cli.bin.actev_experiment_init import ActevExperimentInit
from diva_evaluation_cli.bin.actev_pre_process_chunk import ActevPreProcessChunk
from diva_evaluation_cli.bin.actev_process_chunk import ActevProcessChunk
from diva_evaluation_cli.bin.actev_post_process_chunk import ActevPostProcessChunk
from diva_evaluation_cli.bin.actev_reset_chunk import ActevResetChunk
from diva_evaluation_cli.bin.actev_experiment_cleanup import ActevExperimentCleanup
from diva_evaluation_cli.bin.actev_merge_chunks import ActevMergeChunks
from diva_evaluation_cli.bin.actev_exec import ActevExec
from diva_evaluation_cli.bin.commands.actev_get_system import ActevGetSystem
from diva_evaluation_cli.bin.commands.actev_system_setup import ActevSystemSetup
from diva_evaluation_cli.bin.commands.actev_validate_system import ActevValidateSystem
from diva_evaluation_cli.bin.commands.actev_design_chunks import ActevDesignChunks
from diva_evaluation_cli.bin.commands.actev_experiment_init import ActevExperimentInit
from diva_evaluation_cli.bin.commands.actev_pre_process_chunk import ActevPreProcessChunk
from diva_evaluation_cli.bin.commands.actev_process_chunk import ActevProcessChunk
from diva_evaluation_cli.bin.commands.actev_post_process_chunk import ActevPostProcessChunk
from diva_evaluation_cli.bin.commands.actev_reset_chunk import ActevResetChunk
from diva_evaluation_cli.bin.commands.actev_experiment_cleanup import ActevExperimentCleanup
from diva_evaluation_cli.bin.commands.actev_merge_chunks import ActevMergeChunks
from diva_evaluation_cli.bin.commands.actev_exec import ActevExec
from diva_evaluation_cli.bin.commands.actev_status import ActevStatus
private_subcommands = [
......@@ -51,6 +52,7 @@ ActevPostProcessChunk(),
ActevResetChunk(),
ActevMergeChunks(),
ActevExperimentCleanup(),
ActevStatus()
]
def cli_parser():
......
......@@ -15,7 +15,7 @@ nb_video-per-chunk or n: number of videos in the chunk
Warning: this file should not be modified: see src/entry_points to add your source code.
"""
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.src.entry_points.actev_design_chunks import entry_point
......
......@@ -22,7 +22,7 @@ Warning: this file should not be modified: see src/entry_points to add your sour
"""
import logging
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.bin.private_src.private_entry_points.actev_exec import entry_point
class ActevExec(ActevCommand):
......
......@@ -10,7 +10,7 @@ Warning: this file should not be modified: see src/entry_points to add your sour
"""
import logging
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.src.entry_points.actev_experiment_cleanup import entry_point
......
......@@ -19,7 +19,7 @@ Warning: this file should not be modified: see src/entry_points to add your sour
"""
import logging
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.src.entry_points.actev_experiment_init import entry_point
class ActevExperimentInit(ActevCommand):
......
......@@ -18,9 +18,9 @@ Warning: this file should not be modified: see src/entry_points to add your sour
"""
import logging
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.bin.private_src.private_entry_points.actev_get_system import entry_point
from diva_evaluation_cli.bin.private_src.system_types.system_types_definition import system_types
from diva_evaluation_cli.bin.private_src.get_system.system_types_definition import system_types
class ActevGetSystem(ActevCommand):
......
......@@ -14,7 +14,7 @@ password or p: password to access the url
Warning: this file should not be modified.
"""
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
class ActevGetSystemDocker(ActevCommand):
......
......@@ -17,7 +17,7 @@ install-cli or i: install the cli to use it
Warning: this file should not be modified.
"""
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
class ActevGetSystemGit(ActevCommand):
......
......@@ -16,7 +16,7 @@ token or t: token to access the url
Warning: this file should not be modified.
"""
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
class ActevGetSystemOther(ActevCommand):
......
......@@ -15,7 +15,7 @@ chunk-ids or i: list of chunk ids
Warning: this file should not be modified: see src/entry_points to add your source code.
"""
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.src.entry_points.actev_merge_chunks import entry_point
......
......@@ -15,7 +15,7 @@ Warning: this file should not be modified: see src/entry_points to add your sour
"""
import logging
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.src.entry_points.actev_post_process_chunk import entry_point
......
......@@ -15,7 +15,7 @@ Warning: this file should not be modified: see src/entry_points to add your sour
"""
import logging
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.src.entry_points.actev_pre_process_chunk import entry_point
class ActevPreProcessChunk(ActevCommand):
......
......@@ -15,7 +15,7 @@ Warning: this file should not be modified: see src/entry_points to add your sour
"""
import logging
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.src.entry_points.actev_process_chunk import entry_point
......
......@@ -15,7 +15,7 @@ Warning: this file should not be modified: see src/entry_points to add your sour
"""
import logging
from diva_evaluation_cli.bin.actev_command import ActevCommand
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.src.entry_points.actev_reset_chunk import entry_point
......
"""
USAGE
ActEV status
Description
-----------
Executable at any time. Get the status of the experiment.
Warning: this file should not be modified: see src/entry_points to add your source code.
"""
import logging
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
from diva_evaluation_cli.src.entry_points.actev_status import entry_point
from diva_evaluation_cli.bin.private_src.status.query_types_definition import query_types
class ActevStatus(ActevCommand):
def __init__(self):
super(ActevStatus, self).__init__('status', entry_point)
def cli_parser(self, arg_parser):
""" Configure the description and the arguments (positional and optional) to parse.
@param arg_parser: python arg parser to describe how to parse the command
"""
arg_parser.description= "Executable at any time. Get the status of the experiment"
sub_parser_query_types = arg_parser.add_subparsers(title='subsubcommands', dest='query_type')
for query_type_name in query_types.keys():
sub_parser_query_type = sub_parser_query_types.add_parser(query_type_name)
required_named = sub_parser_query_type.add_argument_group('required named arguments')
command = query_types[query_type_name]().cli_parser(sub_parser_query_type)
sub_parser_query_type.set_defaults(func=ActevStatus.command, object=self)
"""
USAGE
ActEV status chunk-query
Description
-----------
Get the status of a chunk id
Args
----
chunk-id or i: chunk id
Warning: this file should not be modified.
"""
from diva_evaluation_cli.bin.commands.actev_command import ActevCommand
class ActevStatusChunkQuery(ActevCommand):
def __init__(self):
super(ActevStatusChunkQuery, self).__init__('chunk-query', '')
def cli_parser(self, arg_parser):
""" Configure the description and the arguments (positional and optional) to parse.
@param arg_parser: python arg parser to describe how to parse the command
"""
arg_parser.description= "Get the status of a chunk id"
required_named = arg_parser.add_argument_group('required named arguments')
required_named.add_argument("-i", "--chunk-id", help="chunk id", required=True)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment