Supplement slow-indexed IEEE journals from Crossref (TSE fresh papers)

OpenAlex indexes TSE ~2-3 months late (nothing after 2026-06-26 as of Sep 2),
so TSE never appeared in weekly digests. Sources can now be flagged
crossref_fresh: their recent papers are discovered via Crossref (created-date
window, paper-level CC licence = OA) and listed without abstracts; a digested
paper's missing abstract is filled once OpenAlex indexes the DOI, so a later
--force re-run can add its per-paper summary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jsahn
2026-09-02 21:00:32 +09:00
co-authored by Claude Fable 5
parent a6ccf04fb2
commit 3f1d16cae1
8 changed files with 307 additions and 4 deletions
+12
View File
@@ -22,9 +22,11 @@ def env(monkeypatch, tmp_path):
"rss": [],
"settings": Settings(_env_file=None, SEBRIEF_DATA_DIR=str(tmp_path / "data")),
}
ctx["crossref"] = []
monkeypatch.setattr(pipeline, "_now", lambda: NOW)
monkeypatch.setattr(pipeline, "Store", lambda path: ctx["store"])
monkeypatch.setattr(pipeline, "fetch_openalex_papers", lambda start, end, s: ctx["openalex"])
monkeypatch.setattr(pipeline, "fetch_crossref_papers", lambda start, end, s: ctx["crossref"])
monkeypatch.setattr(pipeline, "fetch_rss_papers", lambda feeds, start, end, bl: ctx["rss"])
monkeypatch.setattr(pipeline, "build_provider", lambda s: ctx["provider"])
monkeypatch.setattr(pipeline, "build_deliverers", lambda s: ctx["deliverers"])
@@ -66,6 +68,16 @@ def test_build_payload_merges_rss_dedup_by_doi(env):
assert upserted[0].source == "openalex" # openalex metadata wins on the duplicate
def test_build_payload_merges_crossref_openalex_wins_duplicates(env):
dup = make_paper(source="crossref:tse", venue="TSE", abstract="") # same DOI as openalex
fresh = make_paper("10.1109/tse.2026.1", source="crossref:tse", abstract="")
env["crossref"] = [dup, fresh]
build_payload(WEEK, env["settings"], env["store"])
[upserted] = env["store"].upserted
assert [p.doi for p in upserted] == ["10.1145/1234567", "10.1109/tse.2026.1"]
assert upserted[0].source == "openalex" # richer OpenAlex metadata wins the duplicate
def test_build_payload_invalid_feed_spec_is_a_gap(env):
env["settings"] = env["settings"].model_copy(update={"rss_feeds": ["broken-spec"]})
payload = build_payload(WEEK, env["settings"], env["store"])