Trying to Organize Lessons Dependencies
At a previous post I wrote about steps to build a lesson manager. At this post you will find some words about issues for the first step are keep me wake at night.
We can divide package managers in three groups:
- When the files are installed at /bin, /lib, /usr/bin, /usr/lib, /usr/share, ... E.g. apt-get, yum, ...
- User Space
- When the files are installed at ~/bin, ~/lib, ... E.g. gems, npm, ...
- When the files are installed at the currently directory (or in a sub-directory of the currently directory). E.g. bower, component, ...
IMHO, the more suitable is the local ones because will be easy to users know where the lesson was installed.
Lessons has a dependence tree (black lines at the figure below) to be solved by the package manager but learners will use a path (read lines at the figure below) to read the lessons.
One of the nice features of bower is that all the dependencies are installed as siblings, i.e.
$ bower --config.directory=. install https://github.com/SoftwareCarpentryLessonManager/novice-git-backup $ ls -1 novice-git-backup/ novice-git-intro/ novice-shell-filedir/ novice-shell-intro/
The problem is that our learner don’t have a tip for where he/she must start.
We can try solve the previous problem prepend a number to each directory, e.g.
$ ls -1 01-novice-shell-intro/ 02-novice-shell-filedir/ 03-novice-git-intro/ 04-novice-git-backup/
Unfortunately bower doesn’t has a feature to add the correctly number and include some number at the package metadata will easily make someone get duplicate numbers.
Create Metadata When Install Lesson
One of the features that bower doesn’t have (and we try to address at the sprint) is that when using
$ bower --config.directory=. install https://github.com/SoftwareCarpentryLessonManager/novice-git-backup
bower won’t create a metadata file to make possible update the lesson using
$ bower update