Переглянути джерело

Flesh out interface

master
Ben Kurtovic 8 роки тому
джерело
коміт
3a2a52fecf
3 змінених файлів з 95 додано та 6 видалено
  1. +54
    -3
      README.md
  2. +40
    -2
      rakefile
  3. +1
    -1
      spec/cs241h

+ 54
- 3
README.md Переглянути файл

@@ -25,11 +25,62 @@ Usage

kgrader uses rake as its command-line interface.

To do some basic housekeeping:
### Setup

To load a roster for a course semester:

rake roster cs123 sp2016 myroster.csv

### Grading

To grade a particular assignment (e.g., "mp1" for the "cs123" course):

rake grade cs123 mp1

After verifying that everything looks good, push the grade reports with:

rake commit cs123 mp1

### Housekeeping

To show all known classes, semesters, and assignments:

rake list

To do some basic cleanup (i.e., trash uncommitted grading attempts, or reset
messy internal state after a bad run):

rake clean

To restore kgrader to its factory defaults (i.e., delete checked-out student
repos and any uncommitted grading attempts):
To restore kgrader to its "factory defaults" (i.e., everything `clean` does,
but also delete checked-out student repos and roster files -- dangerous!):

rake clobber

### Advanced

`grade` has an extended syntax for different options.

To specify the semester, instead of the inferred current one:

rake grade cs123 mp1 semester=sp2016

To set a cutoff date after which commits will be ignored:

rake grade cs123 mp1 due="March 20, 2016 11:59:59 PM CDT"

To grade without fetching new student repo changes:

rake grade cs123 mp1 fetch=no

To grade specific students only:

rake grade cs123 mp1 students=ksmith12
rake grade cs123 mp1 students=ksmith12,bcooper3,mjones14

Normally, kgrader will only regrade a particular student's assignment if their
repo has changed since the last run. To forcibly regrade:

rake grade cs123 mp1 regrade=yes

You can combine these arguments in any meaningful way.

+ 40
- 2
rakefile Переглянути файл

@@ -1,12 +1,50 @@
require_relative 'lib/kgrader'

def get_cli
KGrader::CLI.new Rake.application.original_dir
end

task :clean do
cli = KGrader::CLI.new Rake.application.original_dir
cli = get_cli
# TODO: also purge uncommitted grades
cli.reset_jail
end

task :clobber do
cli = KGrader::CLI.new Rake.application.original_dir
cli = get_cli
# TODO: confirm
cli.reset_jail
cli.reset_desk
end

task :list do
# TODO
puts '[list!]'
end

task :roster do
# TODO: [course, assignment, rosterfile]
puts '[installing roster!]'
end

task :grade do
puts ARGV.inspect
course = ARGV[1]
assignment = ARGV[2]

task course.to_sym {}
task assignment.to_sym {}

# TODO
puts "Grading #{assignment} for #{course}..."
puts " - semester:"
puts " - due:"
puts " - fetch:"
puts " - students:"
puts " - regrade:"
end

task :commit do
# TODO: [course, assignment], semester=, students=
puts '[committing!]'
end

+ 1
- 1
spec/cs241h

@@ -1 +1 @@
Subproject commit 7da2784b2255082339483744aa388cab2e016126
Subproject commit a0a432cb96f38c230355e3e5b12bbf131beb04bd

Завантаження…
Відмінити
Зберегти