Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
uri = url_escape(ujoin('/lab/tree', *relpath.split(os.sep)))
nbapp.default_url = uri
nbapp.file_to_run = ''
if core_mode:
app_dir = HERE
logger.info(CORE_NOTE.strip())
ensure_core(logger)
elif dev_mode:
app_dir = DEV_DIR
ensure_dev(logger)
if not watch_mode:
logger.info(DEV_NOTE)
config.app_settings_dir = pjoin(app_dir, 'settings')
config.schemas_dir = pjoin(app_dir, 'schemas')
config.themes_dir = pjoin(app_dir, 'themes')
config.workspaces_dir = workspaces_dir
info = get_app_info(app_dir)
config.app_version = info['version']
public_url = info['publicUrl']
if public_url:
config.public_url = public_url
else:
config.static_dir = pjoin(app_dir, 'static')
config.user_settings_dir = user_settings_dir
# The templates end up in the built static directory.
config.templates_dir = pjoin(app_dir, 'static')
nbapp.default_url = uri
nbapp.file_to_run = ''
if core_mode:
app_dir = HERE
logger.info(CORE_NOTE.strip())
ensure_core(logger)
elif dev_mode:
app_dir = DEV_DIR
ensure_dev(logger)
if not watch_mode:
logger.info(DEV_NOTE)
config.app_settings_dir = pjoin(app_dir, 'settings')
config.schemas_dir = pjoin(app_dir, 'schemas')
config.themes_dir = pjoin(app_dir, 'themes')
config.workspaces_dir = workspaces_dir
info = get_app_info(app_dir)
config.app_version = info['version']
public_url = info['publicUrl']
if public_url:
config.public_url = public_url
else:
config.static_dir = pjoin(app_dir, 'static')
config.user_settings_dir = user_settings_dir
# The templates end up in the built static directory.
config.templates_dir = pjoin(app_dir, 'static')
if watch_mode:
nbapp.file_to_run = ''
if core_mode:
app_dir = HERE
logger.info(CORE_NOTE.strip())
ensure_core(logger)
elif dev_mode:
app_dir = DEV_DIR
ensure_dev(logger)
if not watch_mode:
logger.info(DEV_NOTE)
config.app_settings_dir = pjoin(app_dir, 'settings')
config.schemas_dir = pjoin(app_dir, 'schemas')
config.themes_dir = pjoin(app_dir, 'themes')
config.workspaces_dir = workspaces_dir
info = get_app_info(app_dir)
config.app_version = info['version']
public_url = info['publicUrl']
if public_url:
config.public_url = public_url
else:
config.static_dir = pjoin(app_dir, 'static')
config.user_settings_dir = user_settings_dir
# The templates end up in the built static directory.
config.templates_dir = pjoin(app_dir, 'static')
if watch_mode:
logger.info('Starting JupyterLab watch mode...')
app_dir = DEV_DIR
ensure_dev(logger)
if not watch_mode:
logger.info(DEV_NOTE)
config.app_settings_dir = pjoin(app_dir, 'settings')
config.schemas_dir = pjoin(app_dir, 'schemas')
config.themes_dir = pjoin(app_dir, 'themes')
config.workspaces_dir = workspaces_dir
info = get_app_info(app_dir)
config.app_version = info['version']
public_url = info['publicUrl']
if public_url:
config.public_url = public_url
else:
config.static_dir = pjoin(app_dir, 'static')
config.user_settings_dir = user_settings_dir
# The templates end up in the built static directory.
config.templates_dir = pjoin(app_dir, 'static')
if watch_mode:
logger.info('Starting JupyterLab watch mode...')
# Set the ioloop in case the watch fails.
nbapp.ioloop = IOLoop.current()
if dev_mode:
watch_dev(logger)
else:
watch(app_dir, logger)
page_config['buildAvailable'] = False
config.app_settings_dir = pjoin(app_dir, 'settings')
config.schemas_dir = pjoin(app_dir, 'schemas')
config.themes_dir = pjoin(app_dir, 'themes')
config.workspaces_dir = workspaces_dir
info = get_app_info(app_dir)
config.app_version = info['version']
public_url = info['publicUrl']
if public_url:
config.public_url = public_url
else:
config.static_dir = pjoin(app_dir, 'static')
config.user_settings_dir = user_settings_dir
# The templates end up in the built static directory.
config.templates_dir = pjoin(app_dir, 'static')
if watch_mode:
logger.info('Starting JupyterLab watch mode...')
# Set the ioloop in case the watch fails.
nbapp.ioloop = IOLoop.current()
if dev_mode:
watch_dev(logger)
else:
watch(app_dir, logger)
page_config['buildAvailable'] = False
config.cache_files = False
base_url = web_app.settings['base_url']
build_url = ujoin(base_url, build_path)