Skip to content

Usage of ta_judge

Huang, Po-Hsuan edited this page Apr 15, 2022 · 5 revisions

Example of hw3

Step 1

  • Download the pack file, e.g., drive-download-20200916T141657Z-001.zip, of all submitted files from moodle
  • Unzip it and rename the output directory to zip and put it into a wrap folder, e.g., compiler_hw3/
  • Download student's name and ID from moodle's score system to student.xlsx, which has two columns: Name and StudentID
    • For example:
      名字 學號
      王小明 F12345678
      陳小美 F12345679
      ... ...
      吳小華 F22345678

Step 2

  • Prepare the inputs and answers and put them into a folder named judge_resources/

Step 3

  • Open the wrap folder, i.e., compiler_hw3/, and initialize the environment
$ virtualenv --python python3.6 env
$ source env/bin/activate
$ pip install local-judge[ta]
  • Remember to install dependency packages, e.g, flex, bison, default-jdk

Step 4

  • Download the config file to wrap folder
  • Note that you may need to modify some fields, e.g., the file extension, before judgement.
$ curl -L https://raw.githubusercontent.com/aben20807/local-judge/master/configs/hw3_ta_judge.conf > ./ta_judge.conf

After Step 1~4

compiler_hw3/
├── drive-download-20200916T141657Z-001.zip
├── env/
├── judge_resources/
│   ├── answer/
│   └── input/
├── student.xlsx
├── ta_judge.conf
└── zip/
    ├── student_1/Compiler_F12345678_HW3.zip
    ├── student_2/Compiler_F12345679_HW3.rar
    ...
    └── student_n/Compiler_F22345678_HW3.zip

Step 5

  • Start to judge
$ ta_judge

Step 6

  • Result in hw3.xlsx
  • Judge log in ta_judge.log
Clone this wiki locally