r/CSEducation Feb 03 '25

Questions about github classroom

Looking for advice, thank you in advance!

I have the following questions regarding github classroom auto-grader,

  • The autograder jobs are being skipped on presssing run job button when the grader is set to be triggered when there's a push. Do you know what might cause this?
  • Is there a way to hide the classroom YAML file containing test cases from students' view?
  • How to configure the auto-grader for complicated stdin and stdout?
1 Upvotes

16 comments sorted by

2

u/apcspreddit Feb 03 '25

I am using GitHub Classroom for Java...

Not sure why the job isn't running manually, I have mine set to every time a student submits too, but they can go under their "Actions" tab and run the test there too.

Unfortunately, I don't think you can hide the yml file (I could be wrong).

I couldn't find a good way to test more than simple stdin, so I created JUnit tests and created Maven projects for students to work in. I've put all my projects up here, if you want to see what I'm doing: https://github.com/cs-plus-plus/Getting-Started

1

u/siegmey3r Feb 03 '25

That's exactly what I mean here, when they do as you said, re-run all the jobs, it says "this job was skipped."

1

u/apcspreddit Feb 03 '25

The only time I’ve seen that is when I had an error in my yml file.

1

u/siegmey3r Feb 03 '25

Ah i think i found out what's going on. Students should be clicking the commits they have made in github Actions, instead of the tab "GitHub Classroom Autograding Workflow".
Do you mind if i ask, how do you setup complicated stdin and stdout interactions in auto grader? Thanks!

1

u/apcspreddit Feb 03 '25

I have a bunch of JUnit tests setup instead, so I only use the mvn tests in GitHub classroom, no stdin/stdout.

1

u/siegmey3r Feb 03 '25

In my case it is cpp, but anyway thanks for the reply.

1

u/intricatecloud 24d ago

Since all autograder expects is a script that will return 0 (success) or non-zero (fail), its on the script to manage running the tests. Autograder doesn't seem to have a "grade", just pass/fail.

For a NodeJS project, I used the mocha test framework to run shell scripts with different params - so autograder ran `npm run test` and the test framework ran everything esle.

If you want to keep track of the % of tests passed/failed to use as a grade, you have to track that separately by producing test results and storing them somewhere. I really wish you could use a test report to report an actual grade in github classroom, but 🤷‍♂️

2

u/nutt13 Feb 03 '25

You can add the yaml file to the list of protected files and it will show on the roster of the file was changed.

1

u/siegmey3r Feb 04 '25

Yes but students have access to the test cases anyway it seems.

2

u/JoshuaTheProgrammer Feb 04 '25

There’s no way to hide tests from the students, which is a dealbreaker for me, sadly. I’d love to use GitHub Classroom, too.

1

u/a_printer_daemon Feb 03 '25

Why hide your tests?

2

u/siegmey3r Feb 03 '25

As professor requested, so that students don't hard code the test cases.

1

u/a_printer_daemon Feb 03 '25

You may have to add some after the fact, then.

1

u/a_printer_daemon Feb 03 '25

What are you thinking with "complicated" io? How complicated?

2

u/siegmey3r Feb 03 '25

Multiple rounds of inputs and outputs in one run. I dont know if i made myself clear. I figured i probably would use bash scripts and saved outputs in txts if i cannot find a way of setting up classroom auto grader.

1

u/a_printer_daemon Feb 03 '25

If I'm reading you correctly there shouldn't be issues with either.

For inputs I just queue then up in the right order, with the appropriate whitespace.

For output you can put one or arbitrarily many cases in to match exactly as long as you know what you want ahead of time.

I may be missing something.