astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
695 stars 397 forks source link

gzip was not found on your system! #1538

Closed erwanp closed 4 years ago

erwanp commented 5 years ago

I use astroquery in my infrared spectroscopy package radis to retrieve HITRAN data.

However, on each first import I get a printed message (originates from astroquery.utils.system_tools.py )

gzip was not found on your system! You should solve this issue for astroquery.eso to be at its best! On POSIX system: make sure gzip is installed and in your path!On Windows: same for 7-zip (http://www.7-zip.org)!

I do not use the astroquery.eso module and thus I'd like not to have to install gzip, nor to see that message. There are two easy options:

  1. The gzip check could be moved within the astroquery.eso function calls.
  2. The print can be replaced with a Warning, which I can catch and filter from my own code.

Option 1. requires some knowledge of astroquery which I don't have. Option 2. does not and I can do a MR.

What do you think?

keflavich commented 5 years ago

Agreed, this should be changed. A few things should happen: (1) the print statement should be a warning (so it can be silenced) (2) the 'gunzip' utility should be reevaluated - I'm not clear that there's any reason to use a system-wide gunzip instead of the python gzip package (3) the warning should only be raised if a zip file is encountered, not before

erwanp commented 5 years ago

I can work on (1) and (3) but someone else must decide (2)

erwanp commented 4 years ago

@keflavich do you know who could decide on (2) ?

keflavich commented 4 years ago

Let's just get rid of it - python's gzip is fine.

erwanp commented 4 years ago

Ok, i'll submit a PR sometimes in the week then!