Grading environment with specific Python version in path.
Includes following extra packages:
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.
Newer tags include the version of Python grader-utils in the middle of the tag.
For example, 3.7-3.3-3.1
includes Python 3.7 and Python grader-utils 3.3 on top of grading-base 3.1.
There is also few additional versions of the image:
math-*
includes Python packages matplotlib, scipy, numpy and bokeh on top of the base and in addition, openpyxl, xlrd and xlwt for Excel file parsingml-*
includes Python packages pandas, scikit-learn and numpy on top of the math layerjupyter-*
includes Python packages nbconvert and ipython on top of the ml layerrdf-*
includes Python package rdflib on top of the basexls-*
includes Python packages xlrd and xlwt on top of the base for parsing Excel filesply-*
includes the Python package PLY (parser and lexer generator)smt-*
includes pysmt and dd on top of the ply layery2-*
(for the Basic Course in Programming Y2 course) includes Python packages pyqt6, coverage, networkx and pyvirtualdisplay on top of the basemec-*
(for the Mechatronic Machine Design course) includes Python packages requests, bs4 and validators on top of the math layerpsql-*
includes PostgreSQL server and the Python package psycopg2comp-*
(for the Competitive Programming course) includes Python packages requests, bs4, pandas, lxml and html5lib on top of the base
In addition to grading-base, this container provides following utilities.
-
graderutils [--use-iotester] [--use-rpyc] [--novalidate] [--container] [--show-config] [--develop-mode] [--exercise-path <absolute-path>] -- [<test-config-absolute-path>]
-
--use-iotester
Create the necessary directory structure with the correct permissions required by iotester.
-
--use-rpyc
Use RPyC (Remote Python Call) to import and call student code running in a separate process.
-
--novalidate
Skip validation of test config.
-
--container
This flag can be used when running graderutils inside docker container based on apluslms/grading-base to raise and print exceptions that occur in graderutils itself to stderr (normally not used).
-
--show-config
Print test configuration into warnings.
-
--develop-mode
Display all unhandled exceptions unformatted. Also implies
--show-config
. By default, exceptions related to improperly configured tests are caught and hidden behind a generic error message. This is to prevent unwanted leaking of grader test details, which might reveal e.g. parts of the model solution, if one is used -
--exercise-path
Change the directory where grader tests are run. Default is
/exercise
. Personalized programming exercises can set this to/personalized_exercise
.
Executes
graderutils.main
(orgraderutils.__main__
when--use-rpyc
flag is set) Python module usingcapture
wrapper (check grading-base). Provided arguments, except for--use-iotester
,--use-rpyc
, and--exercise-path
, are passed to the Python module. If there are no arguments, then the module is executed with/exercise/test_config.yaml
as the first argument. In other words, if you define graderutils configuration intest_config.yaml
, you only need to havegraderutils
in the 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.