# Path: config/config.py
# CONFIG = Config(dictionary)
# 
# Path: bigbang/utils.py
# def get_paths_to_files_in_directory(
#     directory: str, file_dsc: str = "*"
# ) -> List[str]:
# def get_paths_to_dirs_in_directory(
#     directory: str, folder_dsc: str = "*"
# ) -> List[str]:
# def labeled_blockmodel(g, partition):
# def repartition_dataframe(df, partition):
# def get_common_head(str1, str2, delimiter=None):
# def get_common_foot(str1, str2, delimiter=None):
# def remove_quoted(mess):
# def clean_message(mess):
# def add_freq(idx, freq=None):
# 
# Path: bigbang/analysis/entity_resolution.py
# def entity_resolve(row, emailCol, nameCol):
#     """Return a row with name and email by ID."""
# 
#     emailAddress = row[emailCol].upper()
#     emailAddress = emailAddress.replace(" AT ", "@")
# 
#     match = nameRegex.search(emailAddress)
#     name = None
# 
#     if match is not None:
#         name = match.group(0)  # unused info for now
#         emailAddress = emailAddress.replace(name, "")
#         name = name.replace("(", "")
#         name = name.replace(")", "")
#     if nameCol is not None:
#         name = row[nameCol].upper()
#     row["Person-ID"] = getID(name, emailAddress)
#     return row


from datetime import datetime
from time import mktime
from git import *
from git import Repo
from config.config import CONFIG
from bigbang import utils
from bigbang.analysis.entity_resolution import entity_resolve
import git
import networkx as nx
import numpy as np
import pandas as pd
                if "Commit Message" in raw:
                    raw["Commit Message"].append(commit.message)

                if (
                    "Time" in raw or True
                ):  # TODO: For now, we always ask for the time
                    raw["Time"].append(
                        pd.to_datetime(commit.committed_date, unit="s")
                    )

                if "Parent Commit" in raw:
                    raw["Parent Commit"].append(
                        [par.hexsha for par in commit.parents]
                    )

                if "HEXSHA" in raw:
                    raw["HEXSHA"].append(commit.hexsha)
            except LookupError:
                print("failed to add a commit because of an encoding error")

    def populate_data(self, attribs=ALL_ATTRIBUTES):
        """Populate data."""
        raw = dict()
        for attrib in attribs:
            raw[attrib] = list()
        repo = self.repo
        self.gen_data(repo, raw)
        print((type(raw["Time"])))

        time_index = pd.DatetimeIndex(raw["Time"]).to_period("H")

# Path: config/config.py
# CONFIG = Config(dictionary)
# 
# Path: bigbang/utils.py
# def get_paths_to_files_in_directory(
#     directory: str, file_dsc: str = "*"
# ) -> List[str]:
# def get_paths_to_dirs_in_directory(
#     directory: str, folder_dsc: str = "*"
# ) -> List[str]:
# def labeled_blockmodel(g, partition):
# def repartition_dataframe(df, partition):
# def get_common_head(str1, str2, delimiter=None):
# def get_common_foot(str1, str2, delimiter=None):
# def remove_quoted(mess):
# def clean_message(mess):
# def add_freq(idx, freq=None):
# 
# Path: bigbang/analysis/entity_resolution.py
# def entity_resolve(row, emailCol, nameCol):
#     """Return a row with name and email by ID."""
# 
#     emailAddress = row[emailCol].upper()
#     emailAddress = emailAddress.replace(" AT ", "@")
# 
#     match = nameRegex.search(emailAddress)
#     name = None
# 
#     if match is not None:
#         name = match.group(0)  # unused info for now
#         emailAddress = emailAddress.replace(name, "")
#         name = name.replace("(", "")
#         name = name.replace(")", "")
#     if nameCol is not None:
#         name = row[nameCol].upper()
#     row["Person-ID"] = getID(name, emailAddress)
#     return row


# Path: bigbang/ingress/git_repo.py
from datetime import datetime
from time import mktime
from git import *
from git import Repo
from config.config import CONFIG
from bigbang import utils
from bigbang.analysis.entity_resolution import entity_resolve
import git
import networkx as nx
import numpy as np
import pandas as pd

                if "Commit Message" in raw:
                    raw["Commit Message"].append(commit.message)

                if (
                    "Time" in raw or True
                ):  # TODO: For now, we always ask for the time
                    raw["Time"].append(
                        pd.to_datetime(commit.committed_date, unit="s")
                    )

                if "Parent Commit" in raw:
                    raw["Parent Commit"].append(
                        [par.hexsha for par in commit.parents]
                    )

                if "HEXSHA" in raw:
                    raw["HEXSHA"].append(commit.hexsha)
            except LookupError:
                print("failed to add a commit because of an encoding error")

    def populate_data(self, attribs=ALL_ATTRIBUTES):
        """Populate data."""
        raw = dict()
        for attrib in attribs:
            raw[attrib] = list()
        repo = self.repo
        self.gen_data(repo, raw)
        print((type(raw["Time"])))

        time_index = pd.DatetimeIndex(raw["Time"]).to_period("H")

        time_index = utils.add_freq(time_index, freq=None)