All homework in this class will be submitted using GitHub. Before you can submit an assignment, follow our system setup instructions to ensure you have a GitHub account and have the right software installed.
At the beginning of the semester, we will send an announcement through Canvas with instructions to be added to our class GitHub organization. Once you’re in our class organization, you will have a GitHub repository at https://github.com/36-750/assignments-YOURUSERNAME. The system setup instructions describe how to clone this repository to your computer.
Starting a homework assignment #
Browse the problem bank for an assignment that looks interesting to you, based on its topic and difficulty level. We recommend you choose assignments based on the skills you want to develop the most.
Once you’ve picked a homework assignment you’d like to do, open a terminal and ensure you have the latest problem bank:
cd ~/s750/problem-bank
git pull origin master
Next, move to your assignment repository on your computer:
cd ~/s750/assignments-YOURUSERNAME
The new-homework
script provided there will help you make a new branch for the
assignment and install template files. Select the programming language you
plan to use and run one of the following commands:
# For R:
python new-homework.py r assignment-name
# For Python:
python new-homework.py python assignment-name
# For any other language, including SQL, or
# assignments that don't require programming:
python new-homework.py other assignment-name
Replace assignment-name
with the name of the homework assignment exactly as
written in the problem bank, e.g. cow-proximity
or markov-babbler
.
The script will create a new branch for this assignment and install template files in a subdirectory. Edit these files to begin working on your assignment.
Work on only one assignment per branch. If you want to stop working on one assignment and switch to another, commit your work, then switch branches.
Submitting a homework assignment #
Once you’re ready, commit your work (with git add
and git commit
). When
you’re ready to submit:
- Run your unit tests and ensure they pass! R users can use the
check.R
script provided in your repository, like so:This will run your tests and lint your code for style. Python users can runRscript check.R assignment-name
pytest
(for unit tests) andflake8
(for style) as inpytest test_assignment_name.py flake8 .
- Push your work to GitHub (
git push
). - In your web browser, go to your private repository on GitHub. Click the “New pull request” button.
- As the “base” branch, choose
main
. As the “compare” branch, select this assignment’s name. - Scroll down. You’ll see a listing of the commits included in the pull request and the diff the TAs will review. Make sure this includes the work you intend to submit and nothing else. If it looks wrong, stop and ask for help.
- Press “Create pull request”.
- Give your pull request an informative title specifying the assignment you’re submitting. If required in the assignment, answer any questions in the comment box.
- On the right-hand side, under “Reviewers”, select
36-750/tas
, which will notify all the TAs. - Press “Create pull request”.
Your assignment is now submitted and ready for the TAs to grade. It may take several days, or up to a week, for them to review your assignment, depending on how many assignments are in their queue.
You should only submit one assignment per pull request, and work on one assignment on each branch.
Code review #
The TAs will review your code and leave comments if any issues need to be
fixed. If they determine you have mastered the assignment, they will approve
the pull request and merge it into your main
branch, and it will be counted
toward your points total automatically.
Code review is based on the programming rubric.
Don’t panic if the TAs leave lots of comments. Because you can revise your work, we often leave comments about stylistic issues and small problems, so receiving a lot of comments does not mean your work is bad.
Each assignment and project may be revised at most twice.
To resubmit an assignment #
If the TAs determine that your assignment needs revisions, they will mark your pull request “Changes requested”. If you don’t understand their comments, you should always feel free to reply and ask for clarification. You can also consult us during office hours.
To make revisions, you do not need to make a new pull request. Simply follow these instructions:
-
Make sure you’re on the branch you used for the assignment (
git switch assignment-name-here
). -
Make your revisions and run your tests.
-
Commit your revisions (
git add
andgit commit
). -
Push the revisions to GitHub (
git push
). -
Go to GitHub and find your previous pull request. Your commits should appear there. Request review again to notify the TAs it’s ready for regrading, using this button: