<commit_before>## Copyright (c) 2012 <NAME>ics. All rights reserved.
## Use of this source code is governed by a BSD-style license that can be
## found in the COPYING file.

""" Build documentation

"""


import os
import shutil

import qibuild
import qidoc.core

def configure_parser(parser):
    """ Configure parser for this action """
    qibuild.cmdparse.default_parser(parser)
    parser.add_argument("--work-tree", dest="worktree")
    parser.add_argument("output_dir", nargs="?",
        help="Where to generate the docs")
    parser.add_argument("--version")


def do(args):
    """ Main entry point

    """
    output_dir = args.output_dir
    worktree = args.worktree
    worktree = qidoc.core.find_qidoc_root(worktree)
    if not worktree:
        raise Exception("No qidoc worktree found. Please call qidoc init")
<commit_msg>qidoc : better error message<commit_after>## Copyright (c) 2012 <NAME>. All rights reserved.
## Use of this source code is governed by a BSD-style license that can be
## found in the COPYING file.

""" Build documentation

"""


import os
import shutil

import qibuild
import qidoc.core

def configure_parser(parser):
    """ Configure parser for this action """
    qibuild.cmdparse.default_parser(parser)
    parser.add_argument("--work-tree", dest="worktree")
    parser.add_argument("output_dir", nargs="?",
        help="Where to generate the docs")
    parser.add_argument("--version")


def do(args):
    """ Main entry point

    """
    output_dir = args.output_dir
    worktree = args.worktree
    worktree = qidoc.core.find_qidoc_root(worktree)
    if not worktree:
        raise Exception("No qidoc worktree found.\n"
          "Please call qidoc init or go to a qidoc worktree")

{'fraction_non_alphanumeric': 0.11085450346420324, 'fraction_numerical': 0.004618937644341801, 'mean_word_length': 3.5846560846560847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6693088', 'n_tokens_mistral': 545, 'n_tokens_neox': 526, 'n_words': 165}