Skip to content

Commit 17c9b96

Browse files
jeremymanningclaude
andcommitted
fix alumni date ranges and offboarding script
- Fixed dates for 5 undergrad alumni to show full range (start-end): Chelsea Joe (2024-2026), Annabelle Morrow (2025-2026), Jackson C. Sandrich (2025-2026), Luca Gandrud (2025-2026), Owen Phillips (2025-2026) - Updated offboard_member.py to extract start year from CV and store full date range in alumni sheet instead of just end year 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fa17b2e commit 17c9b96

3 files changed

Lines changed: 39 additions & 11 deletions

File tree

data/people.xlsx

80 Bytes
Binary file not shown.

people.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ <h3>angelyn liu | undergrad</h3>
152152

153153
<div class="people-grid">
154154
<div class="person-card">
155-
<img src="images/people/placeholder.png" alt="azaire andre">
155+
<img src="images/people/azaire_andre.png" alt="azaire andre">
156156
<h3>azaire andre | undergrad</h3>
157-
<p>Azaire is a Mathematics and Anthropology double major. She is particularly interested in understanding complex systems like brain networks and financial markets.</p>
157+
<p>Azaire is a Dartmouth student studying mathematics and anthropology, with interests in health equity, education, and community leadership. She enjoys swimming and cheering, and is actively involved in campus organizations that support mentorship and inclusion.</p>
158158
</div>
159159
<div class="person-card">
160160
<img src="images/people/ben_hanson.png" alt="ben hanson">
@@ -252,11 +252,11 @@ <h3>Lab Managers</h3>
252252
<div>
253253
<h3>Undergraduate Researchers</h3>
254254
<p class="alumni-list">
255-
Chelsea Joe (2026)<br>
256-
Annabelle Morrow (2026)<br>
257-
Jackson C. Sandrich (2026)<br>
258-
Luca Gandrud (2026)<br>
259-
Owen Phillips (2026)<br>
255+
Chelsea Joe (2024-2026)<br>
256+
Annabelle Morrow (2025-2026)<br>
257+
Jackson C. Sandrich (2025-2026)<br>
258+
Luca Gandrud (2025-2026)<br>
259+
Owen Phillips (2025-2026)<br>
260260
Rodrigo Vega Ayllon (2025)<br>
261261
Harrison Stropkay (2024-2025)<br>
262262
Jake McDermid (2023-2025)<br>

scripts/offboard_member.py

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ def prompt_for_selection(matches: List[Dict[str, Any]]) -> Optional[Dict[str, An
102102
print("Please enter a valid number")
103103

104104

105-
def move_to_alumni(xlsx_path: Path, member: Dict[str, Any], end_year: str) -> bool:
105+
def move_to_alumni(xlsx_path: Path, member: Dict[str, Any], years_string: str) -> bool:
106+
"""Move member to alumni sheet with the given years string (e.g., '2024-2026' or '2026')."""
106107
if member_already_alumni(xlsx_path, member["name"]):
107108
print(
108109
f" {member['name']} is already in alumni list, skipping spreadsheet update"
@@ -118,14 +119,34 @@ def move_to_alumni(xlsx_path: Path, member: Dict[str, Any], end_year: str) -> bo
118119

119120
alumni_sheet.insert_rows(2)
120121
alumni_sheet.cell(row=2, column=1, value=member["name"].title())
121-
alumni_sheet.cell(row=2, column=2, value=end_year)
122+
alumni_sheet.cell(row=2, column=2, value=years_string)
122123

123124
wb.save(xlsx_path)
124125
wb.close()
125-
print(f" Moved {member['name']} to alumni_undergrads with year {end_year}")
126+
print(f" Moved {member['name']} to alumni_undergrads with years {years_string}")
126127
return True
127128

128129

130+
def get_cv_start_year(cv_path: Path, member_name: str) -> Optional[str]:
131+
"""Extract the start year from the CV entry for a member."""
132+
content = cv_path.read_text(encoding="utf-8")
133+
name_escaped = re.escape(member_name)
134+
135+
# Match open entry: \item Name[*]? (start_year -- )
136+
pattern_open = r"\\item\s+" + name_escaped + r"\*?\s*\((\d{4})\s*--\s*\)"
137+
match = re.search(pattern_open, content, re.IGNORECASE)
138+
if match:
139+
return match.group(1)
140+
141+
# Match closed entry: \item Name[*]? (start_year -- end_year) or (year)
142+
pattern_closed = r"\\item\s+" + name_escaped + r"\*?\s*\((\d{4})(?:\s*--\s*\d{4})?\)"
143+
match = re.search(pattern_closed, content, re.IGNORECASE)
144+
if match:
145+
return match.group(1)
146+
147+
return None
148+
149+
129150
def cv_entry_already_closed(cv_path: Path, member_name: str) -> bool:
130151
content = cv_path.read_text(encoding="utf-8")
131152
name_escaped = re.escape(member_name)
@@ -235,7 +256,14 @@ def offboard_member(
235256

236257
print(f"\nOffboarding {member['name']}...")
237258

238-
move_to_alumni(xlsx_path, member, end_year)
259+
# Get start year from CV to create the full date range for alumni sheet
260+
start_year = get_cv_start_year(cv_path, member["name"])
261+
if start_year and start_year != end_year:
262+
years_string = f"{start_year}-{end_year}"
263+
else:
264+
years_string = end_year
265+
266+
move_to_alumni(xlsx_path, member, years_string)
239267
update_cv_entry(cv_path, member["name"], end_year)
240268

241269
print(f"\nSuccessfully offboarded {member['name']}")

0 commit comments

Comments
 (0)