Example #1
0
def get_repo(repo_path):
    repo_dict = github_quality.pull_repo(repo_path,
                                         mean_stars_per_issue,
                                         auth=config.auth_)
    return {
        k: repo_dict[k]
        for k in ('full_name', 'score', 'has_issues', 'rating_str',
                  'explanation', 'open_issues', 'stargazers_count', 'age',
                  'closed_issues', 'timestamp_to_score') if k in repo_dict
    }
Example #2
0
def classify(paths):
  non_software_matches = []
  software_matches = []
  for path in paths:
    repo_info = github_quality.pull_repo(path, None)
    description, has_issues = repo_info['description'], repo_info['has_issues']
    non_ascii = False
    if description:
      ascii_count = 0
      for ch in description:
        if ord(ch) < 128:
          ascii_count += 1
      if ascii_count < len(description) * .95:
        non_ascii = True
    if(not has_issues or (description and re.search(r'\blist\b', description)) or non_ascii):
      non_software_matches.append(path)
    else:
      software_matches.append(path)
  return software_matches, non_software_matches
Example #3
0
def classify(paths):
    non_software_matches = []
    software_matches = []
    for path in paths:
        repo_info = github_quality.pull_repo(path, None)
        description, has_issues = repo_info['description'], repo_info[
            'has_issues']
        non_ascii = False
        if description:
            ascii_count = 0
            for ch in description:
                if ord(ch) < 128:
                    ascii_count += 1
            if ascii_count < len(description) * .95:
                non_ascii = True
        if (not has_issues
                or (description and re.search(r'\blist\b', description))
                or non_ascii):
            non_software_matches.append(path)
        else:
            software_matches.append(path)
    return software_matches, non_software_matches
Example #4
0
 def print_repos(repos):
   for path in repos:
     repo = github_quality.pull_repo(path, None)
     print ' ', path, repo['size'], repo['description'].encode('utf8')
Example #5
0
def get_repo(repo_path):
    repo_dict = github_quality.pull_repo(repo_path, mean_stars_per_issue, auth=config.auth_)
    return {k: repo_dict[k] for k in (
        'full_name', 'score', 'has_issues', 'rating_str', 'explanation', 'open_issues',
        'stargazers_count', 'age', 'closed_issues', 'timestamp_to_score') if k in repo_dict}
Example #6
0
 def print_repos(repos):
     for path in repos:
         repo = github_quality.pull_repo(path, None)
         print ' ', path, repo['size'], repo['description'].encode('utf8')