Skip to content

fix: preserve all PubMed structured abstract sections - #123

Merged
njzjz merged 3 commits into
njzjz:masterfrom
njzjz-bot:agent/fix-117-pubmed-structured-abstract
Aug 16, 2026
Merged

fix: preserve all PubMed structured abstract sections#123
njzjz merged 3 commits into
njzjz:masterfrom
njzjz-bot:agent/fix-117-pubmed-structured-abstract

Conversation

@njzjz-bot

Copy link
Copy Markdown
Contributor

Summary

  • collect every PubMed AbstractText node in document order
  • preserve nested inline XML text through the existing _text() helper
  • keep single-section and missing-abstract behavior intact
  • add regression tests for structured, single, and absent abstracts

Root cause

The PubMed parser used tree.find() for Abstract/AbstractText, which returns only the first sibling node and silently truncated structured abstracts.

Validation

The production diff is limited to the abstract extraction branch in wenxian/feeder/pubmed.py, plus focused tests in tests/test_pubmed_structured_abstract.py. Full repository CI should run on this PR.

Fixes #117

Agent: ChatGPT
Model: GPT-5.6 Sol

Collect every AbstractText node in document order instead of silently keeping only the first section.

Agent: ChatGPT
Model: GPT-5.6 Sol
Add regression tests for multiple sections, nested inline XML, single-section abstracts, and missing abstracts.

Agent: ChatGPT
Model: GPT-5.6 Sol
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.43%. Comparing base (079b00e) to head (3865ab6).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #123      +/-   ##
==========================================
+ Coverage   94.41%   94.43%   +0.01%     
==========================================
  Files          15       15              
  Lines         949      952       +3     
==========================================
+ Hits          896      899       +3     
  Misses         53       53              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njzjz
njzjz marked this pull request as ready for review August 16, 2026 12:30
Copilot AI lite review requested due to automatic review settings August 16, 2026 12:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@njzjz
njzjz merged commit 8eee004 into njzjz:master Aug 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PubMed structured abstracts are truncated to the first AbstractText section

3 participants