This is a set of Hairball plugins that correspond to the Kelp curriculum.
If you are checking out the source, the simplest way to install everything is
python setup.py develop. This will install all the dependencies of the
project. You may need to prefix that line with
sudo if you are installing at
Once installed in development mode, the command
kelp can be run from any
directory (regardless of where your source directory is located).
You can also use the Github application, but if you'd rather use terminal, here are some useful commands:
Check out the source
git clone firstname.lastname@example.org:charlottehill/KelpPlugin.git
Commit changes - first test your code using flake8. To install flake 8:
pip install flake8
To run flake8 (from inside your KelpPlugin directory):
Review what files you modified. (commands are from inside your KelpPlugin directory)
If you want to review the changes you made in detail:
Add the files you changed to the list of stuff you'll later commit:
git add filename
Run git status again to make sure that you added what you wanted to add and nothing extra. You can also use this to look over what you're about to commit:
git diff --staged
Add a commit message so other people can get a idea of what you did without looking through the code.
git commit -m "replace with your message"
Push the code.
git push # The first time you push run # git push -u origin master
If the remote repository has changed since you last pulled, you might get an error here. Here are the basic steps for merging, although it can get more difficult. First, pull the latest version.
If you have any merge issues, figure those out. Otherwise, merge the two heads.
git commit -m "Merged heads"
Then push again
Running Plugins Offline
Basically, you're going to run Hairball but tell it to use the Kelp plugins and use the Kurt octopi plugin so that it can read .oct files.
Offline.py calls Hairball and figures out which plugins you need for your lesson and project.
- scenes (just runs the same stuff as costumes)
- (none yet)
If you just want to use the default lesson with no extra project plugins, leave
For now, you have to have octopi.py in the same directory as the plugins, but we can change that if you'd like. Assuming you have installed the kelp package as per the above instruction run:
kelp filename.oct lessonname [projectconcept]
For example, if you want to run the
sequential lesson plugin on
you would run:
kelp project.oct sequential
If the file you want to analyze,
test.oct is in a directory named
testfiles you will want to run:
kelp testfiles/test.oct sequential