overriding rpath filename when downloading
还没有人认领这个 Issue。
评估
调研方向
Start by tracing bfcadd's construction of rpath and bfcupdate's rtype handling, then inspect how httr::GET responses are used. Define a supported filename override or response-derived filename behavior and verify that downloads with URL query strings retain a valid cache path.
由索引模型根据 Issue 内容生成。
描述
Web resources are currently downloaded to rpath which is constructed by combining a unique id (if requested) and the file name extracted from the url. However, some url dont include a filename e.g.
src = 'https://pubchem.ncbi.nlm.nih.gov/sdq/sdqagent.cgi?infmt=json&outfmt=csv&query={%22download%22:%22*%22,%22collection%22:%22pathway%22,%22order%22:[%22relevancescore,desc%22],%22start%22:1,%22limit%22:10000000,%22downloadfilename%22:%22PubChem_pathway_text_Reactome%22,%22where%22:{%22ands%22:[{%22*%22:%22Reactome%22},{%22source%22:%22Reactome%22}]}}'
In this case the url contains json, so I think the download fails as the filename generated for rpath isnt valid. However, any url that doesn't have a filename at the end but returns a file could end up with an unwieldy filename in the cache folder.
I tried to overcome this using bfcupdate to change rpath before downloading, but it fails because bfcupdate changes the rtype to "local".
One option would be to include an input in bfcadd that allows the user to override the default filename for rpath e.g. rpath_filename = "new_filename.xyz" and construct rpath from that instead of trying to extract it from the url.
Or you could try to extract the intended filename from the httr:GET response, if there is one.
Is there a work around for this that doesnt need an update to BiocFileCache?
- 主要语言
- R
- 星标
- 14
- 派生
- 9
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Bioconductor/BiocFileCache 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
Bioconductor/BiocFileCache#76 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 67/100
Bioconductor/BiocFileCache#75 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
Bioconductor/BiocFileCache#72 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 25/100
Bioconductor/BiocFileCache#66 · 16 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
Bioconductor/BiocFileCache#60 · 3 条评论 ·
查看 Bioconductor/BiocFileCache 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
HelenaLC/spatialdataR#295 ·
-
size-time-budget
难度 2/5 1-3 小时 新手友好度 69/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
Openscapes/blogscapes#61 ·
维护者通常 1 天内回复
-
bug posit-ai
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100