Autograding Python Files

Hi all! I’m a Course Assistant for a new course at my school and I’m currently trying to set up autograding for python files. However, it seems that no matter where I put the files for autograding, the autograder can’t find them. Just saying ‘no such file or directory exists’ when the file is clearly in the repo. I’ve tried putting it in a source folder, just in the repo, etc but to no avail. Does anybody have any tips for setting up autograding? I just can’t figure out where to put the file so that the autograder also sees it.

1 Like

It’s not that clear what exactly is your issue. Sharing the link of your repo might help.

Also, GitHub education provides example repos on how to setup autograding. For Python it is https://github.com/education/autograding-example-python

When you create a new assignment select template and type education/autograding-example-python and then add a python test.

Hope this helps.

It actually started working all of a sudden and I have no idea why. I put the python file back in the initial spot I started it in (and the one my professor started it in) and it suddenly started working. I appreciate the response!

It actually started working all of a sudden and I have no idea why

This happens to my students all the time. It doesn’t work; they tell me it doesn’t work; and then I come over to see what’s up; and it works.

I always chalk it up to my secret power. That’s one secret power; the other is that I can put students to sleep just by the sound of my voice. :wink:

1 Like

So I managed to figure out why it happened, so I’ll explain it so that hopefully nobody in the future makes the same mistake as me and my Professor. Basically, I was hitting the “re-run jobs” button within the grading area, assuming it would use the newest commit. That’s very wrong, it stays at the commit the job was initially created in, in this case, an empty repository (which explains why the error was “can’t find python file”.

By the time I started opening up the new testing areas, I had already moved the file, so the new tests would all give the same error of ‘python file not found’ with the older working tests deleted. I moved it back to the initial spot just out of sheer desperation and, lo and behold, it worked, like it did initially, I just didn’t quite realize how the tool worked. When I looked back at the older tests I saw that it was working the whole time, much to my relief and anguish.

© 2017 GitHub, Inc.
with by
GitHub Education