Setting up a development environment

Working directly from the source is not adequate if one has to constantly install and upgrade the Python packages developed to run the code together. There exist a more appropriate way to integrate ICTV packages from multiple directories. ICTV is able to discover automatically plugins that are available to import. Adding these directories to the PYTHONPATH will make the plugins they contain available for the ICTV server.

git clone https://github.com/UCL-INGI/ICTV.git
git clone https://github.com/UCL-INGI/ICTV-plugins.git
...
PYTHONPATH=ICTV-plugins/ ./ICTV/ictv-webapp

More directories can be added by delimiting them using :.

A minimal configuration.yaml file for a development environment is:

debug:
  autologin: yes
database_uri: sqlite:///tmp/ictv_database.sqlite  # You may want to move the database to a persistent directory
client:
  root_password: ''
  authorized_keys: ''

Linking templates and themes

As themes and templates are not Python modules, they cannot be discovered by using the same mechanism. The simplest way is to link and unlink the files when needed. One can use the following script to achieve this task.

PYTHONPATH=ICTV/ ICTV-plugins/link_assets_for_development.py
...
PYTHONPATH=ICTV/ ICTV-plugins/link_assets_for_development.py remove