Design and implement generic travo Python script
Single-assignment single-repo course; no course configuration
travo fetch <url> <assignment_dir>
travo submit <assignment_dir>
assignment_dir may default to "."?
Strategy when url is specified:
- set the assignment url to
- set the assignment from the basename of assignment_dir or of url
- set the work dir to assignment_dir, or "." if not specified
Strategy when assignment_dir is specified:
- set assignment to the basename of assignment_dir
- set student_dir to the dirname of assignment_dir
- check that assignment_dir is the root of a git repo
- recover the remote of origin
- if a fork: recover the original repo this is a fork of
Build a course as usual from the above information
With course configuration
Fetch the course configuration
travo setup <course_url>
The url can point to either:
- the configuration from some repository
- a repo containing the configuration file
- the description of the course's group ???
The configuration is stored in ~/.travo/courses/.
Run a course operation:
travo <course_url> fetch/submit/...
travo <course_name> fetch/submit/...
travo <course_directory> fetch/submit/...
Example: travo . fetch Semaine1
<course_url>: the configuration is downloaded as above <course_name>: the configuration is retrieved from ~/.travo/courses/<course_name>. <course_directory>: the configuration is retrieved from /.travo/course. (or superdirectories?)
In case of ambiguity, try first <course_name> and then <course_directory>. It's likely to give the same result.
Edited by Nicolas Thiéry