Get the current roster from Apache phonebook.
()
| 43 | # value: Real name |
| 44 | |
| 45 | def get_asf_roster(): |
| 46 | """Get the current roster from Apache phonebook.""" |
| 47 | # See https://home.apache.org/phonebook-about.html |
| 48 | committers_url = "https://whimsy.apache.org/public/public_ldap_projects.json" |
| 49 | |
| 50 | # people https://whimsy.apache.org/public/public_ldap_people.json |
| 51 | people_url = "https://whimsy.apache.org/public/public_ldap_people.json" |
| 52 | |
| 53 | try: |
| 54 | r = requests.get(committers_url) |
| 55 | r.raise_for_status() |
| 56 | j = r.json() |
| 57 | proj = j['projects']['datafusion'] |
| 58 | |
| 59 | # Get PMC members and committers |
| 60 | pmc_ids = set(proj['owners']) |
| 61 | committer_ids = set(proj['members']) - pmc_ids |
| 62 | |
| 63 | except Exception as e: |
| 64 | print(f"Error fetching ASF roster: {e}") |
| 65 | return set(), set() |
| 66 | |
| 67 | # Fetch people to get github handles and affiliations |
| 68 | # |
| 69 | # The data looks like this: |
| 70 | # { |
| 71 | # "lastCreateTimestamp": "20250913131506Z", |
| 72 | # "people_count": 9932, |
| 73 | # "people": { |
| 74 | # "a_budroni": { |
| 75 | # "name": "Alessandro Budroni", |
| 76 | # "createTimestamp": "20160720223917Z" |
| 77 | # }, |
| 78 | # ... |
| 79 | # } |
| 80 | try: |
| 81 | r = requests.get(people_url) |
| 82 | r.raise_for_status() |
| 83 | j = r.json() |
| 84 | people = j['people'] |
| 85 | |
| 86 | # make a dictionary with each pmc_id and value their real name |
| 87 | pmcs = {p: people[p]['name'] for p in pmc_ids} |
| 88 | committers = {c: people[c]['name'] for c in committer_ids} |
| 89 | |
| 90 | except Exception as e: |
| 91 | print(f"Error fetching ASF people: {e}") |
| 92 | |
| 93 | |
| 94 | return pmcs, committers |
| 95 | |
| 96 | |
| 97 |
no test coverage detected
searching dependent graphs…