Skip to content
Extraits de code Groupes Projets
Valider bbf10045 rédigé par njoyard's avatar njoyard Validation de GitHub
Parcourir les fichiers

Merge pull request #87 from political-memory/quickstart

Remove versioned database and add quickstart script instead
parents a5656192 6abf9077
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -13,7 +13,6 @@ before_script: ...@@ -13,7 +13,6 @@ before_script:
script: script:
- flake8 . --exclude '*/migrations,docs,static' --ignore E128 - flake8 . --exclude '*/migrations,docs,static' --ignore E128
- py.test memopol representatives_positions representatives_recommendations - py.test memopol representatives_positions representatives_recommendations
- rm -rf db.sqlite
- django-admin migrate - django-admin migrate
after_success: after_success:
- codecov - 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
Fichier supprimé
...@@ -6,10 +6,23 @@ Local development tutorial ...@@ -6,10 +6,23 @@ Local development tutorial
decisions. decisions.
This tutorial drives through a local installation of the project for This tutorial drives through a local installation of the project for
development on Linux. It requires git, a fairly recent version of nodejs (see development on Linux. It requires git, a fairly recent version of python2 and
:file:`.openshift/action_hooks/deploy` for a way to install it), python2 and
virtualenv. 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 Make a virtual environment
========================== ==========================
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter