@@ -22,26 +22,49 @@ During autograder setup, a configuration script named [`config.sh`](../jmu_pytes
2222This script sets the environment variables used by [ ` run_autograder ` ] ( ../jmu_pytest_utils/template/run_autograder ) and other grading scripts.
2323
2424You can override the default values in ` config.sh ` by defining global variables with the same names.
25- For example, to limit the number of submissions, you can add the following line to your test module (after the ` import ` statements):
26-
27- ``` py
28- SUBMISSION_LIMIT = 10
29- ```
30-
31- Alternatively, you can define environment variables that apply to all assignments.
32- For example, the default time zone is ` US/Eastern ` , but if your school is somewhere else, you can set this variable in your OS environment:
33-
34- ``` sh
35- export SCHOOL_TIME_ZONE=" US/Mountain"
36- ```
25+ For example, you can add any of the following lines to your test module after the ` import ` statements:
26+
27+ * Limit the number of submissions:
28+ ``` py
29+ SUBMISSION_LIMIT = 10
30+ ```
31+ * Change pytest' s --timeout value:
32+ ``` py
33+ FUNCTION_TIMEOUT = 10
34+ ```
35+ * Specify packages to be installed:
36+ ``` py
37+ REQUIREMENTS_TXT = [" beautifulsoup4" , " requests" ]
38+ ```
39+
40+ Alternatively, you can define environment variables that apply to * all * assignments.
41+ For example, you can export these variables before running `jmu_pytest_utils build` :
42+
43+ * Change the submission time zone:
44+ ``` sh
45+ export SCHOOL_TIME_ZONE = " US/Mountain"
46+ ```
47+ * Install a specific python version:
48+ ``` sh
49+ export INSTALL_PYTHON_V = " 3.14"
50+ ```
3751
3852The [`builder.py` ](../ jmu_pytest_utils/ builder.py) script automatically detects assignment files using `os.walk()` .
3953However, you can manually override the file requirements if needed.
40- For example, to specify the files that students must submit, add a line like this to your test module:
41-
42- ``` py
43- SUBMISSION_FILES = [" file1.py" , " file2.py" ]
44- ```
54+ For example:
55+
56+ * Files the student must submit:
57+ ``` py
58+ SUBMISSION_FILES = [" file1.py" , " file2.py" ]
59+ ```
60+ * Reference tests for grading:
61+ ``` py
62+ AUTOGRADER_TESTS = [" test_file1.py" , " test_file2.py" ]
63+ ```
64+ * Other files included in zip :
65+ ``` py
66+ ADDITIONAL_FILES = [" data/hello.txt" , " data/world.txt" ]
67+ ```
4568
4669When looking at `config.sh` , note that Bash and Python represent a list of files differently.
4770Bash uses a space- delimited string (Ex: `" file1.py file2.py" ` ), but Python uses a list of strings.
0 commit comments