Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/daily_update/templates/report_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from app.daily_update import announce

MOD_TODO_URL = "https://check.arxiv.org/q/todo"
MOD_TODO_TITLE = "Your moderation todo queue"
MOD_TODO_TITLE = "Your moderation to-do queue"

def announce_line() -> str:
"""the header line about when everything not on hold will be announced"""
Expand All @@ -21,7 +21,7 @@ def announce_line() -> str:
class Section(str, Enum):
"""the parts of the report, listed in the order they appear. the value is the heading used in the email."""
HOLD = "On Hold"
NEW = "New"
NEW = "Scheduled for announcement"
CROSS = "Cross Lists"

NOTHING_TO_REPORT = "You have no new activity or submissions on Hold today!"
Expand Down
6 changes: 3 additions & 3 deletions tests/daily_update/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def test_cross_does_not_reach_a_category_it_already_lives_in(sends):

def test_mod_hold_lands_in_the_hold_section(sends):
body = sends["digest-cat@example.com"]["body"]
hold_part = body.split("New:")[0]
hold_part = body.split("Scheduled for announcement:")[0]
assert "submit/210" in hold_part #a rep on hold — the only way a replacement appears at all


Expand Down Expand Up @@ -251,13 +251,13 @@ def test_the_whole_html_digest_for_one_moderator(sends):
assert sends["digest-cat@example.com"]["html_body"] == (
'<p>Daily moderator report for cs.AI</p>\n'
'<p>If no further actions are taken, all submissions below not currently on hold will be announced at 09-03 20:00 EDT.</p>\n'
'<p><a href="https://check.arxiv.org/q/todo">Your moderation todo queue</a></p>\n'
'<p><a href="https://check.arxiv.org/q/todo">Your moderation to-do queue</a></p>\n'
'<h3>On Hold:</h3>\n'
'<p>07-27 15:00 EDT &nbsp; <b>cs.AI</b> &nbsp; Frank Franky &nbsp; submit/210<br>\n'
'<a href="https://check.arxiv.org/submit/210">On Mod Hold</a><br>\n'
'Mod Hold Author<br>\n'
'Proposals: none</p>\n'
'<h3>New:</h3>\n'
'<h3>Scheduled for announcement:</h3>\n'
'<p>07-27 18:00 EDT &nbsp; <b>cs.AI</b> &nbsp; Frank Franky &nbsp; submit/213<br>\n'
'<a href="https://check.arxiv.org/submit/213">A Discussed Paper</a><br>\n'
'Talky Author<br>\n'
Expand Down
12 changes: 6 additions & 6 deletions tests/daily_update/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _mod(labels=("cs.AI",), categories=("cs.AI",)) -> DigestMod:
# literals, so a reorder, a retitle or a dropped section fails here

def test_sections_are_in_this_order_with_these_headings():
assert [section.value for section in Section] == ["On Hold", "New", "Cross Lists"]
assert [section.value for section in Section] == ["On Hold", "Scheduled for announcement", "Cross Lists"]


# ── header ──────────────────────────────────────────────────────────────────
Expand All @@ -63,15 +63,15 @@ def test_header_text_is_the_whole_layout():
"\n"
f"{announce_line()}\n"
"\n"
"Your moderation todo queue: https://check.arxiv.org/q/todo\n"
"Your moderation to-do queue: https://check.arxiv.org/q/todo\n"
)


def test_header_html_is_the_whole_layout():
assert render_header("cs.AI").html == (
"<p>Daily moderator report for cs.AI</p>\n"
f"<p>{announce_line()}</p>\n"
'<p><a href="https://check.arxiv.org/q/todo">Your moderation todo queue</a></p>\n'
'<p><a href="https://check.arxiv.org/q/todo">Your moderation to-do queue</a></p>\n'
)


Expand Down Expand Up @@ -132,7 +132,7 @@ def test_a_section_with_content_still_shows_none_under_the_empty_ones():
"On Hold:\n"
f" none\n"
"\n"
"New:\n"
"Scheduled for announcement:\n"
"a new one\n"
"\n"
"Cross Lists:\n"
Expand All @@ -144,7 +144,7 @@ def test_a_section_with_content_still_shows_none_under_the_empty_ones():
assert body_html == (
"<h3>On Hold:</h3>\n"
f"<p>none</p>\n"
"<h3>New:</h3>\n"
"<h3>Scheduled for announcement:</h3>\n"
"<p>a new one</p>\n"
"<h3>Cross Lists:</h3>\n"
f"<p>none</p>\n"
Expand All @@ -154,7 +154,7 @@ def test_a_section_with_content_still_shows_none_under_the_empty_ones():
def test_sections_appear_in_this_order():
entries = {section: [Rendered(f"{section.value} entry\n", "\n")] for section in Section}
text, _ = render_body("cs.AI", entries)
positions = [text.index(t) for t in ("On Hold:", "New:", "Cross Lists:")]
positions = [text.index(t) for t in ("On Hold:", "Scheduled for announcement:", "Cross Lists:")]
assert positions == sorted(positions)


Expand Down
Loading