Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARPA Exporter - Add python business-logic for building zipfile and emailing user #3934

Merged
merged 101 commits into from
Feb 10, 2025

Conversation

as1729
Copy link
Contributor

@as1729 as1729 commented Jan 28, 2025

Ticket #3911 and #3909

Description

This PR ensures that:

  1. The build-zip business logic adheres to the requirements of appending any new files based on the metadata CSV.
  2. Sends an email to the user using USDR styling.

Screenshots / Demo Video

Testing

Automated and Unit Tests

  • Added Unit tests

Manual tests for Reviewer

  • Added steps to test feature/functionality manually

Checklist

  • Provided ticket and description
  • Provided screenshots/demo
  • Provided testing information
  • Provided adequate test coverage for all new code
  • Added PR reviewers

TylerHendrickson and others added 27 commits January 17, 2025 01:26
…the archive. update build_zip to match latest variable names
@github-actions github-actions bot added the javascript Pull requests that update Javascript code label Jan 28, 2025
Copy link

@sophaskins sophaskins left a comment

Choose a reason for hiding this comment

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

Heya! This looks fine to me!

I do have one question, but it's not a review-blocker or anything. Where do the email_templates/base.html (and other templates) come from? I know that writing HTML emails that render acceptably in a wide variety of email clients/webmail sites can be tricky. If it's from some other example project/code, could we drop a comment or readme somewhere noting that?

Thanks!

@TylerHendrickson
Copy link
Member

@sophaskins re

Heya! This looks fine to me!

I do have one question, but it's not a review-blocker or anything. Where do the email_templates/base.html (and other templates) come from? I know that writing HTML emails that render acceptably in a wide variety of email clients/webmail sites can be tricky. If it's from some other example project/code, could we drop a comment or readme somewhere noting that?

Thanks!

The base.html and formatted_body.html template files appear to be lifted from the usdigitalresponse/cpf-reporter repo (see here). However, those are adapted from the templates in this repository, packages/server/src/static/email_templates/base.html and packages/server/src/static/email_templates/_formatted_body.html, respectively. Notably, both base.html files are identical; formatted_body.html and _formatted_body.html have a very minimal difference on line 20 (the latter contains a text-transform: uppercase; styling directive that isn't present on the former.

Also worth noting: The server-side JS codebase in this repo provides a CLI helper utility for testing emails, provided by packages/server/src/scripts/sendDebugEmail.js, intended to be used in conjunction with the mailpit configuration present in our docker-compose.yml file. I have additional changes that add something similar to the arpa-exporter codebase, which I'll submit a PR for once this one is merged. I've used it locally to ensure that the email templates are rendering as expected for popular email clients.

@TylerHendrickson TylerHendrickson enabled auto-merge (squash) February 10, 2025 20:16
@TylerHendrickson TylerHendrickson merged commit ff7a842 into main Feb 10, 2025
23 checks passed
@TylerHendrickson TylerHendrickson deleted the as/add-unit-tests-for-zip-functionality branch February 10, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file github Infra Issues related to the infrastructure underlying all the tools. javascript Pull requests that update Javascript code python terraform Pull requests that update Terraform code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants