Fix the outer source not found error in both Method sources and Threshold sources in creating a new score set and calibration. - #866
Conversation
…hold sources in creating a new score set and calibration.
Coverage Report for CI Build 35809594702Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Warning No base build found for commit Coverage: 88.963%Details
Uncovered Changes
Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Looking at the issue this is paired with, this does work but I think the fix is aimed at the wrong layer. _fetch is a low level function shared by every Rxiv call site and having it swallow these parse failures into an empty list means genuine upstream errors (like Rxiv going down) now reads as 'not found' rather than an error.
The root cause here is that we have no way to differentiate PubMed and bioRxiv IDs; they're indistinguishable, so we are forced to check both. Because of that find_generic_article fans out to every db an identifier is valid for. The solution here solves that by making the lower level _fetch function not raise, but I think a more precise solution in the find_generic_article function would:
- Perform the fan out
- Catch any errors in the fanned out searches and log them
- Drop the candidate search because of the error
Catching and dropping the candidate errored search would allow the successful PubMed search to be returned.
That does mean an explicit search with db_name="medRxiv" would continue to crash _fetch. But I think that's a separate and narrower gap than what the issue was intending to solve.
No description provided.