nf-core / nf-core/tools

Make request caching optional

Open
#2,378 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of the bug

I'm using the nf_core Python module. It's automatically patching requests to add caching (through requests_cache), and this is causing a problem with other code. In my case it seems to happen through a call to nf_core.utils.setup_requests_cachedir which is performed when I load nf_core.create.

Patching requests globally is an effect that can interfere with other code. Could you make it an opt-in feature through some sort of parameter?

Command used and terminal output

No response

System information

No response

Contributor guide

Open the contributing guide

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.

Research direction

Read nf_core/list.py around line 21 and inspect nf_core.utils.setup_requests_cachedir, then trace how nf_core.create triggers it. Define the opt-in behavior and verify that loading nf_core.create does not patch requests unless caching is explicitly enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.