overriding rpath filename when downloading
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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?
- Langage dominant
- R
- Étoiles
- 14
- Forks
- 9
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de Bioconductor/BiocFileCache
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Bioconductor/BiocFileCache#76 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 67/100
Bioconductor/BiocFileCache#75 · 1 commentaire ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
Bioconductor/BiocFileCache#72 · 3 commentaires ·
-
Error in .util_downloadOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 25/100
Bioconductor/BiocFileCache#66 · 16 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
Bioconductor/BiocFileCache#60 · 3 commentaires ·
Toutes les issues de Bioconductor/BiocFileCache
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
HelenaLC/spatialdataR#295 ·
-
size-time-budget
Difficulté 2/5 1-3 heures Accessibilité débutants 69/100
kapelner/EDI#66 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Openscapes/blogscapes#61 ·
Les mainteneurs répondent en général sous 1 jour
-
bug posit-ai
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100