pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.06k stars 292 forks source link

Feature Request: available_readers to return alphabetical order #1343

Closed raybellwaves closed 4 years ago

raybellwaves commented 4 years ago

Firstly, this is awesome https://satpy.readthedocs.io/en/stable/readers.html#available-readers

It would be good to return the readers in alphabetical order to make it easier to read.

You could also suppress the that reader config is not found as a first time user this creates a lot of clutter.

>>> from satpy import available_readers
>>> available_readers()
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/seviri_l2_grib.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/grib.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/clavrx.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/msi_safe.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/iasi_l2_so2_bufr.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/viirs_edr_flood.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/avhrr_l1b_hrpt.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/seviri_l1b_icare.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/seviri_l2_bufr.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/hsaf_grib.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/li_l2.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/modis_l2.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/avhrr_l1b_gaclac.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/modis_l1b.yaml']
Could not import reader config from: ['/home/ray/local/bin/anaconda3/envs/dev/lib/python3.8/site-packages/satpy/etc/readers/caliop_l2_cloud.yaml']
['seviri_l1b_native', 'nucaps', 'fci_l2_nc', 'ahi_hrit', 'safe_sar_l2_ocn', 'fci_l1c_fdhsi', 'virr_l1b', 'scatsat1_l2b', 'tropomi_l2', 'olci_l2', 'ahi_hsd', 'hy2_scat_l2b_h5', 'goes-imager_hrit', 'amsr2_l2', 'viirs_l1b', 'generic_image', 'abi_l1b_scmi', 'slstr_l2', 'vii_l1b_nc', 'seviri_l1b_nc', 'agri_l1', 'electrol_hrit', 'nwcsaf-msg2013-hdf5', 'viirs_edr_active_fires', 'nwcsaf-pps_nc', 'acspo', 'mimicTPW2_comp', 'abi_l1b', 'nwcsaf-geo', 'slstr_l1b', 'omps_edr', 'geocat', 'mtsat2-imager_hrit', 'avhrr_l1b_aapp', 'mersi2_l1b', 'viirs_compact', 'glm_l2', 'smos_l2_wind', 'iasi_l2', 'cmsaf-claas2_l2_nc', 'olci_l1b', 'avhrr_l1b_eps', 'jami_hrit', 'vii_l2_nc', 'vaisala_gld360', 'abi_l2_nc', 'seviri_l1b_hrit', 'ami_l1b', 'maia', 'ghrsst_l3c_sst', 'gpm_imerg', 'amsr2_l1b', 'viirs_sdr', 'goes-imager_nc', 'sar-c_safe']
raybellwaves commented 4 years ago

In addition, I didn't know (as_dict=False) was an option until I looked at the code. Could add that into the docs above so users know they can also do as_dict=True to return more information.

djhoese commented 4 years ago

All sounds good to me. Not sure why I didn't do alphabetical in the first place. PRs for the docstring and the sorting are welcome. Thanks.

alishahusain commented 4 years ago

I am a first-time contributor and would like to work on this issue.

djhoese commented 4 years ago

@alishahusain Awesome! Welcome. You can find information on contributing to Satpy in the docs here. If you have any questions or need guidance for this particular issue, let us know. If you are doing this as part of hacktoberfest you might want to wait until October to create the pull request.

alishahusain commented 4 years ago

I created a pull request for requested changes here #1378

mraspaud commented 4 years ago

Fixed in #1378