Skip to content

Developer Install Guide

Graham Ullrich edited this page Feb 8, 2019 · 16 revisions

Install PostgreSQL

  1. download Postgres
  2. run the dmg (it should cause an elephant to appear in the top navbar)
  3. click on the elephant, open psql
  4. create database flyingcracker;

Restore database dump

$ export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin  (# note: Path= refers to path where postgres.app was installed)
$ pg_restore -d flyingcracker -O -h localhost ~/Downloads/fc3.dump

Obtain support files

Before you start you will need more files than are included in this repository.

General files (please keep all these files in your ~/downloads folder):

  • fc3.dump
  • settings_local.py (for current master branch)
  • secrets.json (for restructure-layout-2 branch)

Weather files:

  • cbac.txt
  • cbtv.txt
  • noaa-COZ012.txt

Need to work on following steps!

#####Navigate within terminal to the directory in which you would like to install the environment#####

  1. $ pip install virtualenv
  2. $ virtualenv flyingcracker
  3. $ cd flyingcracker
  4. $ mkdir media
  5. $ cd media
  6. $ mkdir weather (move the weather files into weather via $ cp ~/Downloads/[file name] weather, or in finder)
  7. $ cd ../
  8. $ source bin/activate
  9. $ pip install -e git+ssh://git@github.com/grahamu/flyingcracker.git#egg=flyingcracker_project
  10. $ cd src/flyingcracker_project

---------for installing current master branch------------

  1. $ export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin
  2. $ pip install -U -r requirements-dev.txt

Now you'll need to copy settings_local.py into the current directory (src/fc3) and edit the file to match the user name for the database that you created in postgres

---------for installing restructure-layout-2 branch-------

  1. $ git pull origin restructure-layout-2

  2. $ export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin

  3. $ pip install -U -r requirements-dev.txt

  4. $ cd fc3/settings

  5. $ cp devgraham.py dev[yourname].py

  6. Open the file you have just created in your texteditor and edit the database config information 'USER' field to the name that you created for your database. Password is blank by default.

  7. $ cd ../../

  8. $ python manage.py runserver settings=config.settings.dev[yourname]

SSH configuration

If you don't have ssh please follow this guide to setup a sshkey and copy it into your github account: sshkey creation.

Clone this wiki locally