Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag for default, OS-specific download location #262

Open
prisae opened this issue Sep 22, 2021 · 4 comments
Open

Flag for default, OS-specific download location #262

prisae opened this issue Sep 22, 2021 · 4 comments
Labels
question Further information is requested

Comments

@prisae
Copy link
Member

prisae commented Sep 22, 2021

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?

@welcome
Copy link

welcome bot commented Sep 22, 2021

👋 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.

@leouieda
Copy link
Member

leouieda commented Sep 22, 2021

@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.

@prisae
Copy link
Member Author

prisae commented Sep 22, 2021

@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).

@leouieda
Copy link
Member

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 leouieda added the question Further information is requested label Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants