Skip to content

Conversation

@amrit110
Copy link
Member

@amrit110 amrit110 commented Nov 3, 2025

This pull request adds a new script, scripts/admin/setup_teams.py, which streamlines the process of creating or updating team documents in Firestore from a CSV file. The script provides validation, error handling, and a dry-run mode, making it easier and safer to manage teams in bulk.

Key features and changes:

New Team Setup Automation Script:

  • Introduces setup_teams.py, a command-line tool to read team names from a CSV file and create or update corresponding documents in Firestore, including support for a dry-run mode to preview changes without making modifications.
  • Implements comprehensive CSV validation, including checks for missing columns, empty or invalid team names, and duplicate entries, with user-friendly error reporting.
  • Provides clear progress feedback and summary tables using the rich library, enhancing the user experience during batch operations.
  • Handles Firestore interactions robustly, updating timestamps for existing teams and creating new documents for new teams, with detailed reporting of created, updated, and failed operations.
  • Includes thorough documentation, usage examples, and structured output to assist administrators in managing team data efficiently.

@amrit110 amrit110 self-assigned this Nov 3, 2025
@amrit110 amrit110 added the enhancement New feature or request label Nov 3, 2025
@amrit110 amrit110 merged commit 9c3da62 into main Nov 3, 2025
3 checks passed
@amrit110 amrit110 deleted the add_setup_teams_script branch November 3, 2025 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants