pooch icon indicating copy to clipboard operation
pooch copied to clipboard

Flag for default, OS-specific download location

Open prisae opened this issue 4 years ago • 4 comments

Other options for OS-specific, default download locations

The default download location for pooch.retrieve is currently the OS-specific cache-folder. This is probably a very sensible place for advanced users, and for users who are not interested at all in where the files are stored, as long as they are stored. However, for normal users who would like to look at the files / use the files also in other ways than through the python scripts it might not be the most obvious place to look for. A more obvious place, in my opinion, would be the OS-specific download folder (e.g., ~/Downloads/ on Linux).

Changing the default now is probably not a good option. But we could maybe implement a flag 'download' to change the default place?

This is currently only half-way a feature request, and half-way a discussion topic. What do others think?

prisae avatar Sep 22 '21 15:09 prisae

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible.

You might also want to take a look at our Contributing Guide and Code of Conduct.

welcome[bot] avatar Sep 22 '21 15:09 welcome[bot]

@prisae thanks for the feedback! I agree that for retrieve that would be the most sensible default. But I really don't want to change defaults at this point in time.

I would have thought that many users don't care about where the file lives as long as they call read it in the code, which is what this function was made to do (drop it in notebook and you have the data). But for now you can already choose the download location by setting the path argument.

Googling around for ways to get the user's download folder makes me not want to implement or maintain this code: https://stackoverflow.com/questions/35851281/python-finding-the-users-downloads-folder#48706260 (as always, Windows makes it hard and even on Linux it's not always "Downloads" since it's locale specific). But if anyone knows of a clean and testable solution, please share it 🙂

For reference, we outsource the cache folder location to another library that implements a known spec already.

leouieda avatar Sep 22 '21 17:09 leouieda

@leouieda - I feared this might be a problem. If you don't mind we can leave the issue open for some time, maybe some folks interested in it have good ideas. But otherwise feel free to close.

For reference, we outsource the cache folder location to another library that implements a known spec already.

This is awesome, maybe there is something that does the same for Downloads?

But for now you can already choose the download location by setting the path argument.

Yes I know, but then it won't be general (not OS general nor locale general, as you correctly point out).

prisae avatar Sep 22 '21 18:09 prisae

maybe there is something that does the same for Downloads?

I hoped it would be the case but haven’t found anything yet.

Yes I know, but then it won't be general (not OS general nor locale general, as you correctly point out).

Indeed.

I’ll leave this open in case anyone comes up with a suggestion.

leouieda avatar Sep 22 '21 19:09 leouieda