Skip to content

Run single board algo-test on multiple input files.

Abanti Ranadhir Sahasransu requested to merge AlgoTestMultipleInputFiles into master

AIM

Allows to run the single board run-algo-test on multiple input files simultaneously. See directory src/swatch/cli/demonstrators.py.

Also includes the following functionalities.

  1. Adds corresponding unit-tests in directory tests/cli/demonstrators/test__makemultifile_replacements_list__.py.
  2. Adds corresponding fsm-runner tests in directory src/swatch/demo/fsm_runners/algo_test.py.
  3. Removes the armv7 build support from CI/CD jobs due to end of life support for CentOS7. Creates #48 . See .gitlab-ci.yml.

NOTES

Adds an extra option --file-indices which takes a range as input of the form <start_index>-<end_index> to specify multiple input files and produce corresponding output files. When specifying the above option it is necessary to include the phrase {file_index} in the path of the input and output files. For an input data file option of the form dir1/dir2/input_data{file_index}.txt, an output data file option of the form outdir1/outdir2/output_data{file_index}.txt and --file-indices 98-101 the command searches for the following input files in the directory of the running code:

dir1/dir2/input_data\textcolor{red}{\text{98}}.txt

dir1/dir2/input_data\textcolor{red}{\text{99}}.txt

dir1/dir2/input_data\textcolor{red}{\text{101}}.txt

and results in an output with the following file names where the number marks the corresponding output file to a specific input file.

outdir1/outdir2/output_data\textcolor{red}{\text{98}}.txt

outdir1/outdir2/output_data\textcolor{red}{\text{99}}.txt

outdir1/outdir2/output_data\textcolor{red}{\text{101}}.txt

The file range of the form 98-101 or 098-101 or 101-98 or 101-098 result in identical behaviour.

Optionally, one could also include formatting of the form {file_index:0<padding>} in the input and output file path for 0 padded output.

Ex: For --file-indices 98-101, input file path: dir1/dir2/input_data{file_index:04}.txt and output file path: outdir1/outdir2/output_data{file_index:05}.txt,

the following inputs are used

dir1/dir2/input_data\textcolor{red}{\text{0098}}.txt

dir1/dir2/input_data\textcolor{red}{\text{0099}}.txt

dir1/dir2/input_data\textcolor{red}{\text{0101}}.txt

and the following outputs are created

outdir1/outdir2/output_data\textcolor{red}{\text{00098}}.txt

outdir1/outdir2/output_data\textcolor{red}{\text{00099}}.txt

outdir1/outdir2/output_data\textcolor{red}{\text{00101}}.txt

Edited by Abanti Ranadhir Sahasransu

Merge request reports