Using hwrun to submit your work

If the target machine for any assigned work is any of the dept. machines, it is cleaner (less error-prone) to submit your work right from the command-line on these machines, rather than download to your remote PC, then use a browser to upload to WebCT, so that the grader can retrieve it back to the dept. machines for grading.

Various people have worked on a family of submit wrappers. The history is now a little vague; look at the man pages.

In its current incarnation, submit_cli is a wrapper for SVN, Subversion, a revision control system (source safe).

You need 2 pieces of information to submit your work:

  1. The course name

    This is typically all lower-case, e.g., cs265. Your instructor should provide this.

  2. The ID for the assignment

    This you also really need to get right. I'm fixing up a script which will help, but you want to get this from the instructor.

    You can use the submit_chk4assign utility to see what is available for a given class for submission:

    submit_chk4assign -c class -v
    So, e.g.:
    submit_chk4assign -c cs265 -v

    Note: The assignment in the example above is l1, "ell-one". If your font makes it difficult to distinguish, find a different font, interface, whatever. Or, use the od utility. Finally, vi will identify the character under the cursor if you use the character sequence (from command-mode) g a.

It would be best if you had a dedicated directory for each lab, assignment, whatever.

Submitting

hwrun

This program is used to submit your assignment; it will also check for a makefile, and run make run, so, if you have a makefile w/a run target, you'll see the output.

This is useful as a sanity check. It will be running in an environment like the one we'll be running when we grade it. So, if you see your program compiling, running, whatever, we will too.

hwrun expects a tarball of the files for your assignment; it does not want the enclosing directory.

The easiest thing to do is to go to the directory where the file(s) is (are), and tar/compress the files this way:

tar czf tarfile *

You would then use the hwrun utility to submit the tarball containing your work:

hwrun -c class [-v] -a assn .

So, for example, lets say I have my files for lab1 in a subdirectory called lab1. Here's commands I might use:

kschmidt@tux64-03 lab1> submit_chk4assign -c cs265 -v
ClassID      Instructor           AssignID     AssignName      Due Date
cs265-200603 Zaychik & Schmidt    lab1           Lab 1           4/7/2007 05:00
cs265-200603 Zaychik & Schmidt    test         Bogus assn
kschmidt@tux64-03 lab1> tar czf l1.tgz lab1 vi_lab
kschmidt@tux64-03 lab1> hwrun -c cs265 -a lab1 l1.tgz

WARNING! Your username was discovered in one of the files you submitted !!!

--- THIS IS WHAT WE'LL SEE ---

2007-4-5 20:9:25        Extracted tar file
2007-4-5 20:9:25        Username found in one or more files!
2007-4-5 20:9:25        Running 'make run'
Checking for files: vi_lab lab1 /home/kschmidt/public_html/index.html
Done!

--- END OF LINE ---

Do not worry about the WARNING! line here. It is a relic, and will be gone whenever the updated script gets installed.

The line Checking for files: vi_lab lab1... is the output from the Makefile, and is not part of the script. That line will be different for various `run' targets.

If you realise you made a mistake, forgot a file, whatever, that's fine, just make your new tarball, and submit again (I used the -v flag here this time, so you can see more information):


kschmidt@tux64-03 lab1> hwrun -v -c cs265 -a demo l1.tgz
Course : cs265
Assignment : demo
Tarball : l1.tgz
Creating a temp directory
Created /tmp/kschmidt-1175818202.58I7Y9bT
Opened log file

WARNING! Your username was discovered in one of the files you submitted !!!
Running 'make run'
Cleaning up
Closed logfile
ClassID      Instructor           AssignID     AssignName      Due Date
cs265-200603 Zaychik & Schmidt    l1           Lab 1           4/7/2007 05:00
cs265-200603 Zaychik & Schmidt    test         Bogus assn      5/13/2007 05:00
cs265-200603 Zaychik & Schmidt    demo         Demo            5/23/2007 18:17
A    lab1
A    logfile.1175818191.11
A    vi_lab
A    Makefile
Checked out revision 14.
/tmp/kschmidt-1175818202.58I7Y9bT
A         logfile.1175818202.58
D         logfile.1175818191.11
Deleting       logfile.1175818191.11
Adding         logfile.1175818202.58
Transmitting file data .
Committed revision 15.

--- THIS IS WHAT WE'LL SEE ---

2007-4-5 20:10:2        Extracted tar file
2007-4-5 20:10:2        Username found in one or more files!
2007-4-5 20:10:2        Running 'make run'
Checking for files: vi_lab lab1 /home/kschmidt/public_html/index.html
Done!

--- END OF LINE ---

Deleted tmpdir

svnlook

You can use svnlook tree repository dir to see what files have been submitted. E.g.:

$ svnlook tree ~userId/SubmitRep/cs265-200603

Note, you'll need to find the particular class you're interested in.


Jesse has made a video of this process (it's 9 MB, just so you're warned): http://www.cs.drexel.edu/~jrb562/movies/hwrun.mpeg .