Commit 2d2c50cc975e20d71bd47f5bd4a6b4ca8812c5b2

Authored by Andrew Buss
1 parent a7099dd7a4
Exists in master

updated README.md

Showing 1 changed file with 57 additions and 32 deletions Side-by-side Diff

1   -# flashy.cards
  1 +# Flashy
2 2  
3   -All of these commands should be run from this directory (the one containing README.md)
4   -
5   -## Installing Flashy on Ubuntu 14.04
  3 +Flashy is a realtime collaborative flashcard sharing app combined
  4 +with a spaced-repetition study system. Flashy was developed by
  5 +CSE 110 students in spring quarter 2015:
6 6  
7   -Ubuntu 14.04 is the officially supported platform for the
  7 + - lhawkins
  8 + - ckwang
  9 + - arnog
  10 + - abuss
  11 + - rray
  12 + - rlee
  13 + - mjeng
  14 + - kmach
  15 + - mrahman
  16 + - namtran
  17 +
  18 +Flashy officially supports Ubuntu 14.04
8 19  
9   -Before running the setup process below, observe the following prerequisites:
10   - - Python 2 must be installed. To avoid issues
11   -
  20 +## Installing Flashy on Ubuntu 14.04 (development/testing)
12 21  
13   -## Setup
  22 +We recommend installing Flashy on a fresh installation of Ubuntu 14.04.
  23 +Before installing, make sure all packages are up to date:
14 24  
15   -Flashy requires Python 2. Install this, and pip.
  25 + sudo apt-get update
  26 + sudo apt-get upgrade
  27 +
  28 +It is important that Python 3 *not* be installed, as this causes issues
  29 +when creating the virtualenv.
  30 +
  31 +### Install required packages
16 32  
17   -Flashy also requires a running Redis server.
  33 + sudo apt-get install python-virtualenv redis-server git python-dev
  34 +
  35 +### Prepare installation directory
18 36  
19   -Virtualenv for Windows creates a dir inexplicably named scripts rather than bin. So substitute venv/bin for venv/scripts if you are on Windows.
  37 + mkdir ~/flashy/
  38 + cd ~/flashy/
  39 +
  40 +### Retrieve source
20 41  
21   -Install virtualenv before continuing. This is most easily accomplished with:
  42 +Clone the two repositories. Provide credentials in each case.
22 43  
23   - pip install virtualenv
  44 + git clone https://git.ucsd.edu/110swag/flashy-frontend
  45 + git clone https://git.ucsd.edu/110swag/flashy-backend
  46 +
  47 +### Prepare backend environment
24 48  
25   -Set up the environment by running:
26   -
  49 +When running the setup script, gevent may take a while to install and throw
  50 +several compiler warnings. These are expected.
  51 +
  52 + cd flashy-backend
27 53 scripts/setup.sh
28   -
29   -Run tests:
30   -
31   - scripts/run_tests.sh
  54 + source venv/bin/activate
  55 + python manage.py migrate
  56 + python manage.py loaddata sections
32 57  
33   -Migrate/create the local (SQLite) database:
  58 +### Run backend server
34 59  
35   - python manage.py migrate
36   -
37   -Run development server (local):
38   -
39 60 scripts/run_local.sh
  61 +
  62 +When run in development, emails will be printed to the terminal and
  63 +not actually sent.
40 64  
41   -This requires that flashy-backend be in the directory as flashy-frontend.
42   -
43   -Import sections from JSON:
44   -
45   - python manage.py loaddata sections
46   -
47 65 ## Troubleshooting
48 66  
49 67 If you get errors about a module not being found, make sure you are working in the virtualenv. To enter the venv:
50 68  
51   - . venv/bin/activate
  69 + source venv/bin/activate
52 70  
53 71 If you still get errors about a module not being found, make sure your virtualenv is up to date. Re-run:
54 72  
... ... @@ -58,4 +76,10 @@
58 76  
59 77 python manage.py migrate
60 78  
  79 +## Notes for Windows
  80 +
  81 +As on Linux, Redis must be installed and running on port 6379.
  82 +
  83 +Wherever venv/bin/ appears, use venv/Scripts instead. Virtualenv
  84 +inexplicably creates a Scripts directory rather than bin on Windows