Break it and win a beer!
Hi! I want to be as mindful as possible with your time, but the truth is we really need some testing, so this is what You should focus on:
I have written an autograding program called unitgrade
, which runs a bunch of unittests on the students computer and then writes a file with the extension .token
containing the results. I am worried when/if this program breaks, and one of the main challenges in this regard are computers with odd directory layouts.
Therefore, when you follow the installation guide, please unpack the code in a folder with a stupid name. For instance, this could be
/home/tuhe/Documents/øh_my --..-- eyæs/
But please get creative! We basically want to find a folder that (1) vscode accepts (2) unitgrade fails on.
This is specifically what you should do next:
- Follow the installation guide here: https://cp.pages.compute.dtu.dk/02002public/installation/installation.html
- If you don't use VS Code for moral reasons, please make sure you run the pip command in the last step: https://cp.pages.compute.dtu.dk/02002public/installation/installation.html#step-5-install-the-course-toolbox-and-software-packages
- Go to tests in the activity panel. Check that all tests are there. Do you need to press refesh? Can you run the tests?
- the expected behavior is that all tests fail, i.e. they are red, but there should be tests for week 3+4
- Find and run the file cp/project2/project2_grade.py . It should generate a .token file. Check that you get 0 points (it will say so in the name of the token file. The token file will be in the same folder as the script.
- Now you complete a project assignment. Open the file
cp/ex03/bisect.py
. Then replace the first function with:
def f(x):
y = math.sin(3 * math.cos(0.5 * x**2))
return y
- Rerun the cp/project2/project2_grade.py -script. Check that you get more than 0 points.
Join discord (link here https://cp.compute.dtu.dk/) if you have any questions or see something funny.