# Path: lib/utilities.py
# TOKENIZER = None
# ACK_LANGUAGE_MAP = {
#     'c': 'cc',
#     'c++': 'cpp',
#     'c#': 'csharp',
#     'objective-c': 'objc',
#     'ojective-c++': 'objcpp',
# }
# def get_cache_hits():
# def get_loc(path, files=None):
# def search(
#     pattern, path, recursive=True, whole=False, ignorecase=False, include=None,
#     exclude=None
# ):
# def url_to_json(url, headers={}):
# def get_repo_path(repo_id, repositories_dir):
# def clone(owner, name, directory, date=None):
# def read(jsonfile):
# def parse_datetime_delta(datetime_delta):
# def is_cloneable(owner, name):
# def get_files(path, language):


from lib import utilities

"""
The documentation attribute measures the ratio of comment lines of code to
non-blank lines of code (sloc + cloc) as determined by the `cloc` tool
(http://cloc.sourceforge.net/). Even though GitHub determines the primary
language of each repository, this module will consider source lines and
comment lines of each language cloc reports. We may need to change this in
the future, as one language may require fewer lines of code to express the
same idea than another language.

Author:
    Steven Kroh skk8768@rit.edu

Updated:
    16 May 2015
"""


def run(project_id, repo_path, cursor, **options):
    ratio = 0

    # Dictionary of language => metrics dictionary

# Path: lib/utilities.py
# TOKENIZER = None
# ACK_LANGUAGE_MAP = {
#     'c': 'cc',
#     'c++': 'cpp',
#     'c#': 'csharp',
#     'objective-c': 'objc',
#     'ojective-c++': 'objcpp',
# }
# def get_cache_hits():
# def get_loc(path, files=None):
# def search(
#     pattern, path, recursive=True, whole=False, ignorecase=False, include=None,
#     exclude=None
# ):
# def url_to_json(url, headers={}):
# def get_repo_path(repo_id, repositories_dir):
# def clone(owner, name, directory, date=None):
# def read(jsonfile):
# def parse_datetime_delta(datetime_delta):
# def is_cloneable(owner, name):
# def get_files(path, language):


# Path: attributes/documentation/main.py
from lib import utilities


"""
The documentation attribute measures the ratio of comment lines of code to
non-blank lines of code (sloc + cloc) as determined by the `cloc` tool
(http://cloc.sourceforge.net/). Even though GitHub determines the primary
language of each repository, this module will consider source lines and
comment lines of each language cloc reports. We may need to change this in
the future, as one language may require fewer lines of code to express the
same idea than another language.

Author:
    Steven Kroh skk8768@rit.edu

Updated:
    16 May 2015
"""


def run(project_id, repo_path, cursor, **options):
    ratio = 0

    # Dictionary of language => metrics dictionary

    util = utilities.get_loc(repo_path)