Commit 6abf9077 authored by Nicolas Joyard's avatar Nicolas Joyard

Remove versioned database and add quickstart script instead

parent a5656192
......@@ -13,7 +13,6 @@ before_script:
script:
- flake8 . --exclude '*/migrations,docs,static' --ignore E128
- py.test memopol representatives_positions representatives_recommendations
- rm -rf db.sqlite
- django-admin migrate
after_success:
- codecov
......
#!/bin/bash
#
# Quick-start script for new developers
# Usage: from repo root, `source bin/quickstart.sh`
#
set -e
REPOROOT=$(dirname $(dirname $0))
# Ensure we're at the root of the memopol repository
pushd $REPOROOT >/dev/null
# Create & activate python virtual environment
virtualenv memopol_env
source memopol_env/bin/activate
# Install python dependencies
pip install -e .[testing]
# Install client dependencies
bin/install_client_deps.sh
# Setup environment
export DJANGO_DEBUG=True
export DJANGO_SETTINGS_MODULE=memopol.settings
# Run django migration to create database
./manage.py migrate
# Import sample data
./manage.py loaddata memopol/fixtures/smaller_sample.json
echo
echo "You're all set!"
echo "To start the application run the following from the repository root ($REPOROOT):"
echo " source memopol_env/bin/activate"
echo " export DJANGO_DEBUG=True DJANGO_SETTINGS_MODULE=memopol.settings"
echo " ./manage.py runserver"
echo
echo "If you make changes, don't forget to run tests using:"
echo " flake8 . --exclude '*/migrations,docs,static' --ignore E128"
echo " py.test memopol representatives_positions representatives_recommendations"
echo
echo "Happy hacking ;)"
echo
popd >/dev/null
File deleted
......@@ -6,10 +6,23 @@ Local development tutorial
decisions.
This tutorial drives through a local installation of the project for
development on Linux. It requires git, a fairly recent version of nodejs (see
:file:`.openshift/action_hooks/deploy` for a way to install it), python2 and
development on Linux. It requires git, a fairly recent version of python2 and
virtualenv.
Quickstart
==========
You can skip the instructions below and just use the quickstart script. To do
so, first clone the repository, cd into the repository root and source the
quickstart script:
$ git clone https://github.com/political-memory/political_memory.git
$ cd political_memory
$ source bin/quickstart.sh
If you want more control, you can follow the steps below or have a look at what
the quickstart script does.
Make a virtual environment
==========================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment