From f60cf3b0ef3adf4f80e54246e4b6dc72cd6b4033 Mon Sep 17 00:00:00 2001 From: Wei Zang Date: Tue, 28 Apr 2026 13:14:11 +0100 Subject: [PATCH] Bump version; update Apollo CSV & CTA colors Bump package version to 3.0.6. Change Apollo CSV import to use apollo-3.csv (and update missing-file error text) and rename CSV fixtures. Adjust goldlabel email template CTA colors (update CSS variable and inline button background/text swap). Update tests/test_resend.py payload to match new email CTA fields and content. --- app/__init__.py | 2 +- app/api/queue/csv/apollo.py | 4 ++-- .../{apollo-contacts-export (3).csv => apollo-2.csv} | 0 .../{apollo-contacts-export (4).csv => apollo-3.csv} | 0 app/utils/email_templates/goldlabel.py | 4 ++-- tests/test_resend.py | 7 +++++-- 6 files changed, 10 insertions(+), 7 deletions(-) rename app/api/queue/csv/apollo/{apollo-contacts-export (3).csv => apollo-2.csv} (100%) rename app/api/queue/csv/apollo/{apollo-contacts-export (4).csv => apollo-3.csv} (100%) diff --git a/app/__init__.py b/app/__init__.py index bb3a17a..78f4023 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,4 +1,4 @@ """Python° - FastAPI, Postgres, tsvector""" # Current Version -__version__ = "3.0.5" +__version__ = "3.0.6" diff --git a/app/api/queue/csv/apollo.py b/app/api/queue/csv/apollo.py index 39e9069..ed0da76 100644 --- a/app/api/queue/csv/apollo.py +++ b/app/api/queue/csv/apollo.py @@ -10,9 +10,9 @@ @router.post("/queue/csv/apollo") def import_apollo_csv() -> dict: """POST /queue/csv/apollo: Import data from apollo.csv into the queue table (template).""" - csv_path = os.path.join(os.path.dirname(__file__), "../csv/apollo/sample.csv") + csv_path = os.path.join(os.path.dirname(__file__), "../csv/apollo/apollo-3.csv") if not os.path.exists(csv_path): - raise HTTPException(status_code=404, detail="sample.csv not found") + raise HTTPException(status_code=404, detail="csv not found") try: conn = get_db_connection_direct() cursor = conn.cursor() diff --git a/app/api/queue/csv/apollo/apollo-contacts-export (3).csv b/app/api/queue/csv/apollo/apollo-2.csv similarity index 100% rename from app/api/queue/csv/apollo/apollo-contacts-export (3).csv rename to app/api/queue/csv/apollo/apollo-2.csv diff --git a/app/api/queue/csv/apollo/apollo-contacts-export (4).csv b/app/api/queue/csv/apollo/apollo-3.csv similarity index 100% rename from app/api/queue/csv/apollo/apollo-contacts-export (4).csv rename to app/api/queue/csv/apollo/apollo-3.csv diff --git a/app/utils/email_templates/goldlabel.py b/app/utils/email_templates/goldlabel.py index a264a06..972ce2e 100644 --- a/app/utils/email_templates/goldlabel.py +++ b/app/utils/email_templates/goldlabel.py @@ -59,7 +59,7 @@ def goldlabel_email( .email-header-inner {{ background-color: {_DARK_BG} !important; }} .email-footer {{ background-color: {_DARK_BG} !important; color: {_DARK_TEXT} !important; }} .email-subject {{ color: {_DARK_PRIMARY} !important; }} - .email-cta {{ background-color: {_DARK_PRIMARY} !important; color: {_DARK_BG} !important; }} + .email-cta {{ background-color: {_DARK_PRIMARY} !important; color: {_LIGHT_PRIMARY} !important; }} a {{ color: {_DARK_PRIMARY} !important; }} }} @@ -119,7 +119,7 @@ def goldlabel_email( diff --git a/tests/test_resend.py b/tests/test_resend.py index 1e13ee6..4891ff4 100644 --- a/tests/test_resend.py +++ b/tests/test_resend.py @@ -13,8 +13,11 @@ def test_resend_post_email(monkeypatch): payload = { "to": 'listingslab@gmail.com', - "subject": "pytest", - "html": "Python tests have run" + "subject": "Python°", + "html": "pytest run successfully", + "cta_label": "NX° Admin", + "cta_url": "https://nx-admin.goldlabel.pro", + } response = client.post("/resend", json=payload) assert response.status_code == 202