From fe96bdf6ba402208b822f6a72f3ef8055a7502cc Mon Sep 17 00:00:00 2001 From: Subhash Bhushan Date: Mon, 28 Sep 2020 13:58:12 -0700 Subject: [PATCH] Rename Sendgrid email and expose directly under protean package --- CHANGELOG.rst | 2 ++ src/protean/__init__.py | 9 ++++++++- .../adapters/email/{sendgrid_email.py => sendgrid.py} | 0 tests/adapters/email/sendgrid_email/config.py | 2 +- tests/adapters/email/sendgrid_email/tests.py | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) rename src/protean/adapters/email/{sendgrid_email.py => sendgrid.py} (100%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 475b3667..b395c77b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,6 +12,8 @@ DEV * Remove `bounded_context` definition everywhere * Rename `dict_repo` to `memory` * Remove `*_repo` from DB adapter module names +* Rename `celery` and `inline` broker module names +* Rename `sendgrid` email module name 0.5.4 (2020-09-22) ------------------ diff --git a/src/protean/__init__.py b/src/protean/__init__.py index c3150957..2b67cca7 100644 --- a/src/protean/__init__.py +++ b/src/protean/__init__.py @@ -8,5 +8,12 @@ # Adapters from .adapters.broker.celery import CeleryBroker, ProteanTask from .adapters.broker.inline import InlineBroker +from .adapters.email.sendgrid import SendgridEmailProvider -__all__ = ("Domain", "CeleryBroker", "ProteanTask", "InlineBroker") +__all__ = ( + "Domain", + "CeleryBroker", + "ProteanTask", + "InlineBroker", + "SendgridEmailProvider", +) diff --git a/src/protean/adapters/email/sendgrid_email.py b/src/protean/adapters/email/sendgrid.py similarity index 100% rename from src/protean/adapters/email/sendgrid_email.py rename to src/protean/adapters/email/sendgrid.py diff --git a/tests/adapters/email/sendgrid_email/config.py b/tests/adapters/email/sendgrid_email/config.py index 789b4ad5..505d6c54 100644 --- a/tests/adapters/email/sendgrid_email/config.py +++ b/tests/adapters/email/sendgrid_email/config.py @@ -41,7 +41,7 @@ EMAIL_PROVIDERS = { "default": { - "PROVIDER": "protean.adapters.email.sendgrid_email.SendgridEmailProvider", + "PROVIDER": "protean.SendgridEmailProvider", "DEFAULT_FROM_EMAIL": "admin@team8solutions.com", "API_KEY": "this-is-a-fake-key", }, diff --git a/tests/adapters/email/sendgrid_email/tests.py b/tests/adapters/email/sendgrid_email/tests.py index 9ae0d81e..bca939d4 100644 --- a/tests/adapters/email/sendgrid_email/tests.py +++ b/tests/adapters/email/sendgrid_email/tests.py @@ -2,7 +2,7 @@ import pytest from mock import patch -from protean.adapters.email.sendgrid_email import SendgridEmailProvider +from protean import SendgridEmailProvider # Local/Relative Imports from .elements import Person, PersonAdded, WelcomeEmail, WelcomeNewPerson