Answers.Body: <p>In the auto grader I use, the following process is followed:</p>
  <ol>
  <li>The students files are copied into a pristine work area</li>
  <li>The &quot;provided&quot; file(s) are removed from the work area</li>
  <li>If I intend to use MOSS, the remaining files are copied for later use</li>
  <li>The &quot;provided&quot; file(s) are copied into the work directory</li>
  <li>The result is built (if necessary)</li>
  <li>Tests are executed and graded</li>
  </ol>
  <p>Note that the &quot;provided&quot; file(s) copied in at step 4 may be a superset of the file(s) provided to the student in the assignment and typically contain other/additional test cases.</p>
  <p>If the build fails because a student has modified a &quot;provided&quot; file, the students gets no points. If Java assignments, the provided file is often a interface, sometimes an abstract class. In C/C++ assignments, the provided file is often a header file.</p>
  <p>If some test cases are provided and reused verbatim in the final run, those test cases only account for 60% of the final grade. Thus, the student can not receive a passing grade by just making those test cases pass.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-24T18:11:38.317Z
Answers.LastActivityDate: 2021-01-24T19:22:05.297Z
Answers.LastEditDate: 2021-01-24T19:22:05.297Z
Answers.UserDisplayName: Fritz Sieker
Answers.Body: <blockquote>
  <p>1, 2, &amp; 3</p>
  </blockquote>
  <p>In most cases, I'm okay with them having the tests ahead of time. The only thing that concerns me a bit is that they can edit the tests, and GitHub would use those.</p>
  <p>What I do, and it's typically only on larger weight assignments, is to download all of the repositories. I'll then copy either a clean copy of the test files or a new set of test files and run that.</p>
  <p>Normally I'll put the clean files in the root of the projects I download and run something like <code>copy ../test.py . &amp; python test.py</code> to copy the clean version and use that.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-25T17:43:38.637Z
Answers.LastActivityDate: 2021-01-25T17:43:38.637Z
Answers.UserDisplayName: Ryan Nutt
Body: <p>I'm currently as a TA developing a series of programming assignments for a bachelor course on machine learning. Since we expect the number of students taking this course to grow in the future, we're looking at autograding to see if it's useful for us. In particular, we're looking at using <strong>Github Classroom</strong>. I have a number of related questions about this. Feel free to answer all or only some of them.</p>
  <ol>
  <li><p>Autograding leans heavily on unit tests to grade, and these unit tests are in the students' repositories. This means students can work on their code until it satisfies all the tests, which would result in a perfect grade. What kind of assignment setup/grading setups are possible that aren't so all or nothing?</p>
  </li>
  <li><p>Can you stop students from altering files in the repository that they're not supposed to alter? For example, if their starter code contains a file <code>assignment.py</code> and <code>tests.py</code>, can you enforce that they only change the assignment file?</p>
  </li>
  <li><p>Is it possible to apply hidden unit tests, that aren't visible in the students' starter code repository? For example, we might want them to implement a ML algorithm, then test it on a dataset they haven't seen yet, to see if it generalizes well. Also, it would enable us to have a tamper-proof unit test (see point 2).</p>
  </li>
  <li><p>What are general issues to watch out for when using autograding for (some of) the assignments in a course? Or Github Classroom-specific problems?</p>
  </li>
  <li><p>What are in general best practices for using autograding in a course?</p>
  </li>
  </ol>
  
Tags: <python><auto-graders><machine-learning><github><unit-testing>
Title: Using autograding (Github Classroom) - pitfalls and best practices?
ThreadText: # Using autograding (Github Classroom) - pitfalls and best practices?
  
  (Asked by: username_0 on 2021-01-24)
  
  I'm currently as a TA developing a series of programming assignments for a bachelor course on machine learning. Since we expect the number of students taking this course to grow in the future, we're looking at autograding to see if it's useful for us. In particular, we're looking at using **Github Classroom**. I have a number of related questions about this. Feel free to answer all or only some of them.
  
  1. Autograding leans heavily on unit tests to grade, and these unit tests are in the students' repositories. This means students can work on their code until it satisfies all the tests, which would result in a perfect grade. What kind of assignment setup/grading setups are possible that aren't so all or nothing?
  2. Can you stop students from altering files in the repository that they're not supposed to alter? For example, if their starter code contains a file `assignment.py` and `tests.py`, can you enforce that they only change the assignment file?
  3. Is it possible to apply hidden unit tests, that aren't visible in the students' starter code repository? For example, we might want them to implement a ML algorithm, then test it on a dataset they haven't seen yet, to see if it generalizes well. Also, it would enable us to have a tamper-proof unit test (see point 2).
  4. What are general issues to watch out for when using autograding for (some of) the assignments in a course? Or Github Classroom-specific problems?
  5. What are in general best practices for using autograding in a course?
  
  **Tags:** python, auto-graders, machine-learning, github, unit-testing
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-01-24. Score: 2
  
  In the auto grader I use, the following process is followed:
  
  1. The students files are copied into a pristine work area
  2. The "provided" file(s) are removed from the work area
  3. If I intend to use MOSS, the remaining files are copied for later use
  4. The "provided" file(s) are copied into the work directory
  5. The result is built (if necessary)
  6. Tests are executed and graded
  
  Note that the "provided" file(s) copied in at step 4 may be a superset of the file(s) provided to the student in the assignment and typically contain other/additional test cases.
  
  If the build fails because a student has modified a "provided" file, the students gets no points. If Java assignments, the provided file is often a interface, sometimes an abstract class. In C/C++ assignments, the provided file is often a header file.
  
  If some test cases are provided and reused verbatim in the final run, those test cases only account for 60% of the final grade. Thus, the student can not receive a passing grade by just making those test cases pass.
  
  
  ---
  
  ### Answer by username_2 on 2021-01-25. Score: 2
  
  > 1, 2, & 3
  
  In most cases, I'm okay with them having the tests ahead of time. The only thing that concerns me a bit is that they can edit the tests, and GitHub would use those.
  
  What I do, and it's typically only on larger weight assignments, is to download all of the repositories. I'll then copy either a clean copy of the test files or a new set of test files and run that.
  
  Normally I'll put the clean files in the root of the projects I download and run something like `copy ../test.py . & python test.py` to copy the clean version and use that.
  
  
  ---
  
  