Setup - mapto/sprks GitHub Wiki
Prerequisites
- Windows/Mac/Linux
- Python 2.7
- Limited testing done on python 2.6 - may work on other versions, but untested.
- Web Server (Apache, Lighttpd, etc)
- A CherryPy server can be used by directly running main.py, but is not recommended for production.
- MySQL Server
- Any servers under the same family (such as MariaDB) should also work.
Python Packages
The recommended way to install packages is using setuptools/easy_install. Same architecture as installed python version (x32/x64) is required. For Windows users, many binaries are available here.
- web.py
- See integration instructions here if not using default CherryPy server.
- Mysql-python
- Used to query MySQL server.
- scikit-learn
- The main framework used for the simulations/calculations.
- May require dependencies:
- numpy
- scipy
- matplotlib
- setuptools
- libatlas
For testing and development:
- pydot
- A framework to visualize graphs, used in the development of the simulator.
- Requires dependencies:
- pyparsing (v1.5.7)
- Graphviz
- py.test
- To automatically search for and execute tests.
- mock
- Used to mock objects for testing.
Installation
- Clone the master branch.
- Create a new database, and create the appropriate tables from the schema.
- Copy the configuration file to the root directory of the project (sprks/) as settings.py with the database settings set as required.
- Change ownership of /sessions/ and /static/data/ directory so that server deamon has access to create and delete files in them.
- Configure the web server (no need to do that for development - web.py runs its own server). Then run main.py to launch the inbuilt server, or run the web server of choice as configured during web.py setup. Currently the recommended way is to use apache2 and set up a dedicated
<VirtualHost>
for the simulation.