The following libraries are required:
- libgts
- graphviz*
- libxslt
- libxml
The following npm packages are required:
- Babel
- Bower
To install, do the following:
-
Clone the repository
-
Install pip dependencies from
server/requirements.txt(preferably, using virtualenv) -
Install bower dependencies to
client/componentsusingclient/bower.json -
Run babel to compile JS:
babel -o client/js_dist/syllabus.js client/js -
Create
server.cfg, settingSQLALCHEMY_DATABASE_URIvariable, which specifies the database to use**
For debugging, run:
python server/debug.py
This will run standalone Flask server, which you can connect to locally.
Otherwise, for production, use uWSGI, and point it to the app from server/server.py.
(*) Graphviz should be compiled with GTS support enabled, otherwise graphs might look weird. In Ubuntu, the only way to do that is to install libgts dev libraries, and compile/install Graphiz manually. For OS X, use --with-gts homebrew flag when installing graphviz.
(**) E.g. for SQLite database:
SQLALCHEMY_DATABASE_URI = "sqlite:////Users/artur/syllabus.db"
Various other configuration variables are available. Full list provided in [http://flask.pocoo.org/docs/0.10/config/#builtin-configuration-values](flask documentation).
add_initial_data.py script could be used to create initial database using the files from initial_data folder. For usage instructions, run
python add_initial_data.py -h