Welcome to the GradingScripts, home of all the scripts needed to grade the class GCIS-123/124!
Here is a brief guide for how to use the grading scripts for GCIS-123/124. In this quick guide, I’ll be going over how to use these scripts, each of there purposes, and how to use them for the first time. If you’re not a CA for GCIS-123/124, please stop reading. Or don’t. Not like this will be a very entertaining read.
- Python 3.10 or newer
- Git 2.30.0 or newer
NOTE: Required Python modules are installed at script start.
- versionmanager.py: Check remote repo for updated release
- PyGithub: Library to interact with GitHub API
Before we get started with other things, let’s make sure you have installed what you need to actually run the scripts.
If you don't have Python installed already, lets get that installed. Head to https://www.python.org/downloads/ and download the latest version, make sure to check the Add Python 3.X to PATH
button if you're on Windows.
Now that you have the package installed you can now run the scripts, huzzah! But wait, what’s this information you need? It doesn’t just work? Blasphemy!
Well, that’s what we’re going over next, what you should have access to for grading. We have 2 scripts, each of which does the same thing but can be run differently. Included is also a ./data
folder. This folder contains config.json which will be created after running the script for the first time and is used for storing information that should be consistent across the semester, primarily your Github Authentication token and the Github Organization name.
You’re probably thinking, “What’s a Github Authentication token?”. Basically it’s a token generated by Github that can be used to login to your Github account through the scripts. Needless to say, if you plan on using these scripts, you need to make a token. So let’s go over that now.
Some extra information about these tokens, you won’t be able to see them again after you get out of the page, so paste it in another file, or to where the script prompts you. The script will store it so you only have to do this once. However, if you delete the token on Github, the token will be rejected and you’ll need to delete or edit the config.txt file in order to be able to use them again. The script will give you an error if you use an invalid token.
The next thing you’ll need to do is get the organization name from Github. This is relatively easy compared to making a personal access token. Once you’re added to the organization, you should be able to access it on the left of the Github homepage.
In order to ensure you spell it right, it’s recommended you click on the organization and copy the organization name from the link at the top of your browser, and then enter it into the script when prompted.
Finally we will be getting a classroom roster csv file from Github Classroom in order to make grading easier. This will allow the script to change github usernames to peoples actually names. The script will also only clone the entries in the csv file. This is option of couse but is highly recommended so that you don't have to clone every repo from the organization every time.
Steps | Guiding Images |
---|---|
Go to https://classroom.github.com/classrooms and login if needed | |
Go to your classroom/organization for the semester | |
At the top click on the Students tab |
|
Then under classroom roster, click download |
|
Then click Download without group names |
And Tada! You now have a CSV file containing all the students for your classroom. I recommend opening the CSV file to delete the entries of students you will not be grading.
I also recommend placing the classroom roster file into the ./data/csvs
folder.
After you enter all the information, the script will clone all the repositories and put them all into the folder specified. Inside will be a folder named after the assignment name and the date/time specified.
One last thing to note, first time running the script might need to be done with admin privileges. So, start it in an admin powershell/cmd/whatever window. This is to properly install the pip packages required for the script to work.
Congratulations! You’ve either read or skimmed through my entire guide. May your grading be easy and enjoyable thanks to these scripts!
- Add direct auth with github?
- Add bulk clone option to run multiple clones from options a csv/json file
- sqlite?
- improve usage of
context
- Add tests for student repo with no commits
- Add test for timezone fix
- Add test for data folder extraction
- Add tests for update functions
- Add tests for version class
- Add tests for AtomicCounter class