Working with Codespaces

Homework

Getting Started with Homework in Codespaces

This guide walks you through using GitHub Codespaces to complete and submit your homework assignments using Jupyter notebooks. Everything runs in the cloud—no need to install anything locally!


1. Launching a Codespace

  1. Visit your GitHub homework repository.
  2. Click the green Code button → Codespaces.
  3. If none exists, click Create codespace on main.
  4. Wait for it to finish setting up (usually 1–2 minutes).

2. Opening Your Notebook

  1. In the left Explorer pane, find your assignment file (e.g., release/hw-01.ipynb).
  2. Click to open it. It will launch in a Jupyter interface directly inside Codespaces.
  3. Click the ▶ Run Cell button or use Run All from the top menu.

Reminder: Answer all parts of the question and run each code cell before submission.


3. Saving Your Work

Your notebook saves automatically, but you still need to commit your changes to submit:

  1. Stage your work: ```bash git add .

  2. Commit with a message:

    git commit -m "Completed Homework 1"
  3. Push to GitHub:

    git push origin main

🚨 Important: Your instructor will only see work that is pushed to GitHub.


4. Submission & Autograding

  • Autograding runs automatically every time you push to GitHub.
  • You’ll receive feedback as a GitHub Issue in your repository titled “Homework X Feedback”.
  • Deadlines are enforced: If you push after the due time, your score may be penalized.

Tip: Push before the deadline to avoid any late penalties. Only the latest commit before the deadline counts as “on time.”


5. Shutting Down Safely

  • When you’re done, click the green Codespaces icon in the lower-left → Stop Codespace.
  • To return later, go back to the Codespaces tab on GitHub and reopen your environment.

Common Commands

Task Command
Stage changes git add .
Commit changes git commit -m "Done with HW"
Push to GitHub git push origin main
Check Python python3 --version
Install packages* pip install -r requirements.txt

* Usually preinstalled in Codespaces, but available if needed.


✅ Submission Checklist