Skip to content

新增 Europe PMC 搜索适配器 #315

@jerry609

Description

@jerry609

动机

Europe PMC 是 PubMed 的超集, 额外覆盖预印本服务器和专利引用。使用 REST JSON API, 无需额外依赖 (不需要 biopython), 是生物医学领域的最佳选择。

API 信息

  • URL: https://www.ebi.ac.uk/europepmc/webservices/rest/search
  • 认证: 免费, 无需 API key
  • 限流: 宽松, 无官方声明
  • 返回: title, doi, pmid, abstract, journal, citedByCount, authorString (逗号分隔), pubYear

涉及文件

文件 改动
infrastructure/harvesters/europepmc_harvester.py 新建 — EuropePMCHarvester, 使用 SharedHTTPClient
infrastructure/adapters/europepmc_adapter.py 新建 — EuropePMCAdapter(SearchPort)
infrastructure/adapters/__init__.py 注册 europepmc adapter
tests/unit/test_europepmc_adapter.py 新建 — respx mock 测试

注意事项

  • URL 查询参数中空格需编码为 + (不是 %20), 即 quote(query).replace('%20', '+')
  • authors 是逗号分隔的字符串 (authorString), 需 split
  • citedByCount 即为引用数

验收标准

  • EuropePMCAdapter 实现 SearchPort protocol
  • 搜索 "CRISPR gene editing" 返回 ≥ 10 篇有 pmid 的论文
  • mock 测试通过

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsearchSearch infrastructure

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions