Skip to content

Conversation

@Big-Lolo
Copy link
Member

This pull request introduces significant refactoring to the configuration management of the project, moving from a custom Configuration class to a more robust, environment-driven Settings approach using Pydantic. It also updates the project to Python 3.12, revises the Dockerfile for better deployment, and makes several supporting changes to ensure compatibility. Additionally, there are minor updates to email templates and logging improvements.

Configuration Refactoring and Environment Management:

  • Introduced a new Settings system using Pydantic for configuration management, replacing the old Configuration class throughout the codebase. This enables environment variable-based configuration, nested settings (e.g., mail, database), and improved maintainability. (src/configuration/Settings.py, .env, and all usages: main.py, service.py, router.py, etc.) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
  • Updated all references to configuration values (e.g., database URLs, mail settings, frontend URLs) to use the new settings object. (see above references)

Infrastructure and Dependency Management:

  • Updated the project to use Python 3.12 (.python-version, Dockerfile, pyproject.toml) and revised dependencies to use modern standards with a [project] table in pyproject.toml. [1] [2] [3]
  • Added a new Dockerfile based on ghcr.io/astral-sh/uv:python3.12-bookworm-slim, improving deployment and dependency installation.

Code Quality and Logging:

  • Improved logging in the mail service for better traceability of email sending and error handling. [1] [2] [3]
  • Minor bugfix: raised an exception if an email is already sent in send_by_id.

Email Template Updates:

  • Updated email templates for the event hacker accepted/registered emails, including color scheme changes and updated event year. [1] [2] [3] [4] [5]

Miscellaneous:

  • Commented out a background mail sending task in main.py for further review or debugging.
  • Minor fix to the mail router to make send_by_id synchronous.

These changes collectively modernize the configuration approach, improve deployment, and enhance maintainability and clarity across the codebase.

@Big-Lolo Big-Lolo merged commit db606a3 into main Sep 25, 2025
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.

4 participants