CS61A Tutorial: Submitting Assignments

Here is a simple guide that will help you submit all your assignments for CS61A. Don't worry: it's easy!

The Basics

Before we begin to submit an assignment, we need to check for a few things:

  1. We are logged into our CS61A account (i.e. cs61a-bh).
  2. We have the files we need to submit in our account.
  3. We know what assigment we are supposed to submit.

To submit assignments for this class, we will use a simple command line program called—wait for it—submit. To start submitting an assigment, type submit, followed by the name of the assignment. When we are at the prompt, we should see something like this:

star [16] ~/hw1 # submit hw1
This means that we are currently in our homework 1 directory, indicated by ~/hw1, and that we are submitting the assignment hw1, the first homework assignment.

Tap return and you should then see
Looking for files to turn in....
Submitting hw1.py.
The files you have submitted are:
        ./hw1.py 
Is this correct? [yes/no]
Now, all you need to do is type yes and you're good to go! You are completely done when submit mentions
Copying submission of assignment hw1....
Submission complete.

Few Simple Rules

Here are some simple rules that you need to know to make sure all of your assignments get submitted properly.

Names

submit only accepts certain names for assignemts, but they are easy to remember:

  1. hw#, for each homework assignment.
  2. proj#, for each project.
If you type in an incorrect name, submit will kindly remind you of all possible assignments.

Files

submit is only trained to look for certain files depending upon the assignment. In CS61A, we will provide you all of the files you will need to submit for each homework assignment and project. If you try to change the name of the file that submit is expecting (or the file isn't there), submit will let you know what files need to be present for the submission to be successful.

Looking for files to turn in....
Turn in ./interesting_file.something?  [yes/no] yes
You must turn in a file hw1.py for this assignment.
Here is the complete list of files you must turn in:
  hw1.py 
Error: submission FAILED.
If you have subdirectories (that is, a directory within a directory), then submit will ask you whether or not you would like it to check those.
nova [32] ~/hw1 # submit hw1      
Looking for files to turn in....
Look at files in directory ./Another_Dir? [yes/no] yes
Look at files in directory ./Another_Dir/And_Another? [yes/no] yes
Look at files in directory ./Another_Dir/And_Another/WHEN_WILL_IT_END? [yes/no] yes
Look at files in directory ./Another_Dir/And_Another/WHEN_WILL_IT_END/NOW? [yes/no] no
Skipping directory ./Another_Dir/And_Another/WHEN_WILL_IT_END/NOW.
Turn in ./interesting_file.something?  [yes/no] yes
Submitting hw1.py.
The files you have submitted are:
        ./hw1.py ./interesting_file.something 
Is this correct? [yes/no] yes
Copying submission of assignment hw1....
Submission complete.

Some Tips

These will help you make the most effective use of submit.

  1. Remember that you tell submit the name of the assignment you are submitting, not the current directory.
  2. Whenever submit asks for [yes/no], typing in y is equivalent to typing in yes (and similarly, n for no).
  3. While you may submit from your home directory (~/), it is often best to create a separate folder for each assignment. This is to avoid having submit ask you if you would like to submit every, single, file in your current directory (including all hidden files used by Unix for its own purposes). Keeping your assignments organized by making separate directories for each assignment will make your life easier (i.e. proj1/, hw1/, etc.).
  4. If you want to cancel a submission while submit is running, issue the abort command with the key combination Ctrl-C.
  5. Finally, our submission system allows for repeated submits. We will always grade your last submission. Just make sure your last submission is done before the assignment deadline!
Remember, submit is a Unix program, so if you need any help don't forget to check out our Unix Tutorial and information on connecting to your CS61A account. You can also get a brief description of submit using the command submit -h.

If you have any other questions about submit or anything else CS61A related, don't forget to ask your friendly neighborhood staff or post on Piazza. ☺