Skip to content

Getting Started with the Web App

Justin Mi edited this page Jul 7, 2017 · 7 revisions

The web app is written in Django. The root project folder is app/.

Getting Started

  1. Clone the repository
$ git clone https://github.com/BerkeleyAutomation/malasakit-v1.git
  1. Create a virtual environment for the app so you can have a compartmentalized, isolated set of dependencies for the project. This makes managing dependencies across multiple contributors easier.
    1. Popular choices include virtualenv or Conda
    2. Make sure you install Python3 onto the virtual environment
    3. Every time you work on the app, make sure you are in the virtual environment
  2. Enter into your virtual environment
  3. Install the Python dependencies. The easiest way to install these packages is to use pip, a Python package manager, by running
$ pip install -r requirements.txt

Overview of Python Packages

The following is the list of Python packages we use for this app, and a nano-description of each.

  • django: the web application framework we use
  • djangorestframework: a REST framework library for Django
  • pylint: a code style evaluator
  • pylint_django: a pylint plugin that is aware of Django-specific conventions
  • scikit-learn: a machine-learning library for Python
  • numpy: a numerical computation library
  • scipy: a library for scientific computing

Data

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

After this command, you should now see a db.sqlite3 file in the malasakit-django directory.

To obtain a populated SQLite file, contact the maintainers.

Running the Application

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. Next, open up a web browser, navigate to localhost:8000. If everything worked, you should see a landing page.

After you are finished with this Getting Started guide, check out our Git Workflow and Code Style