Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ActEV
diva_evaluation_cli
Commits
db693348
Commit
db693348
authored
Oct 30, 2018
by
Alexandre Boyer
Browse files
add get-status command
parent
5d3a92b4
Changes
38
Hide whitespace changes
Inline
Side-by-side
diva_evaluation_cli/bin/cli.py
View file @
db693348
...
...
@@ -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
():
...
...
diva_evaluation_cli/bin/
private_src/system_type
s/__init__.py
→
diva_evaluation_cli/bin/
command
s/__init__.py
View file @
db693348
File moved
diva_evaluation_cli/bin/actev_command.py
→
diva_evaluation_cli/bin/
commands/
actev_command.py
View file @
db693348
File moved
diva_evaluation_cli/bin/actev_design_chunks.py
→
diva_evaluation_cli/bin/
commands/
actev_design_chunks.py
View file @
db693348
...
...
@@ -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
...
...
diva_evaluation_cli/bin/actev_exec.py
→
diva_evaluation_cli/bin/
commands/
actev_exec.py
View file @
db693348
...
...
@@ -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
):
...
...
diva_evaluation_cli/bin/actev_experiment_cleanup.py
→
diva_evaluation_cli/bin/
commands/
actev_experiment_cleanup.py
View file @
db693348
...
...
@@ -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
...
...
diva_evaluation_cli/bin/actev_experiment_init.py
→
diva_evaluation_cli/bin/
commands/
actev_experiment_init.py
View file @
db693348
...
...
@@ -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
):
...
...
diva_evaluation_cli/bin/actev_get_system.py
→
diva_evaluation_cli/bin/
commands/
actev_get_system.py
View file @
db693348
...
...
@@ -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
):
...
...
diva_evaluation_cli/bin/
private_src/
system_
types/
commands/__init__.py
→
diva_evaluation_cli/bin/
commands/actev_get_
system_
sub
commands/__init__.py
View file @
db693348
File moved
diva_evaluation_cli/bin/
private_src/
system_
types/
commands/docker_command.py
→
diva_evaluation_cli/bin/
commands/actev_get_
system_
sub
commands/docker_command.py
View file @
db693348
...
...
@@ -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
):
...
...
diva_evaluation_cli/bin/
private_src/
system_
types/
commands/git_command.py
→
diva_evaluation_cli/bin/
commands/actev_get_
system_
sub
commands/git_command.py
View file @
db693348
...
...
@@ -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
):
...
...
diva_evaluation_cli/bin/
private_src/
system_
types/
commands/other_command.py
→
diva_evaluation_cli/bin/
commands/actev_get_
system_
sub
commands/other_command.py
View file @
db693348
...
...
@@ -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
):
...
...
diva_evaluation_cli/bin/actev_merge_chunks.py
→
diva_evaluation_cli/bin/
commands/
actev_merge_chunks.py
View file @
db693348
...
...
@@ -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
...
...
diva_evaluation_cli/bin/actev_post_process_chunk.py
→
diva_evaluation_cli/bin/
commands/
actev_post_process_chunk.py
View file @
db693348
...
...
@@ -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
...
...
diva_evaluation_cli/bin/actev_pre_process_chunk.py
→
diva_evaluation_cli/bin/
commands/
actev_pre_process_chunk.py
View file @
db693348
...
...
@@ -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
):
...
...
diva_evaluation_cli/bin/actev_process_chunk.py
→
diva_evaluation_cli/bin/
commands/
actev_process_chunk.py
View file @
db693348
...
...
@@ -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
...
...
diva_evaluation_cli/bin/actev_reset_chunk.py
→
diva_evaluation_cli/bin/
commands/
actev_reset_chunk.py
View file @
db693348
...
...
@@ -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
...
...
diva_evaluation_cli/bin/commands/actev_status.py
0 → 100644
View file @
db693348
"""
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
)
diva_evaluation_cli/bin/
priva
te_s
rc/validation
/__init__.py
→
diva_evaluation_cli/bin/
commands/ac
te
v
_s
tatus_subcommands
/__init__.py
View file @
db693348
File moved
diva_evaluation_cli/bin/commands/actev_status_subcommands/chunk_query_command.py
0 → 100644
View file @
db693348
"""
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
)
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment