Grading environment with specific Python version in path.
Includes following extra packages:
Tags
Images are tagged with Python and grading-base versions in format <python>-<grading-base>
.
Version tag can also include uN
meaning update N where N is an increasing number.
The update part is used to indicate updates to the image, where software versions did not change.
For an example, 3.5-2.0u1
includes Python 3.5 on top of grading-base 2.0 and has one update after first release.
There is also few additional versions of the image:
math-*
includes python packages matplotlib, scipy and numpy on top of basebokeh-*
includes python package bokeh on top of base
Utility commands
In addition to grading-base, this container provides following utilities.
-
graderutils [arguments]
Executes
graderutils.main
python module usingcapture
wrapper (check grading-base). Provided arguments are passed to the python module. If there is no arguments, then the module is executed with/exercise/test_config.yaml
is the first argument. In other words, if you define graderutils configuration intest_config.yaml
, you only need to havegraderutils
in config.yamlcmd
field. -
unittest
Alias for
python3 -m unittest
. Adds/exercise
toPYTHONPATH
. -
unittest-capture
Wrapper around
capture
andunittest
python module. Adds/exercise
toPYTHONPATH
. Does executeerr-to-out
if there is no errors. -
unittest-testcase [-t title] [-p points] [-s skip] [unittest arguments]
Wrapper around
testcase
andunittest
python module. Adds/exercise
toPYTHONPATH
. Arguments are passed totestcase
and unittest arguments for the python module. Checktestcase
documentation in grading-base. -
python-compile-all
Alias for
python3 -m compileall
. Use it to validate python syntax of input files before tests. -
run-all-unittests [-S] [-p points_per_test_class]
Command to do it all. Can replace
run.sh
in trivial cases.First, script validates syntax, unless
-S
is provided. If syntax is not valid, no tests are run. Second, script finds all files matching*test*.py
pattern from submission and exercise paths. Then, it runs every class that directly inheritsunittest.TestCase
usingtestcase
andunittest
. Testcase will givepoints_per_test_class
many points per successful execution of unittest.