<commit_before>#!/usr/bin/python

import sys
import os

from Scripts.common import get_ini_conf, write_ini_conf

if __name__ == "__main__":

    # Python 2 compatibility
    if sys.version_info.major > 2:
        raw_input = input

    config = get_ini_conf("config.ini")

    # Find cached module name
    if "module_name" not in config or not config["module_name"]:
        module_name = str(raw_input("Enter a module name: "))
        config["module_name"] = module_name.strip()

    # Write back config
    write_ini_conf(config, "config.ini")

    # Just execute the build script
    from Scripts.setup import make_output_dir, run_cmake, run_cmake_build
    make_output_dir()
    run_cmake(config)
    run_cmake_build(config)

    print("Success!")
    sys.exit(0)<commit_msg>Fix issue when the cwd is not in the config directory<commit_after>#!/usr/bin/python

import sys
import os
from os.path import join, realpath, dirname

from Scripts.common import get_ini_conf, write_ini_conf

if __name__ == "__main__":

    # Python 2 compatibility
    if sys.version_info.major > 2:
        raw_input = input

    config_file = join(dirname(realpath(__file__)), "config.ini")
    config = get_ini_conf(config_file)

    # Find cached module name
    if "module_name" not in config or not config["module_name"]:
        module_name = str(raw_input("Enter a module name: "))
        config["module_name"] = module_name.strip()

    # Write back config
    write_ini_conf(config, config_file)

    # Just execute the build script
    from Scripts.setup import make_output_dir, run_cmake, run_cmake_build
    make_output_dir()
    run_cmake(config)
    run_cmake_build(config)

    print("Success!")
    sys.exit(0)
{'fraction_non_alphanumeric': 0.0935672514619883, 'fraction_numerical': 0.0035087719298245615, 'mean_word_length': 3.6118598382749325, 'pattern_counts': {'":': 2, '<': 3, '<?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': '4271585', 'n_tokens_mistral': 563, 'n_tokens_neox': 545, 'n_words': 144}