Cloning, Submitting, and "Sanity Checking" Assignments for cs107
You will work on the assignments for cs107 on the myth machines, which
you access via ssh (see the the how-to-log-in page for your
particular operating system).
For each assignment, you will "clone" a copy of the assignment into your own directory so you will be able to modify files. Some assignments will have randomized or user-specific data, and each student will have their own copy of the assignment.
The assignments are managed using a "version control system" called git,
which you may have heard about or used before. We will be using git in
a very rudimentary way, but you can
feel free to look into how git works
on your own. You may have also heard of or used GitHub before, and
GitHub is a web-based repository for git projects.
Note: Do not put any cs107 assignments online on GitHub or any other publicly available website. This is a violation of the Stanford Honor Code.
There are three commands you will have to know how to use to get, submit, and check your assignments (before submitting):
-- clone -- This command makes a copy of your assignment into a directory
on myth that you can access. Here is an example:
$ cd
$ mkdir cs107 # you only need to do this once at the beginning of the quarter
$ cd cs107
$ git clone /afs/ir/class/cs107/repos/assign0/$USER assign0
Cloning into 'assign0'...
done.
$ cd assign0
Type the above commands exactly as shown above, replacing assign0 with
assign1, assign2, etc., depending on the assignment you are cloning.
-- tools/sanitycheck -- This command is used to check if you have
completed the assignment such that it can be graded. Sometimes sanitycheck
runs tests on your code, sometimes it checks to see if you have updated
certain files correctly, etc. You should get used to using sanitycheck
very, very often in cs107! Example:
$ pwd
/afs/.ir/users/c/g/cgregg/107/assign0
$ tools/sanitycheck
Will run default sanity check for assign0 in current directory ~/107/assign0.
+++ Test 1-CheckReadme on ~/107/assign0
Descr: verify file(s) have changed from starter
NOT OK: Deferred
This project passes 0 of the 1 default sanity check cases.
$
If sanitycheck fails on a test before you submit the assignment,
you will lose points on that test when we grade the assignment. Just
becuase sanitycheck passes does not mean that your assignment is
correct, but failing a test means that it is not correct.
Note: You must be in your assignment directory to run sanitycheck for
a particular assignment.
-- tools/submit -- this is the way you submit cs107 assignments.
The submit command will ask if you want to run sanitycheck (you
probably should), and then it will submit the assignment. Example:
$ tools/submit
This tool submits the repo in the current directory for grading.
Current directory is ~/107/assign0
We recommend verifying your output is conformant using sanity check.
Would you like to run sanity check right now? [y/n]:y
...etc
You should ensure that your assignment is submitted before the deadline (or before the end of the grace period if there is one) -- we do not accept submissions after the deadline has passed.