-
Notifications
You must be signed in to change notification settings - Fork 76
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
allow silent, hashless pooch.retrieve #301
Comments
I just now saw #232 and it mentions that you can already silence the output, but I did not find this in the docs? Did I just not look hard enough? |
Ok found it but you kind of have to know it to find it - so maybe this is more of a documentation issue? (Related: pity logger.setLevel is not a context manager). |
@mathause passing The question of verbosity is something I've been trying to think of a way to do that without breaking code that relies on the current implementation (like @danshapero's). Ideally, we should have done this with simple The logging module doesn't really work well for us since it's not meant to be used within a library that's used in other libraries. It seemed like a perfect fit at the time but some problems have surfaced that we didn't foresee. A current problem is that if one of your dependencies silences Pooch logging, your package will also have it silenced. I'll put down some thoughts on this in a separate issue. |
Thanks for the answer. Yes, I knew |
Description of the desired feature:
Using a pooch registry it is possible to download files without passing a hash and get no warning, by setting the hash to
None
. However, I think sometimes it would be nice to do this as well usingpooch.retrieve
. This should definitely not be the default but a deliberate choice.An example is to dynamically create the download url:
I abused
pooch.create
for this in my package but I think this is not optimal.Option 1: Pass a sentinel value as
hash
, for example an Ellipsis...
orpooch.no_hash
where
pooch.no_hash
could be something along the lines of:(see also PEP0661).
Option 2: Add a
silent
keyword topooch.retrieve
(which defaults toFalse
):The first option is way cooler but the second is probably better 😉
Are you willing to help implement and maintain this feature?
Yes, I'd be fine to implement this.
The text was updated successfully, but these errors were encountered: