<commit_before>"""The ``launch`` command executes a project, by default without asking questions (fails on missing config)."""
from __future__ import absolute_import, print_function

import sys

from project.prepare import prepare
from project.project import Project


def launch_command(project_dir, ui_mode):
    """Run the project.

    Returns:
        Does not return if successful.
    """
    project = Project(project_dir)
    result = prepare(project, ui_mode=ui_mode)

    if result.failed:
        return
    elif result.command_exec_info is None:
        print("No known launch command for project %s; try adding an 'app: entry: ' to project.yml" % project_dir,
              file=sys.stderr)
    else:<commit_msg>Change error message in launch command to mention commands section<commit_after>"""The ``launch`` command executes a project, by default without asking questions (fails on missing config)."""
from __future__ import absolute_import, print_function

import sys

from project.prepare import prepare
from project.project import Project


def launch_command(project_dir, ui_mode):
    """Run the project.

    Returns:
        Does not return if successful.
    """
    project = Project(project_dir)
    result = prepare(project, ui_mode=ui_mode)

    if result.failed:
        return
    elif result.command_exec_info is None:
        print("No known launch command for project %s; try adding a 'commands:' section to project.yml" % project_dir,
              file=sys.stderr)
    else:
{'fraction_non_alphanumeric': 0.08018555334658714, 'fraction_numerical': 0.0, 'mean_word_length': 3.5896656534954405, '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': '5418712', 'n_tokens_mistral': 406, 'n_tokens_neox': 393, 'n_words': 150}