Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Anthony
memopol
Commits
6abf9077
Commit
6abf9077
authored
Jun 10, 2016
by
Nicolas Joyard
Browse files
Remove versioned database and add quickstart script instead
parent
a5656192
Changes
4
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
6abf9077
...
...
@@ -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/quickstart.sh
0 → 100755
View file @
6abf9077
#!/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
db.sqlite
deleted
100644 → 0
View file @
a5656192
File deleted
docs/development.rst
View file @
6abf9077
...
...
@@ -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
==========================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment