Workspace Repository Setup


1. Accept the GitHub Classroom “COMP110 Workspace” Assignment

  1. Navigate to https://classroom.github.com/a/m8NQWEhE
  2. “Accept” the assignment and select your e-mail address from the list of students in the class. If you do not see it, continue without selecting and let us know in a private message on Piazza.
  3. Please wait a moment while your repository is setup. The progress bars can take a few minutes to complete.
  4. Once ready you will see a link to your repository. Click it to be brought to your Workspace Repository on GitHub. You’ll learn more about this through the course.
  5. Look for the Green “Clone” Button. Click it.
  6. You should see “Clone with HTTPS”
    • If you do not, click the HTTP link in the corner of the popup.
  7. Click the Clipboard icon to copy your repository’s URL to your computer’s copy/paste clipboard. You’ll need this address in the next step.

2. Setup your Workspace in Visual Studio Code

  1. Open Visual Studio Code
  2. Open the View menu and select Command Palette
    • You’ll use the Command Palette a lot so it’s worth trying to remember its shortcut!
    • Windows: Control+Shift+P
    • Mac: Command+Shift+P
  3. Type in “Git: Clone” (without the quotes) and press Enter.
  4. Paste your Workspace Repository URL copied above in part 1, step 7).
    • Right click in the text box and select Paste
    • Or use the Paste keyboard shortcut: Control+V Windows / Command+V Mac
  5. Press Enter and you will be asked where you want your course workspace repository to be saved on your computer. Just accepting the default suggestion is OK.
  6. Press OK when asked if you would like to Open the repository after it downloads.

3. Installing Libraries and Plugins

  1. Select “Install All” in the popup notifying you “This workspace has extension recommendations.”
    • Pass on / ignore any prompts to install additional libraries such as pytest or flake8.
  2. Open the File menu, followed by Open Recent and you should see the top entry listed as something like “comp110-workspace-USERNAME” where USERNAME is your GitHub username.
    • If you do not, try the steps of the previous section again.
  3. In the future, if you open VS Code and need to get back to your COMP110 Workspace, the easiest way is to repeat step 2 above.
  4. In the bottom, blue “status bar” you should now see Python followed by a version number. If the version number is not there or is not 3.8.3 or greater, follow the next bullet:
    • Open the View menu and Command Palette. Type “Python: Select Interpretter” (without the quotes) and press Enter. From the list that pops up choose Python 3.8.3 or greater.
  5. Open the View menu and select Terminal to bring up the built-in terminal.
  6. In the Terminal type the following command, being careful to match it exactly.
  1. Press Enter to run the command. This command installs additional Python libraries, which give you special functionalities used later in the course.

4. Configure your git Name and E-mail

  1. If your Terminal window from above is still open, great! If not, open a new Terminal pane in VS Code.
  2. At the prompt, type the following command and press enter with your primary e-mail address inside the double quotes:

git config --global user.email "your@primary.email"

  1. Then, type tye following command and press enter with your first and last name inside the double quotes:

git config --global user.name "Your Name"

After doing this, when you make backup commits in git (which you’ll do shortly!) they’ll be correctly attributed to you.

5. Setup Upstream Course Material Repository

As new material is added through the course you will be able to easily download it into your personal course workspace repository after following these steps.

  1. Open the View menu and select Command Palette
  2. Type in Git: Add Remote and press enter with the option selected.
  3. Copy and paste the URL below into the text box that says “Provide repository URL” and press enter:
    • https://github.com/COMP110-20ss2/course-material.git
  4. When asked for “Remote name” type in:
    • upstream
  5. Press enter.
  6. Open the View menu and select Command Palette once more
  7. Type in Git: Fetch From All Remotes and press enter
  8. The upstream remote repository is now registered! In an upcoming lesson you will learn how to download new material from this repository.

Once you’ve completed this, your workspace is ready to go! If you are getting started with the course, return back to Exercise 0 - Getting Started to continue!