Skip to content

fix(federal_reserve): Fed in Print resolves items that carry only a DOI - #7852

Open
artcashin wants to merge 2 commits into
openbq-org:developfrom
artcashin:fix/fedinprint-doi-only-items
Open

artcashin wants to merge 2 commits into
openbq-org:developfrom
artcashin:fix/fedinprint-doi-only-items

Conversation

@artcashin

@artcashin artcashin commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Recent Atlanta Fed publications are missing from the Fed in Print results. Their item pages carry no citation_pdf_url and no File(s) link, only a DOI, so resolve_file returns None and the item is dropped. On 2026-11-17 that was every recent Atlanta item.

Change

utils/fedinprint.py: when an item page has no file link, resolve_file follows the page's citation_doi to its landing page and takes the first PDF linked there, resolved against the page's og:url. Items that already resolve are unaffected; an item with neither still returns None.

Cost and scope

  • The DOI request happens only for an item whose page has no file link, so items that resolved before make the same requests as before. It is one more request per such item, the same shape as the existing FRASER catalog hop in resolve_file, and it goes through the same per-URL cache (_safe_resolve).
  • Items are resolved on demand at download, not when listing; search still reads only the result pages.

Results against Fed in Print

On 2026-11-18 the eight newest Atlanta items all carried only a DOI (10.29338/wp2026-14 to wp2026-19, ph2026-08, ph2026-09). All eight resolved to the paper's PDF on www.atlantafed.org. Two landing pages also link an online appendix; it comes second, so the first PDF is the paper.

Tests

  • New TestFileResolution::test_resolve_doi_only_item_through_its_landing_page. It fails on develop.
  • openbb_platform/providers/federal_reserve/tests: 2,402 passed (Python 3.12).

🤖 Generated with Claude Code

artcashin and others added 2 commits November 18, 2026 03:31
Atlanta's recent items have no citation_pdf_url or File(s) link, only a DOI, so every one was dropped. The DOI's landing page links the PDF.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant