Assignment Setup
These are intended for instructors and teaching staff only.
- Create repo
- Update the assignment
- GitHub Pages (web development only)
- Clear the git commit history
- Template repository
- GitHub Classroom
- Grading
Create repo
- 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/).
- 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. - Clone the repository locally.
Update the assignment
- Copy in the files from last year and make any necessary updates, including updating any links to the homepage, Canvas, or GradeScope. Previous years:
- https://github.com/NEU-DS-4200-S22 (Students, Classroom) New naming convention.
- https://github.com/NEU-CS-7250-S21-Staff (Students, Classroom)
- https://github.com/NEU-DS-4200-F20-Staff (Students, Classroom)
- https://github.com/NEU-CS-7250-S20-Staff (Students, Classroom)
- https://github.com/NEU-DS-4200-S20-Staff (Students, Classroom) New naming convention.
- https://github.com/Northeastern-DS-4200-F19-Staff (Students, Classroom)
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. - Move the main assignment text to the assignment page on the course website.
- Do any necessary package/library updates. E.g.,what’s in
requirements.txt
andrequirements-noversions.txt
. - Make sure the code actually works and that nothing has broken.
- Check all hyperlinks by hand, using the W3 Link Checker, or using the GitHub actions validations.
- Update the year in
LICENSE
. - Commit and push changes.
- 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.
- Commit the files and push to the
main
branch on GitHub. -
Then, run:
git branch gh-pages git checkout gh-pages git branch -D main git push origin gh-pages
- On GitHub, go to
Settings
->Branches
and set the default branch togh-pages
. -
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
- On GitHub, go to
Settings
and check the box forTemplate repository
at the top. This makes GitHub Classroom copies much faster.
GitHub Classroom
- Create the assignment on GitHub Classroom.
- Set the assignment title to be the same as the repository name and consistent with the other assignments for this class.
- 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 namedA1—Getting started—Introduction to Web Development
. - 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.
- Check the box
Grant students admin access to their repository
so that thegh-pages
branch is served properly. - 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 - Enable feedback pull requests.
- Update assignment.
- Enable the assignment invitation URL.
- 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;})();