I’m just a user of Github classrooms, but here’s what I’ve found from my time using it:
Is there a command-line administrative tool that would allow me to check-in changes to all of my students repositories at once?
As far as I know, no, but there is the Classrooms Assistant desktop application and the regular Github CLI tool. You’re also able to update your students’ repositories using the standard Github tools.
Between the three, I suspect you could build something that would suit your needs (my initial thought is to give a script the assignment URL, it then follows the repo links and checks out each of them, patches in the update, then pushes the updates back to each repo).
Probably more DIY than you were hoping, but also not impossible, I don’t think.
Is there a good way to ‘import’ tests into an assignment?
That might depend on exactly what you’re asking for here.
If you’re referring to after the students have created their own clones of the assignment, then there isn’t anything that I know of to add tests without updating their repositories. Classrooms is ultimately just a somewhat more convenient front end to the core of Github, so the student repositories aren’t really connected any more than repo forks are.
If you’re referring to the template repository itself, you can set up the tests and the autograding in the repo, instead of via the Github GUI, at least for the tests that can be represented in the code (unit tests and whatnot), I’m not certain about the I/O tests, since I don’t use them. Under the hood, autograding is just a regular Github Action. If you look at the student repos, they should have a
.github folder. In it,
workflows/classroom.yml can house the main workflow(s), and
classroom/autograding.json is where you configure the test commands and scoring (this is what’s generated via the Grading part of the Assignment creation GUI).
Updating this for the template repository will only affect assignments accepted after the update, but you can then use this change to update the student repositories using whatever method you find from your previous question.
Is there a way to ‘clone’ assignments?
I haven’t found a way to do this yet, either. My only thought is to just have a generic one that’s then reused, but given how it all works, I could get that getting really unwieldy and super quickly.
However, combining the two things above and basically bypassing the GUI might make that easier to do (perhaps a good opportunity for a third party tool?). Setting up autograding in the template repository is probably the single greatest step toward easier reusability. That alone probably gets you a good 90% of the way. The rest is figuring out how to automate the flow of creating a new assignment and setting its meta options. From a quick perusal of the docs, it looks like Probot might get you the other 10%, or at least would be a good starting point for reverse-engineering something that might work better for you if Probot doesn’t suit your needs for whatever reason.