Link Search Menu Expand Document
Last updated: | Permalink

Assignment Setup

These are intended for instructors and teaching staff only.

Create repo

  1. Go to this year’s staff GitHub organization. E.g., https://github.com/NEU-DS-4200-F23 (some previous years were of the format https://github.com/NEU-CS-7250-S21-Staff/).
  2. Create the new repository using a meaningful name, consistent with the other assignments for this class. E.g., A1--Getting_started--Web_Development with two dashes (–) between the designation, assignment name, and part name; underscores separating words; and each word capitalized.
  3. Clone the repository locally.

Update the assignment

  1. Copy in the files from last year and make any necessary updates, including updating any links to the homepage, Canvas, or GradeScope. Previous years:

    Note: This includes any Fork it on GitHub links in index.html files. Also, if the naming convention for GitHub organizations changes, you need to update the link checker exclusions in .github/workflows/validate-html-css-and-links.yml so that the student’s private repo doesn’t count as a 404 link.

  2. Move the main assignment text to the assignment page on the course website.
  3. Do any necessary package/library updates. E.g.,what’s in requirements.txt and requirements-noversions.txt.
  4. Make sure the code actually works and that nothing has broken.
  5. Check all hyperlinks by hand, using the W3 Link Checker, or using the GitHub actions validations.
  6. Update the year in LICENSE.
  7. Commit and push changes.
  8. Make the repository Public.

GitHub Pages (web development only)

It is necessary if using GitHub Classroom to set up GitHub pages for the students, as they do not have admin permissions on their repository. To do this, we need to create and move everything to the gh-pages branch and delete the main branch.

  1. Commit the files and push to the main branch on GitHub.
  2. Then, run:

     git branch gh-pages
     git checkout gh-pages
     git branch -D main
     git push origin gh-pages
    
  3. On GitHub, go to Settings->Branches and set the default branch to gh-pages.
  4. Then, run:

     git push origin :main
    

Clear the git commit history

In order to make things as straightforward for the students as possible, we want to give them only a single commit to start with.

  • If you’re using only the main branch run these commands:

      git checkout --orphan newBranch
      git add -A                      # Add all files and commit them
      git commit -m "Initial commit"
      git branch -D main              # Deletes the main branch
      git branch -m main              # Rename the current branch to main
      git push -f origin main         # Force push main branch to github
      git gc --aggressive --prune=all # remove the old files
    
  • If you are using the gh-pages branch instead run:

      git checkout --orphan newBranch
      git add -A                      # Add all files and commit them
      git commit -m "Initial commit"
      git branch -D gh-pages          # Deletes the gh-pages branch
      git branch -m gh-pages          # Rename the current branch to gh-pages
      git push -f origin gh-pages     # Force push gh-pages branch to github
      git gc --aggressive --prune=all # remove the old files
    

Template repository

  1. On GitHub, go to Settings and check the box for Template repository at the top. This makes GitHub Classroom copies much faster.

GitHub Classroom

  1. Create the assignment on GitHub Classroom.
  2. Set the assignment title to be the same as the repository name and consistent with the other assignments for this class.
  3. Change the pre-set repository prefix so that it includes two dashes (–) between the type of assignment and the name of it. E.g., A1--Getting-Started--Introduction-to-Web-Development for the assignment named A1—Getting started—Introduction to Web Development.
  4. Set the deadline (23:59 of the due day), make sure it matches the assignment on the course website, and make sure it is Eastern time.
  5. Check the box Grant students admin access to their repository so that the gh-pages branch is served properly.
  6. Set the template repository you created from above as the starter code. E.g., enter NEU-DS-4200-F23/A1--Getting_started--Web_Development. If it doesn’t show up, check the repo is a template and public and ask the instructor to make sure GitHub Classroom is authorized for the semester’s organizations using this link: https://github.com/settings/applications#authorized
  7. Enable feedback pull requests.
  8. Update assignment.
  9. Enable the assignment invitation URL.
  10. In the assignment on the course website, include the new assignment invitation URL and template repo link URLs.

Grading

This bookmarklet takes you from a GitHub repo to the Files pane of the first pull request—i.e., the one GitHub Classroom creates for you:

javascript:(function () {var path = window.location.pathname; var newPath = path + '/pull/1/files'; window.location.href = newPath;})();

© 2023 Cody Dunne. Released under the CC BY-SA license.