Get the Assignment

Starter Project

Accept the GitHub Classroom invitation

  • Click the link provided to you for the lab or homework starter project.
  • A remote repository will be created in https://github.com/2023-fall-comp801 - labN-xxx or hN-xxx, where N is the lab/homework number, xxx is your GitHub username (for example, lab1-gracehopper).
  • This remote repository is your starter project for the lab or homework assignment.

Find the correct place for your assignment directory

On your computer, use git-bash or terminal.

  • Double check that you are in your home directory. From there, change directory to comp801 course directory.

  • From comp801, change directory to the appropriate place where your new assignment project will be:

    • comp801/labs if you clone a lab starter project
    • comp801/homework if you clone a homework starter project
  • Double check that you are in the CORRECT place, with

    pwd

    It should show the absolute path of your current directory.

  • Do NOT create labN or hN empty directory. Such directory is automatically created when you clone the remote repo to your local machine.

Note: All these operations above can also be done using PyCharm Terminal*. All you need to do is to Open your comp801 in PyCharm, open PyCharm Terminal, and ensure you’ve selected git-bash as local terminal in PyCharm, if on Windows.

Clone the remote starter project for your assignment

Once you are in the CORRECT place, clone the remote starter project using the following command in the git-bash or terminal:

git clone <URL-of-labN-xxx> labN

OR

git clone <URL-of-hN> hN

  • Note that the git clone command has two arguments:
    • URL-of-la(or h)bN-xxx is the URL of your remote repository.
    • lab(or h)N is the name you give to your local repo. This argument is optional. If you don’t have it, by default the local repo will have the same name as the remote repo, lab(or h)N-xxx, which is not as clean as lab(or h)N
  • To get the URL of the remote repo, click on the green button Code in GitHub, and copy the HTTPS URL.
    • Paste it in the git clone command as shown above.
  • Test that you have the starter project on your machine with

    ls -al

  • Inspect the repo with the following commands to know more about the local repo and its remote location.
    git status
    git log
    git remote -v
    
  • Learn more about git from the Atlassian tutorial on git listed on the website Awesome List.

Quick tour of the assignment starter project

In PyCharm, have the Project, editor, and Terminal windows open. -Examine the content of the files and directories:

  • Python modules: All *.py files
  • Hidden files, such as .gitignore, .gitattributes, .editconfig
  • Hidden directories, such as: .git, .github, .venv
  • Markdown files, such as README.md
  • In the PyCharm Terminal window:
    • Check the absolute path of the current directory
    • Change directory to the location of the assignment starter project
    • Run git log to understand the history of the development of assignment starter project.
  • Open the Python source code files and examine them in the PyCharm Editor window
    • Are there warnings or errors detected? See the upper, right corner of the editor screen, and whether there are red, yellow, or green check marks.
    • What do the docstrings of each module, class, method, or function say?
    • How can you run and test the code?
    • Is there a main() function? Where is it located?
    • Are there testing functions? How can they be run?
  • In PyCharm Terminal
    • Figure out how to run and test the code.