<commit_before>from __future__ import absolute_import, print_function

import os.path
import sys
import yaml

import click

from docker.errors import APIError

from bag8.exceptions import NoProjectYaml
from bag8.project import Project
from bag8.tools import Tools
from bag8.utils import check_call
from bag8.utils import exec_
from bag8.utils import inspect
from bag8.utils import simple_name
from bag8.yaml import Yaml

from compose.service import BuildError
from compose.cli.main import setup_logging


def cwdname():
    return os.path.basename(os.getcwd())


def isatty():
    return sys.stdout.isatty()


@click.group()
def bag8():
    setup_logging()


@bag8.command()
@click.argument('project', default=cwdname)
@click.option('--cache/--no-cache', default=True,
              help="Use cache, default: True")
def build(cache, project):
    p = Project(project)
    try:
        p.build(no_cache=not cache)
    except BuildError:
        sys.exit(1)


@bag8.command()
@click.argument('project', default=cwdname)
@click.option('-c', '--command', default='bash',
              help='Command to exec in a running container, default: None.')
@click.option('-i', '--interactive', default=isatty, is_flag=True,
              help="Use tty mode or not, default: isatty ?")
@click.option('-p', '--prefix', default=None,
              help='Project prefix. default: project.name.')
def develop(command, interactive, prefix, project):
    """Drops you in develop environment of your project.
    """
    Tools().dns()

    p = Project(project, develop=True, prefix=prefix)

    try:<commit_msg>Don't start dns on develop<commit_after>from __future__ import absolute_import, print_function

import os.path
import sys
import yaml

import click

from docker.errors import APIError

from bag8.exceptions import NoProjectYaml
from bag8.project import Project
from bag8.tools import Tools
from bag8.utils import check_call
from bag8.utils import exec_
from bag8.utils import inspect
from bag8.utils import simple_name
from bag8.yaml import Yaml

from compose.service import BuildError
from compose.cli.main import setup_logging


def cwdname():
    return os.path.basename(os.getcwd())


def isatty():
    return sys.stdout.isatty()


@click.group()
def bag8():
    setup_logging()


@bag8.command()
@click.argument('project', default=cwdname)
@click.option('--cache/--no-cache', default=True,
              help="Use cache, default: True")
def build(cache, project):
    p = Project(project)
    try:
        p.build(no_cache=not cache)
    except BuildError:
        sys.exit(1)


@bag8.command()
@click.argument('project', default=cwdname)
@click.option('-c', '--command', default='bash',
              help='Command to exec in a running container, default: None.')
@click.option('-i', '--interactive', default=isatty, is_flag=True,
              help="Use tty mode or not, default: isatty ?")
@click.option('-p', '--prefix', default=None,
              help='Project prefix. default: project.name.')
def develop(command, interactive, prefix, project):
    """Drops you in develop environment of your project.
    """
    p = Project(project, develop=True, prefix=prefix)

    try:
{'fraction_non_alphanumeric': 0.12287334593572778, 'fraction_numerical': 0.007561436672967864, 'mean_word_length': 3.8696319018404908, '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': '4384731', 'n_tokens_mistral': 994, 'n_tokens_neox': 965, 'n_words': 284}