Skip to content

Staging -> Production: changes since May 2025#12

Merged
amaguire-undp merged 36 commits intomainfrom
dev
May 29, 2025
Merged

Staging -> Production: changes since May 2025#12
amaguire-undp merged 36 commits intomainfrom
dev

Conversation

@anduimagui
Copy link
Collaborator

Summary

This API update introduces a comprehensive email notification and digest system, along with supporting documentation, scripts, and tests. The changes include new services for sending emails via Microsoft Graph, a weekly digest generator, and a suite of scripts and tests to verify email functionality. Several documentation files have been added or updated to describe the new email system and its setup.

New Features

  • Email Services: Added modular email service implementations for Microsoft Graph (both app and user auth) and SendGrid.
  • Weekly Digest: Introduced a service to generate and send weekly digests of signals to users.
  • Email Endpoints: Added new FastAPI endpoints for sending emails and notifications.
  • Scripts: Added scripts for sending test emails, running direct email tests, and verifying email system setup.
  • Documentation: Added/updated documentation for email system architecture, setup, and usage.
  • Testing: Added unit and integration tests for email services and endpoints.

Checklist

  • I have read the contribution guidelines.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added required dependencies to requirements.txt
  • I have updated the documentation (if applicable).

Additional Notes

  • Dependencies: New dependencies for email services (e.g., sendgrid, httpx) have been added to requirements.txt.
  • Environment Variables: Ensure that all required environment variables (e.g., SENDGRID_API_KEY, MS_FROM_EMAIL) are set as described in the documentation.
  • Azure/SendGrid Setup: See the new documentation in docs/ for setup instructions for Microsoft Graph and SendGrid email sending.
  • Testing: Run the provided scripts and tests to verify email functionality in your environment.

anduimagui and others added 24 commits January 14, 2025 17:45
* Feature: initial routers / methods for favourites

- add env documentation / adminer image for easier inspection of db
- create / delete favourite entry in database
- fetch list of favourites by user

* Chore: update formatting, tests

* update test methods / logging

-

* updates

* expand tests / logging
* env updates

* update example env
* initial routes

* update methods
* full routers / entities / test setup

* update methods

* Delete signal_collaborators.sql

---------

Co-authored-by: amaguire-undp <andrew.maguire@undp.org>
commit 70c750e
Author: happy-devs <andrew@happysoft.dev>
Date:   Sun May 25 23:23:06 2025 +0300

    updates

commit d25cb1e
Author: happy-devs <andrew@happysoft.dev>
Date:   Sun May 25 23:22:34 2025 +0300

    factory updates

commit 2beb502
Author: happy-devs <andrew@happysoft.dev>
Date:   Fri May 23 21:52:10 2025 +0300

    update digest attempts

commit 9c86f15
Author: happy-devs <andrew@happysoft.dev>
Date:   Wed May 14 22:23:22 2025 +0300

    add email digest logic

commit 9e1b804
Merge: 3453c0d 5203c91
Author: happy-devs <andrew@happysoft.dev>
Date:   Wed May 14 19:27:30 2025 +0300

    Merge dev branch into features/email-sending, resolving .env.example conflicts

commit 3453c0d
Author: happy-devs <andrew@happysoft.dev>
Date:   Thu Apr 17 11:40:15 2025 +0300

    initial routers / tests

commit fef9710
Author: happy-devs <andrew@happysoft.dev>
Date:   Thu Dec 19 16:40:00 2024 +0000

    Config: set up router / methods using sendgrid
@anduimagui anduimagui changed the title Dev Staging -> Production: changes since May 2025 May 27, 2025
@amaguire-undp amaguire-undp marked this pull request as ready for review May 27, 2025 10:17
- Set allow_origins to ["*"] for production mode
- Disable credentials when using wildcard origins (CORS requirement)
- Update CORSHandlerMiddleware to handle all origins properly
- Maintain localhost support with credentials for local development

🤖 Generated with [Claude Code](https://claude.ai/code)
@anduimagui anduimagui requested a review from claudiaRangel May 27, 2025 14:17
@anduimagui anduimagui requested a review from amaguire-undp May 27, 2025 14:17
anduimagui and others added 6 commits May 27, 2025 21:00
…allback

- Move email service creation from module level to endpoint level
- Handle missing credentials gracefully with warnings instead of errors
- Add configuration checks in email service methods
- Prevent startup failures due to missing CLIENT_SECRET env var

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@amaguire-undp amaguire-undp merged commit a0a4598 into main May 29, 2025
1 check passed
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.

2 participants