-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing Courses #166
Comments
I'm not sure about using the term Does it make sense to use Could it, for example be Alternatively a
|
Installing courses into a sub-directory of the hidden |
Here's the logic for the The install command is used like this:
And, we're going to support 3 types of thing to install
This means parsing
Installing from a local directory is just a case of copying the directory (recursively) to the Installing from a zip file involves:
Installing from a Github project involves:
|
Overview
Currently, when executing any of the
cmtc
commands it's necessary to pass a "studentified repo" path which points to where the command will be executed.This requires, of course, for the studentified version of a course to be present on the machine where the command is being executed.
What if the studentified version of the course could be downloaded automatically by the course management tools?
What if, once it has been downloaded, the course could be set as the default target for the
cmtc
commands?Implementation
What is proposed, then, is for the addition of 'package management' operations for the course management tools:
Install
The
install
command would allow a user to specify the course to be downloaded and have the course management tools automatically get the course from wherever it is hosted and place it on the local machine.This leads to two questions:
In an initial implementation i propose to have courses stored in Github repositories and use
git clone
to download the files (allowing for them to be easily kept up-to-date).So, the install command could just provide the
username/project
convention, for example:Would clone the
thinkmorestupidless/studentified-test
repository into some local location... where?Following the conventions of other tools it would make sense to have the notion of a
CMT_HOME
directory which defaults to~/.cmt
In
~/.cmt
would be located a*.conf
file which can store any global configuration necessary for the tool operations (which can be loaded when the tool is executed) and a~/.cmt/courses
sub-directory could store the courses themselves...Giving this layout:
Context
Once a course has been installed we need to be able to tell the course management tools which course in the
~/.cmt/courses
directory we want to have the course management tools operate on (that is, which course to talk to when we issuenext-exercise
,pull-solution
, etc)By have
*-context
commands we can have the course management tools write to a the~/.cmt/cmt.conf
file and read from that file to set acurrent-context
property which points to the location of the course we want to operate on.set-context
So, for example:
would result in
~/.cmt/cmt.conf
looking like:We can then load
~/.cmt/cmt.conf
when thecmtc
is executed and have the context available as a default (which could also be overloaded if a path is supplied by any of thecmtc
commands.get-context
To know the current context (which course i'm currently using) we can then add
cmtc get-context
which will just print the value ofcmt.current-context
to the screenThe text was updated successfully, but these errors were encountered: