-
Notifications
You must be signed in to change notification settings - Fork 30
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
Prepend a real summary in mail digest #278
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #278 +/- ##
==========================================
+ Coverage 56.57% 56.68% +0.1%
==========================================
Files 70 70
Lines 3694 3712 +18
Branches 475 476 +1
==========================================
+ Hits 2090 2104 +14
- Misses 1536 1541 +5
+ Partials 68 67 -1
Continue to review full report at Codecov.
|
Fix digest template when Verbose=False Fix email batch test. PEP-8 style fixes.
Fix test_basic_batch_not_verbose content. Fix single message test after recipient changed name.
I'm unsure about adding a test case where digest content is too big:
This would be a very time consuming test. Or maybe we can reduce the max digest content length (now it's 20M chars, I think a value of 2M chars would be more appropriate...). |
I guess one could mock the return from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Could you add a change log entry?
Thanks!
Sure, should I add the new entry as "Feature" for a new 2.1.0 version or as a "Bug fix" for v.2.0.3? By the way, while running the 'test_batch_too_big' locally, I found that the encoding of the digest content is corrupted: line 502 should be |
Just add a new section "Master" and put it under "Bug fixes" since it's fixing a regression. That way it can be either 2.0.3 if no features go in before the next release, or 2.1.0.
Ah, nice catch. I'm fine with it being included in this PR, although it'd be nice if it was its own commit. |
I will made a separate PR for that, adding a test unit and lowering the batch characters limit to 500k (that would be an email of nearly 2 MBytes of text - it seems a reasonable limit). I also would like to think some way to stop processing the batch if that limit is trespassed, now we process the full batch and then we eventually discard it just to process again all the message IDs. |
Great, thanks! I squashed this, made one small change (a file got marked as executable), and merged it, but it looks like I changed enough that GitHub doesn't know it's merged. It's 681cf86. |
Fixes #277
This change prepends a short summary made only by short titles when the user choose to receive mail digest with verbose messages.
Full messages are appended to the summary, so the user can see at a glance what are the digest contents.
I modified the relevant test accordingly with the new digest format. Note that I was unable to run real unittests because Vagrant environment doesn't install (it errors out during provision).