<commit_before># -*- coding: utf-8 -*-
#
# Copyright 2016 - 2018  Ternaris.
# SPDX-License-Identifier: AGPL-3.0-only

import os
from marv_cli import setup_logging
setup_logging(os.environ.get('MARV_LOGLEVEL', 'info'))

config = os.environ['MARV_CONFIG']
app_root = os.environ['MARV_APPLICATION_ROOT']

import marv.app
import marv.site
site = marv.site.Site(config)
site.load_for_web()
application = marv.app.create_app(site, app_root=app_root, checkdb=True)<commit_msg>[marv] Make fetching application root from env less error-prone<commit_after># -*- coding: utf-8 -*-
#
# Copyright 2016 - 2018  Ternaris.
# SPDX-License-Identifier: AGPL-3.0-only

import os
from marv_cli import setup_logging
setup_logging(os.environ.get('MARV_LOGLEVEL', 'info'))

config = os.environ['MARV_CONFIG']
app_root = os.environ.get('MARV_APPLICATION_ROOT') or '/'

import marv.app
import marv.site
site = marv.site.Site(config)
site.load_for_web()
application = marv.app.create_app(site, app_root=app_root, checkdb=True)
{'fraction_non_alphanumeric': 0.13713713713713713, 'fraction_numerical': 0.022022022022022022, 'mean_word_length': 5.666666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7217573', 'n_tokens_mistral': 387, 'n_tokens_neox': 366, 'n_words': 72}