Skip to content

Conversation

@ladriennel
Copy link
Collaborator

@ladriennel ladriennel commented Oct 26, 2025

Summary

This PR adds a new alumni collection with a CSV upload script for the development of the alumni database

  • Defined new types:
    • Alumni interface along with job role and DTI role types specific to alumni
    • DBAlumni type
  • Created upload-alumni-data-db.ts script to upload alumni data from a CSV into the database
    • added to package.json
    • used emails as document ID

Linear

move alumni to new collection

Test Plan

To test the script:

  • Create a csv in backend/scripts/ with valid headers and rows
  • Run npm run upload-alumni in backend
  • Check Firestore to verify correct upload in the alumni collection

Notes

  • Need to adjust location field to city, region, country

@ladriennel ladriennel requested a review from a team as a code owner October 26, 2025 23:22
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dti-github-bot
Copy link
Member

dti-github-bot commented Oct 26, 2025

[diff-counting] Significant lines: 181.

@ladriennel ladriennel force-pushed the adrienne/idol-45-move-alumni-to-a-new-collection branch from c1914c9 to 96e096d Compare October 27, 2025 00:01
try {
return validateAlumni(alumniRow);
} catch (validationError: unknown) {
throw new Error(`Row ${index + 2}: ${(validationError as Error).message}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, Adrienne! I think you do an awesome job handling edge cases and different formatting within the actual CSV. One quick comment - when you throw errors like these, it might be really useful for debugging purposes if you also included what field caused this error (name, email, etc). Otherwise, looks good!

const fullPath = join(OUTPUT_FOLDER, image.fileName);
return downloadAndProcessImage(image.url, fullPath)
.then(() => console.log(`Processing complete for ${image.fileName}`))
.then(() => console.log(`Processing complete door ${image.fileName}`))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor change, I just think door should be for.

about?: string;
}

const parseCSVRow = (row: string): string[] => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, Adrienne! I really like the clean type definitions. For the parseCSVRow function , I think it's a good start for handling CSV parsing. Since we're the ones creating the data, I don't think it's an issue now, but for some edge cases like nested quotes or line breaks inside quoted fields, it might not work as well. Otherwise, looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants