Closed jteijema closed 1 year ago
The tests now fail succesfully.
ERROR: [Errno 2] No such file or directory: '/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/asreviewcontrib/makita/templates/script_test.template'
Error: Process completed with exit code 1.
The actions now succesfully capture failure. Note however that ShellCheck does not find broken comments (see #29). Any ideas @J535D165
See https://github.com/asreview/asreview-makita/actions/runs/5179385864/jobs/9332191777 for example, where a missing shebang is not excepted from ShellCheck.
./tmp/multiple_models/jobs.sh:1:1: error: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. [SC2148]
./tmp/basic/jobs.sh:1:1: error: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. [SC2148]
./tmp/arfi/jobs.sh:1:1: error: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. [SC2148]
All generated templates are checked for everything in https://github.com/koalaman/shellcheck/blob/master/README.md#user-content-gallery-of-bad-code
https://raw.githubusercontent.com/jteijema/asreview-makita/workflow-testing/.github/workflows/test_data/labels.csv Needs to be adjusted to the proper URL
I've updated the linter to include template files.
Run for file in asreviewcontrib/makita/templates/*.template; do
Modified file: asreviewcontrib/makita/templates/doc_README.md
Modified file: asreviewcontrib/makita/templates/script_get_plot.py
Modified file: asreviewcontrib/makita/templates/script_get_settings_from_state.py
Modified file: asreviewcontrib/makita/templates/script_merge_descriptives.py
Modified file: asreviewcontrib/makita/templates/script_merge_metrics.py
Modified file: asreviewcontrib/makita/templates/script_merge_tds.py
Modified file: asreviewcontrib/makita/templates/script_split_data_with_multiple_labels.py
Modified file: asreviewcontrib/makita/templates/template_arfi.txt
Modified file: asreviewcontrib/makita/templates/template_basic.txt
Modified file: asreviewcontrib/makita/templates/template_multiple_models.txt
Very nice @jteijema ! Improvements are possible, so Im encouraging everyone to extend and improve this test suite.
This PR adds tests to verify the correct functioning of makita.