<commit_before>import wrapt
import os
import datetime
import sys
import getpass
import platform
import sys
from tinydb import TinyDB
import uuid

from git import Repo

from recipyCommon.config import option_set
from recipyCommon.utils import open_or_create_db

RUN_ID = {}
CONFIG = None
store_diff = True


def get_origin(repo):
    try:
        return repo.remotes.origin.url
    except:
        return None

def new_run():
    log_init()

def log_init():
    global RUN_ID

    # Open the database
    db = open_or_create_db()

    # Create the unique ID for this run
    guid = str(uuid.uuid4())

    # Get the path of the script we're running<commit_msg>Fixed exception check for invalid git repo<commit_after>import wrapt
import os
import datetime
import sys
import getpass
import platform
import sys
from tinydb import TinyDB
import uuid

from git import Repo, InvalidGitRepositoryError

from recipyCommon.config import option_set
from recipyCommon.utils import open_or_create_db

RUN_ID = {}
CONFIG = None
store_diff = True


def get_origin(repo):
    try:
        return repo.remotes.origin.url
    except:
        return None

def new_run():
    log_init()

def log_init():
    global RUN_ID

    # Open the database
    db = open_or_create_db()

    # Create the unique ID for this run
    guid = str(uuid.uuid4())

    # Get the path of the script we're running
{'fraction_non_alphanumeric': 0.0575801749271137, 'fraction_numerical': 0.0014577259475218659, 'mean_word_length': 3.457792207792208, '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': '6560099', 'n_tokens_mistral': 427, 'n_tokens_neox': 413, 'n_words': 154}