ELTE-Clean/Clean-Administration-Platform

Grading script is failing

Closed this issue · 12 comments

While working on PR #84 the grading script was failing for multiple reasons. I managed to make the script runnable in the linked PR but it is still not working correctly.

Here are the backend logs:

2022-06-06T19:45:31.685Z [DEBUG] Correction Script Configuration: 

teacher_file: ./grades/tasks/1/teacher.icl

student_files:

  - ./grades/tasks/1/1.icl

  - ./grades/tasks/1/2.icl

test_questions:

  - q0:

    function_name: addInt

    test_cases:

      - 1 2

      - 5 13

      - 12 99

  - q1:

    function_name: subInt

    test_cases:

      - 3 4

      - 3 2

      - 23 32


2022-06-06T19:45:31.685Z [DEBUG] Executing Script: python ./scripts/scripts/CorrectTest.py -f ./grades/tasks/1/config.yml -tn 1

2022-06-06T19:45:31.776Z [DEBUG] Execution Result: Imported  Start = addInt 1 2


ERROR with the test case: addInt 1 2

Imported  Start = addInt 5 13


ERROR with the test case: addInt 5 13

Imported  Start = addInt 12 99


ERROR with the test case: addInt 12 99

Imported  Start = subInt 3 4


ERROR with the test case: subInt 3 4

Imported  Start = subInt 3 2


ERROR with the test case: subInt 3 2

Imported  Start = subInt 23 32


ERROR with the test case: subInt 23 32

ENDD

file:  ./grades/tasks/1/1.icl

Imported  Start = addInt 1 2


ERROR with the test case: addInt 1 2

Imported  Start = addInt 5 13


ERROR with the test case: addInt 5 13

Imported  Start = addInt 12 99


ERROR with the test case: addInt 12 99

Imported  Start = subInt 3 4


ERROR with the test case: subInt 3 4

Imported  Start = subInt 3 2


ERROR with the test case: subInt 3 2

Imported  Start = subInt 23 32


ERROR with the test case: subInt 23 32

ENDD

file:  ./grades/tasks/1/2.icl

Imported  Start = addInt 1 2


ERROR with the test case: addInt 1 2

Imported  Start = addInt 5 13


ERROR with the test case: addInt 5 13

Imported  Start = addInt 12 99


ERROR with the test case: addInt 12 99

Imported  Start = subInt 3 4


ERROR with the test case: subInt 3 4

Imported  Start = subInt 3 2


ERROR with the test case: subInt 3 2

Imported  Start = subInt 23 32


ERROR with the test case: subInt 23 32

ENDD

results for student: 1



results for student: 2



{'1': {'addInt': {}, 'subInt': {}}, '2': {'addInt': {}, 'subInt': {}}}

2 files in 0:00:00.020088

indentation of the testcases part is incorrect I think. function_name and test_cases should have one extra spacing. @the4t4

@Mohido that was not the issue

It is even failing with the config.yaml and grading script given in the repo

bruh clm isn't even installed in the containers @Mohido

Yeap, forgot about that. However, the above indentation (in the issue description) is not correct as well. For the CLM, you will need to install it in the Dockerfile same as I did with the python script. @the4t4 I truly hope there is an alpine version of CLM. Otherwise, upgrade the image OS to another simple Linux distribution.

The error logs shown here are not because of the indentation. I didn't find any images for clm and my ubuntu does not have it either and I don't know which inux distro has it because there is zero information about clm on the web.

There is no distribution comes with CLM installed on it. You will have to install it manually (same as I did with python). If there is no CLM compiler for alpine, lets think of producing an image with another Linux distribution.

I meant that I could not even install it on ubuntu

I see, the installation part is tricky. You will need to change some system variables. Read the Readme file that is inside the .taz file of the compiler. You can put the gicen 2 lines of shell code at the end of your .profile script on your linux machine.

I don't have any files why don't you send a link to whatever you are talking about or quickly do it yourself if it isn't hard

I am not saying it is not hard, I am saying it can be the issue that you have not setup your system variables (The most common issue when comes to installing clean on linux).
Download the clean compiler for Linux: https://clean.cs.ru.nl/Download_Clean
Inside the .tar.gz file, you will find the instructions written in a text file. I don't remember what was the file name (Has been a century since I downloaded CLM on a Linux device).

Add these lines to the end of your .profile file. Hopefully they will fix the error

  • cpm relies on the environment variable CLEAN_HOME to point to where you installed Clean to find libraries and executables.
  • So for example if you have installed clean in '/home/myusername/clean' you should add the following exports to your .bashrc/.profile/etc
  export CLEAN_HOME=/home/myusername/clean
  export PATH=$PATH:$CLEAN_HOME/bin

I hope this helps @the4t4