dodona-edu / universal-judge

Universal judge for educational software testing
https://docs.dodona.be/en/tested
MIT License
9 stars 5 forks source link

Add better CLI #455

Closed niknetniko closed 10 months ago

niknetniko commented 10 months ago

Add a better way to run TESTed from the command line, by introducing a "CLI" mode:

$ python -m tested.cli --help
usage: cli.py [-h] -e EXERCISE [-s SUBMISSION] [-t TESTSUITE] [-f] [-p PROGRAMMING_LANGUAGE]

Simple CLI for TESTed

options:
  -h, --help            show this help message and exit
  -e EXERCISE, --exercise EXERCISE
                        Path to a directory containing an exercise
  -s SUBMISSION, --submission SUBMISSION
                        Path to a submission to evaluate
  -t TESTSUITE, --testsuite TESTSUITE
                        Path to a test suite
  -f, --full            If the output should be shown in full (default: false)
  -p PROGRAMMING_LANGUAGE, --programming_language PROGRAMMING_LANGUAGE
                        The programming language to use

additional information: The CLI only looks at a config.json file in the exercise directory. It does not look in folders above the exercise directory.

This should make it easier to run TESTed on an exercise locally. Note that this is in addition to the two existing ways of running TESTed (with the main script, python -m tested for production and python -m tested.manual for working on TESTed itself).

Also link to the Dodona docs from the readme.

Closes #453.