Add Gmail SMTP alerter; drop third-party-plugin scaffolding - #136
Merged
Conversation
GmailAlerter sends each alert as a plain-text email via Gmail's SMTP server (smtp.gmail.com:465, SMTP_SSL). Setup is one Gmail account with 2-Step Verification on, plus a 16-character app password from https://myaccount.google.com/apppasswords. No third-party email service, no domain to verify. Wiring (mirrored across the codebase): - discogs_alert/alert/gmail.py — the implementation - discogs_alert/config.py — GmailConfig pydantic block, DA_GMAIL_USER / _APP_PASSWORD / _TO env-var overrides - discogs_alert/__main__.py + discogs_alert/menubar.py — GMAIL branch in _build_loop_kwargs - pyproject.toml — entry-point registration - examples/config.example.toml — [alerter.gmail] block - tests/notify/test_gmail.py — 7 tests covering happy path, auth failure, generic SMTP failure, network OSError, constructor validation, and the port=465 choice - README — Gmail setup section Also drops the third-party-alerter-as-separate-package framing: the entry-point discovery mechanism stays (the in-tree built-ins use it), but new alerters now land in-tree as PRs rather than as separate pip packages. Deleted: - docs/writing-an-alerter.md (the third-party-plugin guide) - examples/discogs-alert-alerter-template/ (the starter package) - docs/redesign-proposal.md (stale; most ideas already executed, the entry-point-pluggability section is the rejected third-party direction) - docs/menubar-app-proposal.md (stale; the menu-bar app was built with a different design) - The README "Adding more alerters (plugin authors)" section, replaced with an "Adding more alerters" subsection that points contributors at the in-tree pattern (subclass Alerter, drop a file under discogs_alert/alert/, register in both _BUILTIN_ALERTERS and pyproject.toml's entry-point block). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gmail-via-SMTP alerter (account + app-password setup, sends one email per matching listing). Plus removes the third-party-plugin scaffolding (template package, plugin-author docs, stale design docs); new alerters go in-tree from now on. README updated. 269 tests pass, coverage 88.91%.
🤖 Generated with Claude Code