From 4eed43f78299032256e4ef8b8b4d1b4577181a95 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sat, 24 Nov 2012 15:26:20 +0100 Subject: [PATCH 1/4] Configured the repo for travis --- .travis.yml | 9 +++++++++ requirements.txt | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 .travis.yml create mode 100644 requirements.txt diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..c8cbbca3a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: python +python: + - "2.5" + - "2.6" + - "2.7" +install: + - pip install -r requirements.txt --use-mirrors + - pip install coverage django-discover-runner +script: coverage run ./manage.py test folivora && coverage report -m diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..6854e46d1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +Django==1.4 +django-mptt +reportlab +pil From ddd251a742f94d9b79528287b81c6d6590f38cd5 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sat, 24 Nov 2012 15:43:17 +0100 Subject: [PATCH 2/4] fix for travis --- .travis.yml | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c8cbbca3a..3e6409fbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,4 @@ python: install: - pip install -r requirements.txt --use-mirrors - pip install coverage django-discover-runner -script: coverage run ./manage.py test folivora && coverage report -m +script: coverage run ./manage.py test tests && coverage report -m diff --git a/requirements.txt b/requirements.txt index 6854e46d1..9a69ad2b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django==1.4 +Django==1.4.2 django-mptt reportlab pil From a7c13e3285db111382d2a31d3e1077d788e138e7 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sat, 24 Nov 2012 16:22:48 +0100 Subject: [PATCH 3/4] added script to create a local settings --- .gitignore | 1 + .travis.yml | 1 + extras/scripts/create_local_settings.py | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 extras/scripts/create_local_settings.py diff --git a/.gitignore b/.gitignore index d43bad4e2..d5edd3499 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ docs/_build/* build/* dist/* .DS_Store +settings.py # Unit test / coverage reports .coverage diff --git a/.travis.yml b/.travis.yml index 3e6409fbd..b65d5b1dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,5 @@ python: install: - pip install -r requirements.txt --use-mirrors - pip install coverage django-discover-runner + - python extras/scripts/create_local_settings.py script: coverage run ./manage.py test tests && coverage report -m diff --git a/extras/scripts/create_local_settings.py b/extras/scripts/create_local_settings.py new file mode 100644 index 000000000..1702992e0 --- /dev/null +++ b/extras/scripts/create_local_settings.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os +import sys + +script_path = os.path.realpath(os.path.dirname(__file__)) +sys.path.append(os.path.join(script_path, '..', '..')) + +from openslides.main import create_settings + +if __name__ == "__main__": + cwd = os.getcwd() + create_settings(os.path.join(cwd, 'settings.py'), + os.path.join(cwd, 'database.sqlite')) From 5cf27b358dcaf9dce82478d962edb83234ec5a1e Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sat, 24 Nov 2012 16:28:47 +0100 Subject: [PATCH 4/4] added simplejson into the requirements for python 2.5 --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 9a69ad2b9..5a62061ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ Django==1.4.2 django-mptt reportlab pil +simplejson