-
Notifications
You must be signed in to change notification settings - Fork 8
Setup
To get a copy of Malasakit on your local machine, navigate to your directory of choice, then run
$ git clone https://github.com/BerkeleyAutomation/malasakit-v1.git
Feel free to clone the repository with SSH instead, if you know how.
Malasakit is written primarily in the Python and JavaScript programming languages.
To be able to run Malasakit, your machine must have a web browser and a Python 2 interpreter (preferably Python 2.7).
Python is typically shipped with most Unix-like systems, including macOS and Linux.
You can verify your version of Python by running python -V
from the command line.
In addition, Malasakit uses additional packages that are not included in a base Python installation. These packages include:
-
django
: a web application framework -
openpyxl
: a library for reading and writing Microsoft Excel spreadsheets -
numpy
: a numerical computation library -
pylint
: a code style evaluator -
pylint_django
: apylint
plugin that is aware of Django-specific conventions -
pyyaml
: a library for parsing YAML files -
django-htmlmin
: a Django plugin that minifies a rendered templates's HTML before serving the page (reduces the amount of data that needs to be sent to the client)
The easiest way to install these packages is to use pip
, a Python package manager, by running
$ pip install -r requirements.txt
from the top level of the repository.
This will install the packages in the requirements.txt
file globally, which typically requires superuser privileges (that is, sudo
).
Alternatively, you may only want to install packages locally for this particular project.
The virtualenv
tool, which can be installed with pip
, lets you do this by simulating an isolated Python environment.
To run virtualenv
, from the top level of the repository, run
$ virtualenv venv
$ source venv/bin/activate
Then, to install the dependencies locally, run the pip
command given like you would for a global installation (see above).
To leave the virtual environment, use
$ deactivate
You can always set up a virtual environment with Anaconda.
This repository does not include data generated in production.
To set up a local database for development purposes, from the malasakit-django
directory, run
$ python manage.py migrate
Once you have run the migration command, run
$ python manage.py runserver
to bring up a local development server, which will print out helpful debug information if necessary.
Next, open up a web browser, navigate to localhost:8000/pcari
. If everything worked, you should see a landing page.