<commit_before>"""
Run integration test for quicklook pipeline

python -m desispec.test.integration_test_quicklook
"""
import os
import sys
import argparse
import desimodel.io
import desisim.io
import desispec.pipeline as pipe
import desispec.log as logging
from desispec.util import runcmd
from desispec.quicklook import qlconfig

desi_templates_available = 'DESI_ROOT' in os.environ
desi_root_available = 'DESI_ROOT' in os.environ

def check_env(args=None):
    """
    Check required environment variables; raise RuntimeException if missing
    """
    log = logging.get_logger()
    #- template locations
    missing_env = False

    if 'DESI_BASIS_TEMPLATES' not in os.environ:
        log.warning('missing $DESI_BASIS_TEMPLATES needed for simulating spectra'.format(name))
        missing_env = True

    if not os.path.isdir(os.getenv('DESI_BASIS_TEMPLATES')):
        log.warning('missing $DESI_BASIS_TEMPLATES directory')<commit_msg>minor changes<commit_after>"""
Run integration test for quicklook pipeline

python -m desispec.test.integration_test_quicklook
"""
import os
import sys
import argparse
import desisim.io
import desispec.pipeline as pipe
import desispec.log as logging
from desispec.util import runcmd
from desispec.quicklook import qlconfig

desi_templates_available = 'DESI_ROOT' in os.environ
desi_root_available = 'DESI_ROOT' in os.environ

def check_env():
    """
    Check required environment variables; raise RuntimeException if missing
    """
    log = logging.get_logger()
    #- template locations
    missing_env = False

    if 'DESI_BASIS_TEMPLATES' not in os.environ:
        log.warning('missing $DESI_BASIS_TEMPLATES needed for simulating spectra'.format(name))
        missing_env = True

    if not os.path.isdir(os.getenv('DESI_BASIS_TEMPLATES')):
        log.warning('missing $DESI_BASIS_TEMPLATES directory')
{'fraction_non_alphanumeric': 0.07870619946091645, 'fraction_numerical': 0.0, 'mean_word_length': 4.540298507462687, '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': '3862266', 'n_tokens_mistral': 593, 'n_tokens_neox': 576, 'n_words': 156}