A date range is ignored by arXiv and by citation expansion, and text-fetch pmc has no date options

Open
#85 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
54/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start by reading SearchConfig.to_arxiv_query() and arxiv.py for arXiv date handling, then trace expand_papers() in europepmc.py and the text-fetch pmc fetch options. Compare existing date option names in the Europe PMC, ChemRxiv, bioRxiv and medRxiv commands. Done means date ranges work for arXiv or produce a clear error, citation expansion has an optional independent range with excluded-paper counts in --dry-run --json, and PMC accepts consistent date options with old spellings retained as aliases.

Written by the indexing model from the issue text.

Description

area:expansion area:sources bug impact:wrong-output

Part of lanl/chatty#65.

A search config's date_range ({"start": "2020/01/01", "end": "2024/12/31"}) limits PubMed Central ([dp]), Europe PMC (FIRST_PDATE), bioRxiv, medRxiv, ChemRxiv and OSTI. Three places don't apply it:

  • arXiv. SearchConfig.to_arxiv_query() adds no date clause, and arxiv.py doesn't filter results by date. A fetch with arXiv among its sources and a date range downloads arXiv papers from any year, with no warning.
  • Citation expansion. expand_papers() in europepmc.py takes no dates. A corpus limited to 2020–2024 takes in every reference and citation of its seeds, from any year. Sometimes that's what's wanted, since a 2022 paper's key references are older, so it should be a choice rather than a fixed rule.
  • text-fetch pmc. It has no date options, while europepmc and chemrxiv take --date-from/--date-to and biorxiv and medrxiv take --start-date/--end-date. For PMC, a date goes in a config file or is written by hand into --query.

Acceptance criteria:

  • arXiv applies the date range (its API accepts a submittedDate:[... TO ...] range in the query), or the command refuses a date range for arXiv with a clear error instead of ignoring it.
  • Expansion takes its own date range, off by default: for example expansion_date_range in the config and --expansion-date-from/--expansion-date-to. --dry-run --json reports how many expanded papers it left out.
  • text-fetch pmc fetch takes --date-from/--date-to, like europepmc.
  • The date options are spelled the same across commands, keeping the old spellings as aliases.
Dominant language
Python
Stars
1
Forks
0
Avg merge
1h 1m
Merged PRs (30d)
31

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lanl/text-fetch

All issues in lanl/text-fetch

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.