89a90,91 > SITE_CONTENT/podlings_graduated.txt > SITE_CONTENT/podlings_retired.txt 94a97,98 > # FIXME: Output podling status and project lists as json, yml and ad > # FIXME: Eliminate the need for the status page and derive it from known content. 101a106,107 > # 2019-03-07 - not sure how viable this is it seems that only one current > # podling - marvin-ai has this problem. hack for now. 141a148 > import json 145c152 < ASF_AUTH_TEMPLATE = 'https://raw.githubusercontent.com/apache/infrastructure-puppet/deployment/modules/subversion_server/files/authorization/asf-authorization-template' --- > # ASF_AUTH_TEMPLATE = 'https://raw.githubusercontent.com/apache/infrastructure-puppet/deployment/modules/subversion_server/files/authorization/asf-authorization-template' 148a156,164 > # All project git repositories in Apache are organized by Apache Infra and can be found on Gitbox. > GITBOX_DIR = "https://gitbox.apache.org/repositories.json" > > # All proect committers["members"] and pmc members["owners"] are provided on whimsy > PROJECT_LDAP = "https://whimsy.apache.org/public/public_ldap_projects.json" > > # All podlings site scan results > PODLING_SITE = "https://whimsy.apache.org/public/pods-scan.json" > 266d281 < newCommitterRE = re.compile("[nN]ew [cC]omm?itt?ers? ?\(?([0-9]+)?") 274a290,303 > # read from directory of Apache Gitbox repositories > s = urllib.request.urlopen(GITBOX_DIR).read().decode('utf-8') > gitboxRepos = json.loads(s) > gitbox = {} > gitbox["incubator"] = gitboxRepos["projects"]["incubator"]["repositories"] > > # read from project ldap > s = urllib.request.urlopen(PROJECT_LDAP).read().decode('utf-8') > projectLDAP = json.loads(s)["projects"] > > # read from podling site scan > s = urllib.request.urlopen(PODLING_SITE).read().decode('utf-8') > podlingSiteScan = json.loads(s) > 288a318 > resource = row.getAttribute("resource") 291,292c321 < resource = row.getAttribute("resource") < graduatedProjects[resource.lower()] = {'name': name, 'enddate': endDate} --- > graduatedProjects[resource.lower()] = {'name': name, 'startdate': startDate, 'enddate': endDate} 295,296c324 < resource = row.getAttribute("resource") < retiredProjects[resource.lower()] = {'name': name, 'enddate': endDate} --- > retiredProjects[resource.lower()] = {'name': name, 'startdate': startDate, 'enddate': endDate} 299c327 < #print("Name: " + name) --- > print("Name: {0} - {1}".format(name,resource.lower())) 302a331,332 > errorMsg = "00|Duplicate entry in podlings.xml" > projects[id]['fixMeList'].append(errorMsg) 309a340,344 > sid = id > if sid == 'marvin-ai': > sid = 'marvin' > projects[id]['fixMeList'] = [] > projects[id]['reposName'] = sid 322a358,365 > projects[id]['urlGit'] = "" > projects[id]['gitbox'] = "" > try: > if gitboxRepos["projects"][sid]: > d = gitboxRepos["projects"][sid]["repositories"] > projects[id]['gitbox'] = sorted(d.items(), key=lambda x: x[0]) > except (Exception) as e: > print("Exception Gitbox repositories " + sid + " : " + str(e)) 326a370 > projects[id]['distributions'] = [] 343,344c387,398 < projects[id]['numberCommitters'] = 0 < projects[id]['numberCommittersNew'] = 0 --- > try: > projects[id]['numberCommitters'] = len(projectLDAP[sid]["members"]) > projects[id]['numberPMCMembers'] = len(projectLDAP[sid]["owners"]) > except (Exception) as e: > print("Exception project LDAP " + sid + " : " + str(e)) > projects[id]['fixMeList'].append("01|No project LDAP") > projects[id]['numberCommitters'] = 0 > projects[id]['numberPMCMembers'] = 0 > if projects[id]['numberCommitters'] == projects[id]['numberPMCMembers']: > projects[id]['numberPMCEquals'] = True > else: > projects[id]['numberPMCEquals'] = False 353a408 > # FIXME: Get availid from row.getAttribute 363a419,420 > errorMsg = "02|Project metadata missing in content/podlings.xml" > projects[id]['fixMeList'].append(errorMsg) 377,378c434 < errorMsg = "{0}: Has graduated, but still needs to follow the graduation steps.".format( < id) --- > errorMsg = "{0}: Has graduated, but still needs to follow the graduation steps.".format(id) 381a438,439 > errorMsg = "03|Graduated, but some graduation steps are incomplete" > projects[id]['fixMeList'].append(errorMsg) 387,388c445 < errorMsg = "{0}: Has retired, but still needs to follow the retirement steps.".format( < id) --- > errorMsg = "{0}: Has retired, but still needs to follow the retirement steps.".format(id) 391a449,450 > errorMsg = "04|Retired, but some retirement steps are incomplete" > projects[id]['fixMeList'].append(errorMsg) 398,399c457,461 < print( < "ERROR: {0}: expecting a single reportgroup".format(name)) --- > errorMsg = "ERROR: {0}: expecting a singleton report group".format(id) > print(errorMsg) > otherIssues.append(errorMsg) > errorMsg = "05|Reporting group is either missing or a multiple" > projects[id]['fixMeList'].append(errorMsg) 407d468 < print("ERROR: {0}: missing group attribute".format(name)) 408a470,474 > errorMsg =" ERROR: {0}: missing group attribute".format(id) > print(errorMsg) > otherIssues.append(errorMsg) > errorMsg = "06|Reporting group is missing" > projects[id]['fixMeList'].append(errorMsg) 491a558,559 > if value[-4:] == ".git": > value = "" 493a562,564 > if cell.getAttribute('id') == "git" and hasUrl: > projects[k]['urlGit'] = value > continue 500,512d570 < # Scan the project News section and count new commiters. < for section in dom.getElementsByTagName("section"): < if 'id' in section.attributes and section.getAttribute('id') == "News": < for line in section.toxml().splitlines(): < if ('