#!/usr/bin/env python

import os
import sys

import IPython
from traitlets.config import Config


# Add uvicore/tests/apps path to sys.path
apps_path = os.path.dirname(os.path.realpath(__file__ + '/../'))
if apps_path not in sys.path: sys.path.append(apps_path)

c = Config()
c.InteractiveShellApp.exec_lines = [
    # Bootstrap the Uvicore application
    'import uvicore',
    'from app1.services import bootstrap',
    'app = bootstrap.application(is_console=True)',

    # Common imports
    'from uvicore.support.dumper import dump, dd',
]

# Start iPython
IPython.start_ipython(config=c)
