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