From 173f1d3cf27be4b40cd74356c3556506e4a65531 Mon Sep 17 00:00:00 2001 From: Alexandre Boyer Date: Tue, 23 Oct 2018 16:04:46 -0400 Subject: [PATCH 1/6] Update README.md, start gitlab CI build --- .gitlab-ci.yml | 14 ++ README.md | 234 ++----------------------------- diva_evaluation_cli/__init__.py | 1 + doc/cli.md | 225 +++++++++++++++++++++++++++++ doc/{usage.md => development.md} | 2 +- setup.py | 4 +- 6 files changed, 259 insertions(+), 221 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 doc/cli.md rename doc/{usage.md => development.md} (97%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..dfc0825 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,14 @@ +stages: + - build + - test + - release + - documentation + +build: + stage: build + image: python:3.5-slim + + script: + - python3 -m pip install -e . + - actev -h + - actev validate-system diff --git a/README.md b/README.md index ac3572a..d5fe04d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ +Introduction +============ + +Consult the documentation to learn more about the CLI: [introduction](doc/introduction.md) + +This repository contains: +* an abstract CLI to implement on the `master` branch +* an implementation example on the branch `baseline_system_master`. + Installation ============ @@ -58,233 +67,20 @@ You should be able to see the available subcommands. Usage ===== -Get the existing commands -------------------------- - -``` -actev -h -``` - -Get system -------------- - -``` -actev get-system -h -``` - -### Docker - -Generic command: - -``` -actev get-system docker -u -``` - -With username and password: - -``` -actev get-system docker -u -U -p -``` - -:warning: if your password starts with *-* as in this example: `-9r45ijFo0`, you should write `--password=-9r45ijFo0` instead of `-p -9r45ijFo0`. Otherwise, the value will be interpreted as an argument to parse. - -Example: - -``` -actev get-system docker -u gitlab.kitware.com:4567/diva-baseline/diva-baseline:eval_cli -``` - -### Git - -Generic command: - -``` -actev get-system git -u -``` - -With username and password: - -``` -actev get-system git -u -U -p -``` - -With a token: - -``` -actev get-system git -u -t -``` - -Store the system in a specific directory: - -``` -actev get-system git -u ... -l -``` - -:information_source: You can also directly add your credentials inside the url. - -:warning: if your password or token starts with *-* as in this example: `-9r45ijFo0`, you should write `--password=-9r45ijFo0` instead of `-p -9r45ijFo0`. Otherwise, the value will be interpreted as an argument to parse. - - -Example: - -``` -actev get-system git -u https://gitlab.kitware.com/alexandreB/diva_evaluation_cli.git -l /tmp -``` - -### Other (web resources as a tar file) - - -Generic command: - -``` -actev get-system other -u -``` - -With username and password: - -``` -actev get-system other -u -U -p -``` - -With a token: - -``` -actev get-system git -u -t -``` - -Store the system in a specific directory: - -``` -actev get-system git -u ... -l -``` - -:information_source: You can also directly add your credentials inside the url. - -:warning: if your password or token starts with *-* as in this example: `-9r45ijFo0`, you should write `--password=-9r45ijFo0` instead of `-p -9r45ijFo0`. Otherwise, the value will be interpreted as an argument to parse. - - -Example: - -``` -actev get-system other -u https://path/to/file.tgz -l /tmp -``` - -System setup +Command line ------------ -``` -actev system-setup -``` - -Design chunks -------------- -Generic command: - -``` -actev design-chunks -f -a -o -n -``` - -Example: - -``` -actev design-chunks -f ~/file.json -a ~/activity.json -o ~/chunks.json -n 96 -``` - -Experiment initialization -------------------------- -Generic command: - -``` -actev experiment-init -f -a -c -v -s -``` - -Example: - -``` -actev experiment-init -f ~/file.json -a ~/activity.json -c ~/chunks.json -v ~/frames_location/ -s ~/system_cache_dir/ -``` - -Pre-process a chunk -------------------- -Generic command: - -``` -actev pre-process-chunk -i -``` - -Example: - -``` -actev pre-process-chunk -i Chunk1 -``` - -Process a chunk ---------------- -Generic command: +Run the following command to obtain help with the CLI: ``` -actev process-chunk -i -``` - -Example: - -``` -actev process-chunk -i Chunk1 -``` - -Post process a chunk --------------------- -Generic command: - -``` -actev post-process-chunk -i -``` - -Example: - -``` -actev post-process-chunk -i Chunk1 +actev -h ``` -Reset a chunk +Documentation ------------- -Generic command: - -``` -actev reset-chunk -i -``` - -Example: -``` -actev reset-chunk -i Chunk1 -``` - -Merge chunks ------------- -Generic command: - -``` -actev merge-chunks -o -c -r ~/ -i -``` - -Example: - -``` -actev merge-chunks -o ~/output.json -c ~/merging_chunks.json -r ~/system_cache_dir/ -i Chunk1 Chunk2 -``` - -Experiment cleanup ------------------- - -``` -actev experiment-cleanup -``` - -Documentation -============= +Consult the documentation to have information: [cli](doc/cli.md) -Documentation is available here [doc](doc) Development =========== @@ -293,5 +89,5 @@ The cli components are included in the `bin` directory, you do not have to modif To add your code, you simply have to implement the methods in `src/entry_points`. We suggest you to call your scripts in the entry point methods and store them in `src`. -You have an example in this repository to help you in the package creation. +More information about the development and the update of the CLI here: [development](doc/development.md) diff --git a/diva_evaluation_cli/__init__.py b/diva_evaluation_cli/__init__.py index e69de29..e43be03 100644 --- a/diva_evaluation_cli/__init__.py +++ b/diva_evaluation_cli/__init__.py @@ -0,0 +1 @@ +__version__ = '1.0' \ No newline at end of file diff --git a/doc/cli.md b/doc/cli.md new file mode 100644 index 0000000..f30e01b --- /dev/null +++ b/doc/cli.md @@ -0,0 +1,225 @@ +CLI usage +========= + +Get the existing commands +------------------------- + +``` +actev -h +``` + +Get system +------------- + +``` +actev get-system -h +``` + +### Docker + +Generic command: + +``` +actev get-system docker -u +``` + +With username and password: + +``` +actev get-system docker -u -U -p +``` + +:warning: if your password starts with *-* as in this example: `-9r45ijFo0`, you should write `--password=-9r45ijFo0` instead of `-p -9r45ijFo0`. Otherwise, the value will be interpreted as an argument to parse. + +Example: + +``` +actev get-system docker -u gitlab.kitware.com:4567/diva-baseline/diva-baseline:eval_cli +``` + +### Git + +Generic command: + +``` +actev get-system git -u +``` + +With username and password: + +``` +actev get-system git -u -U -p +``` + +With a token: + +``` +actev get-system git -u -t +``` + +Store the system in a specific directory: + +``` +actev get-system git -u ... -l +``` + +:information_source: You can also directly add your credentials inside the url. + +:warning: if your password or token starts with *-* as in this example: `-9r45ijFo0`, you should write `--password=-9r45ijFo0` instead of `-p -9r45ijFo0`. Otherwise, the value will be interpreted as an argument to parse. + + +Example: + +``` +actev get-system git -u https://gitlab.kitware.com/alexandreB/diva_evaluation_cli.git -l /tmp +``` + +### Other (web resources as a tar file) + + +Generic command: + +``` +actev get-system other -u +``` + +With username and password: + +``` +actev get-system other -u -U -p +``` + +With a token: + +``` +actev get-system git -u -t +``` + +Store the system in a specific directory: + +``` +actev get-system git -u ... -l +``` + +:information_source: You can also directly add your credentials inside the url. + +:warning: if your password or token starts with *-* as in this example: `-9r45ijFo0`, you should write `--password=-9r45ijFo0` instead of `-p -9r45ijFo0`. Otherwise, the value will be interpreted as an argument to parse. + + +Example: + +``` +actev get-system other -u https://path/to/file.tgz -l /tmp +``` + +System setup +------------ + +``` +actev system-setup +``` + +Design chunks +------------- +Generic command: + +``` +actev design-chunks -f -a -o -n +``` + +Example: + +``` +actev design-chunks -f ~/file.json -a ~/activity.json -o ~/chunks.json -n 96 +``` + +Experiment initialization +------------------------- +Generic command: + +``` +actev experiment-init -f -a -c -v -s +``` + +Example: + +``` +actev experiment-init -f ~/file.json -a ~/activity.json -c ~/chunks.json -v ~/frames_location/ -s ~/system_cache_dir/ +``` + +Pre-process a chunk +------------------- +Generic command: + +``` +actev pre-process-chunk -i +``` + +Example: + +``` +actev pre-process-chunk -i Chunk1 +``` + +Process a chunk +--------------- +Generic command: + +``` +actev process-chunk -i +``` + +Example: + +``` +actev process-chunk -i Chunk1 +``` + +Post process a chunk +-------------------- +Generic command: + +``` +actev post-process-chunk -i +``` + +Example: + +``` +actev post-process-chunk -i Chunk1 +``` + +Reset a chunk +------------- +Generic command: + +``` +actev reset-chunk -i +``` + +Example: + +``` +actev reset-chunk -i Chunk1 +``` + +Merge chunks +------------ +Generic command: + +``` +actev merge-chunks -o -c -r ~/ -i +``` + +Example: + +``` +actev merge-chunks -o ~/output.json -c ~/merging_chunks.json -r ~/system_cache_dir/ -i Chunk1 Chunk2 +``` + +Experiment cleanup +------------------ + +``` +actev experiment-cleanup +``` diff --git a/doc/usage.md b/doc/development.md similarity index 97% rename from doc/usage.md rename to doc/development.md index d9bec1a..a295b6d 100644 --- a/doc/usage.md +++ b/doc/development.md @@ -6,7 +6,7 @@ Overview The ActEV Independent Evaluation Command Line Interface (ActEV EvalCLI) defines an abstract interface for command line interaction model that is consistent for all developers while allowing freedom of underlying implementation. Consult [introduction](introduction.md) for a more detailed description of the CLI and how it will be used. -The abstract CLI is contained in the GIT Repo [diva_evaluation_cli](https://gitlab.kitware.com/alexandreB/diva_evaluation_cli). This contains a stubbed-out implementation of the CLI. The Baseline Active Detection System (RC3D) has been adapted to the CLI as an example implementation. It is available in the GIT repo [diva_evaluation_cli](https://gitlab.kitware.com/alexandreB/diva_evaluation_cli/blob/master/diva_evaluation_cli/src/setup.sh). +The abstract CLI is contained in the GIT Repo [diva_evaluation_cli](https://gitlab.kitware.com/alexandreB/diva_evaluation_cli). This contains a stubbed-out implementation of the CLI. The Baseline Active Detection System (RC3D) has been adapted to the CLI as an example implementation. It is available in the GIT repo [here](https://gitlab.kitware.com/alexandreB/diva_evaluation_cli/tree/baseline_system_master). The preferred workflow for the participant to implement the CLI is to GIT ‘fork’ the main branch of the abstract CLI and then implement the Entry Points. This can be accomplished two ways: branching within the NIST GIT Repo or using a linked branch from your team’s Repo. Contact NIST if you have questions. diff --git a/setup.py b/setup.py index c401e35..4eeb52d 100644 --- a/setup.py +++ b/setup.py @@ -8,8 +8,10 @@ Generate the package for the CLI. Warning: this file should not be modified. """ from setuptools import setup, find_packages +import diva_evaluation_cli + setup(name='diva_evaluation_cli', - version='0.1', + version=diva_evaluation_cli.__version__, package=find_packages(), include_package_data=True, entry_points= -- GitLab From bdefd409cac9f4f9119db04424593d523d17d360 Mon Sep 17 00:00:00 2001 From: alexandreB Date: Wed, 24 Oct 2018 13:44:16 +0000 Subject: [PATCH 2/6] fix validate-system --- .../bin/private_src/validation/validate_system.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/diva_evaluation_cli/bin/private_src/validation/validate_system.py b/diva_evaluation_cli/bin/private_src/validation/validate_system.py index 846ef88..2160715 100644 --- a/diva_evaluation_cli/bin/private_src/validation/validate_system.py +++ b/diva_evaluation_cli/bin/private_src/validation/validate_system.py @@ -82,10 +82,12 @@ def validate_container_output(): logging.info("Container output validation") for dataset_id in os.listdir(container_output_dir): - files = os.listdir(container_output_dir + '/' + dataset_id) - content = import_expected_result('expected_container_output.txt') - for file_name in content: - if not file_name in files: - raise Exception("System validation failed, {} not present in {}".format(file_name, dataset_id)) - logging.info(" .. {} is valid".format(dataset_id)) + dataset_id_path = os.path.join(container_output_dir, dataset_id) + if os.path.isdir(dataset_id_path): + files = os.listdir(dataset_id_path) + content = import_expected_result('expected_container_output.txt') + for file_name in content: + if not file_name in files: + raise Exception("System validation failed, {} not present in {}".format(file_name, dataset_id)) + logging.info(" .. {} is valid".format(dataset_id)) -- GitLab From 150fc297415e715c7afbfd9e838f24d3fc1129ed Mon Sep 17 00:00:00 2001 From: alexandreB Date: Wed, 24 Oct 2018 20:37:56 +0000 Subject: [PATCH 3/6] change CLI args from _ to -, add reset chunk arg --- diva_evaluation_cli/__init__.py | 2 +- diva_evaluation_cli/bin/actev_design_chunks.py | 6 +++--- diva_evaluation_cli/bin/actev_exec.py | 10 +++++----- diva_evaluation_cli/bin/actev_experiment_init.py | 8 ++++---- diva_evaluation_cli/bin/actev_merge_chunks.py | 16 ++++++++-------- .../bin/actev_post_process_chunk.py | 2 +- .../bin/actev_pre_process_chunk.py | 2 +- diva_evaluation_cli/bin/actev_process_chunk.py | 2 +- diva_evaluation_cli/bin/actev_reset_chunk.py | 4 +++- .../src/entry_points/actev_reset_chunk.py | 2 +- 10 files changed, 28 insertions(+), 26 deletions(-) diff --git a/diva_evaluation_cli/__init__.py b/diva_evaluation_cli/__init__.py index e43be03..439eb0c 100644 --- a/diva_evaluation_cli/__init__.py +++ b/diva_evaluation_cli/__init__.py @@ -1 +1 @@ -__version__ = '1.0' \ No newline at end of file +__version__ = '1.1' diff --git a/diva_evaluation_cli/bin/actev_design_chunks.py b/diva_evaluation_cli/bin/actev_design_chunks.py index c948e40..015bfb4 100644 --- a/diva_evaluation_cli/bin/actev_design_chunks.py +++ b/diva_evaluation_cli/bin/actev_design_chunks.py @@ -32,8 +32,8 @@ class ActevDesignChunks(ActevCommand): arg_parser.description = "Produce a chunks file that is suitable for the system" required_named = arg_parser.add_argument_group('required named arguments') - required_named.add_argument("-f", "--file_index", help="path to file index json file", required=True) - required_named.add_argument("-a", "--activity_index", help="path to activity index json file", required=True) + required_named.add_argument("-f", "--file-index", help="path to file index json file", required=True) + required_named.add_argument("-a", "--activity-index", help="path to activity index json file", required=True) required_named.add_argument("-o", "--output", help="path to save chunks file", required=True) - arg_parser.add_argument("-n", "--nb_videos_per_chunk", type=int, help="number of videos in a chunk") + arg_parser.add_argument("-n", "--nb-videos-per-chunk", type=int, help="number of videos in a chunk") arg_parser.set_defaults(func=ActevDesignChunks.command, object=self) diff --git a/diva_evaluation_cli/bin/actev_exec.py b/diva_evaluation_cli/bin/actev_exec.py index a198c44..544c8ce 100644 --- a/diva_evaluation_cli/bin/actev_exec.py +++ b/diva_evaluation_cli/bin/actev_exec.py @@ -11,11 +11,11 @@ Args file-index or f: path to file index json file for test set activity-index or a: path to activity index json file for test set chunks or c: path to chunks json file -nb_video-per-chunk or n: number of videos in the chunk +nb-video-per-chunk or n: number of videos in the chunk video-location or v: path to videos content system-cache-dir or s: path to system cache directory config-file or C: path to config file -output_file: path to merge chunks command result +output-file: path to merge chunks command result chunk_result: path to chunks json file after merge chunks execution Warning: this file should not be modified: see src/entry_points to add your source code. @@ -38,10 +38,10 @@ class ActevExec(ActevCommand): arg_parser.description= "Calls a team-implemented API. Captures time stamps, resource usage, etc." required_named = arg_parser.add_argument_group('required named arguments') - required_named.add_argument("-f", "--file_index", help="path to file index json file", required=True) - required_named.add_argument("-a", "--activity_index", help="path to activity index json file", required=True) + required_named.add_argument("-f", "--file-index", help="path to file index json file", required=True) + required_named.add_argument("-a", "--activity-index", help="path to activity index json file", required=True) required_named.add_argument("-c", "--chunks", help="path to chunks json file", required=True) - arg_parser.add_argument("-n", "--nb_videos_per_chunk", help="number of videos in a chunk") + arg_parser.add_argument("-n", "--nb-videos-per-chunk", help="number of videos in a chunk") required_named.add_argument("-v", "--video_location", help="path to videos content", required=True) required_named.add_argument("-s", "--system_cache_dir", help="path to system cache directory", required=True) diff --git a/diva_evaluation_cli/bin/actev_experiment_init.py b/diva_evaluation_cli/bin/actev_experiment_init.py index fcec961..cea70b9 100644 --- a/diva_evaluation_cli/bin/actev_experiment_init.py +++ b/diva_evaluation_cli/bin/actev_experiment_init.py @@ -35,10 +35,10 @@ class ActevExperimentInit(ActevCommand): arg_parser.description= "Start servers, starts cluster, etc." required_named = arg_parser.add_argument_group('required named arguments') - required_named.add_argument("-f", "--file_index", help="path to file index json file", required=True) - required_named.add_argument("-a", "--activity_index", help="path to activity index json file", required=True) + required_named.add_argument("-f", "--file-index", help="path to file index json file", required=True) + required_named.add_argument("-a", "--activity-index", help="path to activity index json file", required=True) required_named.add_argument("-c", "--chunks", help="path to chunks json file", required=True) - required_named.add_argument("-v", "--video_location", help="path to videos content", required=True) - required_named.add_argument("-s", "--system_cache_dir", help="path to system cache directory", required=True) + required_named.add_argument("-v", "--video-location", help="path to videos content", required=True) + required_named.add_argument("-s", "--system-cache-dir", help="path to system cache directory", required=True) arg_parser.add_argument("-C", "--config-file", help="path to config file") arg_parser.set_defaults(func=ActevExperimentInit.command, object=self) diff --git a/diva_evaluation_cli/bin/actev_merge_chunks.py b/diva_evaluation_cli/bin/actev_merge_chunks.py index 80d75d4..0a68eae 100644 --- a/diva_evaluation_cli/bin/actev_merge_chunks.py +++ b/diva_evaluation_cli/bin/actev_merge_chunks.py @@ -8,10 +8,10 @@ Given a list of chunk ids, merges all the chunks system output present in the li Args ---- -result_location or r: path to get the result of the chunks processing -chunk_file or c: path to directory where intermediate system output is stored -output_file or o: path to the output file generated -chunk_ids or i: list of chunk ids +result-location or r: path to get the result of the chunks processing +chunk-file or c: path to directory where intermediate system output is stored +output-file or o: path to the output file generated +chunk-ids or i: list of chunk ids Warning: this file should not be modified: see src/entry_points to add your source code. """ @@ -32,8 +32,8 @@ class ActevMergeChunks(ActevCommand): arg_parser.description = "Merge given chunk ids in a file and output NIST compliant system file" required_named = arg_parser.add_argument_group('required named arguments') - required_named.add_argument("-r", "--result_location", help="path to get the result of the chunks processing", required=True) - required_named.add_argument("-o", "--output_file", help="path to save the output file generated", required=True) - required_named.add_argument("-c", "--chunks_file", help="path to save the chunks in a json file", required=True) - arg_parser.add_argument("-i", "--chunk_ids", help="list of chunk ids", nargs='+') + required_named.add_argument("-r", "--result-location", help="path to get the result of the chunks processing", required=True) + required_named.add_argument("-o", "--output-file", help="path to save the output file generated", required=True) + required_named.add_argument("-c", "--chunks-file", help="path to save the chunks in a json file", required=True) + arg_parser.add_argument("-i", "--chunk-ids", help="list of chunk ids", nargs='+') arg_parser.set_defaults(func=ActevMergeChunks.command, object=self) diff --git a/diva_evaluation_cli/bin/actev_post_process_chunk.py b/diva_evaluation_cli/bin/actev_post_process_chunk.py index a2c1965..87b637f 100644 --- a/diva_evaluation_cli/bin/actev_post_process_chunk.py +++ b/diva_evaluation_cli/bin/actev_post_process_chunk.py @@ -31,5 +31,5 @@ class ActevPostProcessChunk(ActevCommand): arg_parser.description = "Post-process a chunk" required_named = arg_parser.add_argument_group('required named arguments') - required_named.add_argument("-i", "--chunk_id", help="chunk id", required=True) + required_named.add_argument("-i", "--chunk-id", help="chunk id", required=True) arg_parser.set_defaults(func=ActevPostProcessChunk.command, object=self) diff --git a/diva_evaluation_cli/bin/actev_pre_process_chunk.py b/diva_evaluation_cli/bin/actev_pre_process_chunk.py index 65c1176..5e7e3b8 100644 --- a/diva_evaluation_cli/bin/actev_pre_process_chunk.py +++ b/diva_evaluation_cli/bin/actev_pre_process_chunk.py @@ -30,5 +30,5 @@ class ActevPreProcessChunk(ActevCommand): arg_parser.description = "Pre-process a chunk" required_named = arg_parser.add_argument_group('required named arguments') - required_named.add_argument("-i", "--chunk_id", help="chunk id", required=True) + required_named.add_argument("-i", "--chunk-id", help="chunk id", required=True) arg_parser.set_defaults(func=ActevPreProcessChunk.command, object=self) diff --git a/diva_evaluation_cli/bin/actev_process_chunk.py b/diva_evaluation_cli/bin/actev_process_chunk.py index 2902b31..b754844 100644 --- a/diva_evaluation_cli/bin/actev_process_chunk.py +++ b/diva_evaluation_cli/bin/actev_process_chunk.py @@ -31,5 +31,5 @@ class ActevProcessChunk(ActevCommand): arg_parser.description = "Process a chunk" required_named = arg_parser.add_argument_group('required named arguments') - required_named.add_argument("-i", "--chunk_id", help="chunk id", required=True) + required_named.add_argument("-i", "--chunk-id", help="chunk id", required=True) arg_parser.set_defaults(func=ActevProcessChunk.command, object=self) diff --git a/diva_evaluation_cli/bin/actev_reset_chunk.py b/diva_evaluation_cli/bin/actev_reset_chunk.py index a6fef28..a45cd87 100644 --- a/diva_evaluation_cli/bin/actev_reset_chunk.py +++ b/diva_evaluation_cli/bin/actev_reset_chunk.py @@ -9,6 +9,7 @@ Delete all cached information for ChunkID so that the chunk can be re-run. Args ---- chunk-id or i: chunk id +system-cache-dir or s: path to system cache directory Warning: this file should not be modified: see src/entry_points to add your source code. """ @@ -31,5 +32,6 @@ class ActevResetChunk(ActevCommand): arg_parser.description = "Delete all cached information" required_named = arg_parser.add_argument_group('required named arguments') - required_named.add_argument("-i", "--chunk_id", help="chunk id", required=True) + required_named.add_argument("-i", "--chunk-id", help="chunk id", required=True) + required_named.add_argument("-s", "--system-cache-dir", help="path to system cache directory", required=True) arg_parser.set_defaults(func=ActevResetChunk.command, object=self) diff --git a/diva_evaluation_cli/src/entry_points/actev_reset_chunk.py b/diva_evaluation_cli/src/entry_points/actev_reset_chunk.py index 89c5ea4..5e056f4 100644 --- a/diva_evaluation_cli/src/entry_points/actev_reset_chunk.py +++ b/diva_evaluation_cli/src/entry_points/actev_reset_chunk.py @@ -5,7 +5,7 @@ Implements the entry-point by using Python or any other languages. """ import os -def entry_point(chunk_id): +def entry_point(chunk_id, system_cache_dir): """ Method to complete: you have to raise an exception if an error occured in the program. """ raise NotImplementedError("You should implement the entry_point method.") -- GitLab From 76d9e39d736c1a63c7ae05f97f6c40b513955d19 Mon Sep 17 00:00:00 2001 From: alexandreB Date: Wed, 24 Oct 2018 20:40:11 +0000 Subject: [PATCH 4/6] fix validation --- .../bin/private_src/validation/expected_validation_result.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diva_evaluation_cli/bin/private_src/validation/expected_validation_result.txt b/diva_evaluation_cli/bin/private_src/validation/expected_validation_result.txt index fd809bb..81826a7 100644 --- a/diva_evaluation_cli/bin/private_src/validation/expected_validation_result.txt +++ b/diva_evaluation_cli/bin/private_src/validation/expected_validation_result.txt @@ -4,6 +4,6 @@ actev_experiment_init - (file_index, activity_index, chunks, video_location, sys actev_pre_process_chunk - (chunk_id) actev_process_chunk - (chunk_id) actev_post_process_chunk - (chunk_id) -actev_reset_chunk - (chunk_id) +actev_reset_chunk - (chunk_id, system_cache_dir) actev_merge_chunks - (result_location, output_file, chunks_file, chunk_ids) actev_experiment_cleanup - () -- GitLab From a502848d1e0948ce64c3949ea851f2a8f624a52e Mon Sep 17 00:00:00 2001 From: alexandreB Date: Wed, 24 Oct 2018 21:41:17 +0000 Subject: [PATCH 5/6] add more information about installation in README --- README.md | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d5fe04d..7d63d5a 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ This repository contains: * an abstract CLI to implement on the `master` branch * an implementation example on the branch `baseline_system_master`. +You should fork the project and use the `master` branch in order to implement the entry point methods and get the updates. + Installation ============ @@ -21,10 +23,16 @@ git clone https://gitlab.kitware.com/alexandreB/diva_evaluation_cli.git Automatic installation ---------------------- -Go into the project directory and execute `install.sh`: +* Go into the clone of this repository: + +``` +$ cd diva_evaluation_cli +``` + +* Execute the following script: ``` -bin/install.sh +$ diva_evaluation_cli/bin/install.sh ``` Manual installation @@ -35,21 +43,30 @@ Manual installation In order to test your code with the CLI, you need to create a python package of the project. An editable package is the best option to avoid to package the project at each modification of the code. -Go into the project directory and run the following command to install the CLI: +* Go into the clone of this repository: + ``` -python -m pip install -e . --user +$ cd diva_evaluation_cli +``` + +* Run the following command to install the CLI: + +``` +$ python3 -m pip install -e . --user ``` ### Configure the PATH variable -Check that the $PATH environment variable contains `~/.local/bin`: +* Check that the $PATH environment variable contains `~/.local/bin`: + ``` -echo $PATH +$ echo $PATH ``` -If it is not the case, add it to the path: +* If it is not the case, add it to the path: + ``` -PATH="${PATH}:~/.local/bin" +$ PATH="${PATH}:~/.local/bin" ``` Test the installation @@ -58,7 +75,7 @@ Test the installation Run the following command: ``` -actev +$ actev ``` You should be able to see the available subcommands. @@ -73,7 +90,7 @@ Command line Run the following command to obtain help with the CLI: ``` -actev -h +$ actev -h ``` Documentation -- GitLab From 899f21f9219307ac1b52042046dc35c2d785b1f0 Mon Sep 17 00:00:00 2001 From: alexandreB Date: Wed, 24 Oct 2018 21:51:57 +0000 Subject: [PATCH 6/6] add a changelog --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..9f58697 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +1.1 - 10.24.18 +============== + +* Add a new argument to reset-chunk: --system-cache-dir +* Modify names of the arguments composed of multiple words. Example: --chunk_id becomes --chunk-id + +1.0 - 10.23.18 +============== + +* Release the abstract CLI: available on the master branch +* Release a baseline system CLI implementation: available on the baseline_system_master branch + -- GitLab