Skip to content

Atos-Research-and-Innovation/CityEnabler-Data-Interpreter-Tool-Back-End

Repository files navigation

CityEnabler Data Interpreter Tool Services

Web Services for the CityEnabler Data Interpreter Tool

Manual

This manual is tested under Ubuntu 14.04!

Requirements

  • Python 3.4 should be already installed, but make sure with the following command:
  python3
  • Install the following packages:
  apt-get install python-virtualenv python3-dev libpq-dev
  • Install SQLite (easier for development) or PostgreSQL:

Either do

  apt-get install sqlite3

or

  apt-get install postgresql
  pip install psycopg2==2.5.4

If you chose PostgreSQL, you want to create a postgres user and a database:

  sudo -u postgres createuser pcompass -W
  sudo -u postgres createdb pcompass --owner pcompass

Installation

  • Create a new directory for the project
  mkdir services
  • Create a Python Virtual Environment with Python 3 and activate it
  virtualenv services --python=python3
  cd services
  source bin/activate
  git clone https://github.com/Atos-Research-and-Innovation/CityEnabler-Data-Interpreter-Tool-Back-End.git
  
  cd CityEnabler-Data-Interpreter-Tool-Back-End
  • Install the Requirements
  pip install -r requirements.txt
  • Create a local settings file
  cp config/settings.sample.py config/settings.py
	python manage.py migrate
    python manage.py syncdb
	python manage.py loaddata metrics events common references visualizations indicators ags
  • Start the application
	python manage.py runserver

Elastic search setup

  • Download the elasticsearch from http://www.elasticsearch.org/download/
  • Unzip elasticsearch into a folder
  • Run ./bin/elasticsearch
  • Check elasticsearch URL setting in CityEnabler-Data-Interpreter-Tool-Back-End/settings.py (should be ok by default localhost:9200)
  • With elasticsearch and CityEnabler-Data-Interpreter-Tool-Back-End backend services running execute the following command to rebuild index
	python manage.py rebuild_index

CityEnabler-Data-Interpreter-Tool-Back-End Software

CityEnabler-Data-Interpreter-Tool-Back-End is based on the output of the PolicyCompass project.

For more information see https://github.com/policycompass

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published