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

Functions to automatically generate reader table for documentation #2108

Merged
merged 10 commits into from
Jul 26, 2022
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ doc/source/_build/*
# this should be generated automatically when installed
satpy/version.py
doc/source/api/*.rst
doc/source/reader_table.rst
5 changes: 5 additions & 0 deletions doc/source/_static/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(document).ready( function () {
$('table.datatable').DataTable( {
"paging": false
} );
} );
12 changes: 12 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
sys.path.append(os.path.abspath('../../'))
sys.path.append(os.path.abspath(os.path.dirname(__file__)))

from reader_table import generate_reader_table # noqa: E402

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -75,6 +76,10 @@ def __getattr__(cls, name):
'zarr']
autoclass_content = 'both' # append class __init__ docstring to the class docstring

# auto generate reader table from reader config files
with open("reader_table.rst", mode="w") as f:
f.write(generate_reader_table())

# -- General configuration -----------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be extensions
Expand Down Expand Up @@ -185,8 +190,15 @@ def __getattr__(cls, name):

html_css_files = [
'theme_overrides.css', # override wide tables in RTD theme
'https://cdn.datatables.net/1.10.23/css/jquery.dataTables.min.css',
]

html_js_files = [
'https://cdn.datatables.net/1.10.23/js/jquery.dataTables.min.js',
'main.js',
]


# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
Expand Down
53 changes: 31 additions & 22 deletions doc/source/dev_guide/custom_reader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,37 @@ The ``reader`` section provides basic parameters for the overall reader.

The parameters to provide in this section are:

- name: This is the name of the reader, it should be the same as the
filename (without the .yaml extension). The naming convention for
this is described above in the :ref:`reader_naming` section above.
- short_name (optional): Human-readable version of the reader 'name'.
If not provided, applications using this can default to taking the 'name',
replacing ``_`` with spaces and uppercasing every letter.
- long_name: Human-readable title for the reader. This may be used as a
section title on a website or in GUI applications using Satpy. Default
naming scheme is ``<space program> <sensor> Level <level> [<format>]``.
For example, for the ``abi_l1b`` reader this is ``"GOES-R ABI Level 1b"``
where "GOES-R" is the name of the program and **not** the name of the
platform/satellite. This scheme may not work for all readers, but in
general should be followed. See existing readers for more examples.
- description: General description of the reader. This may include any
`restructuredtext <http://docutils.sourceforge.net/docs/user/rst/quickref.html>`_
formatted text like links to PDFs or sites with more information on the
file format. This can be multiline if formatted properly in YAML (see
example below).
- sensors: The list of sensors this reader will support. This must be
all lowercase letters for full support throughout in Satpy.
- reader: The main python reader class to use, in most cases the
``FileYAMLReader`` is a good choice.
name
This is the name of the reader, it should be the same as the
filename (without the .yaml extension). The naming convention for
this is described above in the :ref:`reader_naming` section above.
short_name (optional): Human-readable version of the reader 'name'.
If not provided, applications using this can default to taking the 'name',
replacing ``_`` with spaces and uppercasing every letter.
djhoese marked this conversation as resolved.
Show resolved Hide resolved
long_name
Human-readable title for the reader. This may be used as a
section title on a website or in GUI applications using Satpy. Default
naming scheme is ``<space program> <sensor> Level <level> [<format>]``.
For example, for the ``abi_l1b`` reader this is ``"GOES-R ABI Level 1b"``
where "GOES-R" is the name of the program and **not** the name of the
platform/satellite. This scheme may not work for all readers, but in
general should be followed. See existing readers for more examples.
description
General description of the reader. This may include any
`restructuredtext <http://docutils.sourceforge.net/docs/user/rst/quickref.html>`_
formatted text like links to PDFs or sites with more information on the
file format. This can be multiline if formatted properly in YAML (see
example below).
status
The status of the reader (one of: Nominal, Beta, Alpha)
supports_fsspec
If the reader supports reading data via fsspec (either true or false).
sensors
The list of sensors this reader will support. This must be
all lowercase letters for full support throughout in Satpy.
reader
The main python reader class to use, in most cases the
``FileYAMLReader`` is a good choice.

.. code:: yaml

Expand Down
245 changes: 24 additions & 221 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,228 +74,31 @@ the base Satpy installation.

.. _reader_table:

.. list-table:: Satpy Readers
:header-rows: 1
:widths: 45 25 30
.. include:: reader_table.rst

* - Description
- Reader name
- Status
* - MSG (Meteosat 8 to 11) SEVIRI data in HRIT format
- `seviri_l1b_hrit`
- Nominal
* - MSG (Meteosat 8 to 11) SEVIRI data in native format
- `seviri_l1b_native`
- Nominal.
* - MSG (Meteosat 8 to 11) SEVIRI data in netCDF format
- `seviri_l1b_nc`
- | HRV channel not supported, incomplete metadata
| in the files. EUMETSAT has been notified.
* - MSG (Meteosat 8 to 11) L2 products in BUFR format
- `seviri_l2_bufr`
- AMV BUFR products not supported yet.
* - MSG (Meteosat 8 to 11) L2 products in GRIB2 format
- `seviri_l2_grib`
- Nominal
* - MFG (Meteosat 2 to 7) MVIRI data in netCDF format (FIDUCEO FCDR)
- `mviri_l1b_fiduceo_nc`
- Beta
* - Himawari 8 and 9 AHI data in HSD format
- `ahi_hsd`
- Nominal
* - Himawari 8 and 9 AHI data in HRIT format
- `ahi_hrit`
- Nominal
* - Himawari 8 and 9 AHI data in Gridded binary format,
from http://www.cr.chiba-u.jp/databases/GEO/H8_9/FD/index_jp.html
- `ahi_l1b_gridded_bin`
- Nominal
* - MTSAT-1R JAMI data in JMA HRIT format
- `jami_hrit`
- Beta
* - MTSAT-2 Imager data in JMA HRIT format
- `mtsat2-imager_hrit`
- Beta
* - GOES-R imager data in netcdf format
- `abi_l1b`
- Nominal
* - NOAA GOES-R ABI L2+ products in netcdf format
- `abi_l2_nc`
- Beta
* - GOES 11 to 15 imager data in HRIT format
- `goes-imager_hrit`
- Nominal
* - GOES 8 to 15 imager data in netCDF format (from NOAA CLASS)
- `goes-imager_nc`
- Beta
* - Electro-L N2 MSU-GS data in HRIT format
- `electrol_hrit`
- Nominal
* - NOAA 15 to 19, Metop A to C AVHRR data in AAPP format
- `avhrr_l1b_aapp`
- Nominal
* - Metop A to C AVHRR in native level 1 format
- `avhrr_l1b_eps`
- Nominal
* - Tiros-N, NOAA 7 to 19 AVHRR data in GAC and LAC format
- `avhrr_l1b_gaclac`
- Nominal
* - NOAA 15 to 19 AVHRR data in raw HRPT format
- `avhrr_l1b_hrpt`
- In development
* - GCOM-W1 AMSR2 data in HDF5 format
- `amsr2_l1b`
- Nominal
* - MTG FCI Level 1C data in NetCDF format
- `fci_l1c_nc`
- In development (beta for FDHSI files, HRFI not supported yet)
* - MTG FCI Level 2 data in NetCDF format
- `fci_l2_nc`
- In development.
* - Callipso Caliop Level 2 Cloud Layer data (v3) in EOS-hdf4 format
- `caliop_l2_cloud`
- In development
* - Terra and Aqua MODIS data in EOS-hdf4 level-1 format as produced by IMAPP and IPOPP or downloaded from LAADS
- `modis_l1b`
- Nominal
* - NWCSAF GEO 2016 products in netCDF4 format (limited to SEVIRI)
- `nwcsaf-geo`
- In development
* - NWCSAF PPS 2014, 2018 products in netCDF4 format
- `nwcsaf-pps_nc`
- | Not yet support for remapped netCDF products.
| Only the standard swath based output is supported.
| CPP products not supported yet
* - Sentinel-1 A and B SAR-C data in SAFE format
- `sar-c_safe`
- Nominal
* - Sentinel-2 A and B MSI data in SAFE format
- `msi_safe`
- Nominal
* - Sentinel-3 A and B OLCI Level 1B data in netCDF4 format
- `olci_l1b`
- Nominal
* - Sentinel-3 A and B OLCI Level 2 data in netCDF4 format
- `olci_l2`
- Nominal
* - Sentinel-3 A and B SLSTR data in netCDF4 format
- `slstr_l1b`
- In development
* - OSISAF SST data in GHRSST (netcdf) format
- `ghrsst_l2`
- In development
* - NUCAPS EDR Retrieval in NetCDF4 format
- `nucaps`
- Nominal
* - NOAA Level 2 ACSPO SST data in netCDF4 format
- `acspo`
- Nominal
* - GEOstationary Cloud Algorithm Test-bed (GEOCAT)
- `geocat`
- Nominal
* - The Clouds from AVHRR Extended (CLAVR-x)
- `clavrx`
- Nominal
* - SNPP VIIRS data in HDF5 SDR format
- `viirs_sdr`
- Nominal
* - SNPP VIIRS data in netCDF4 L1B format
- `viirs_l1b`
- Nominal
* - SNPP VIIRS SDR data in HDF5 Compact format
- `viirs_compact`
- Nominal
* - AAPP MAIA VIIRS and AVHRR products in hdf5 format
- `maia`
- Nominal
* - VIIRS EDR Active Fires data in NetCDF4 & CSV .txt format
- `viirs_edr_active_fires`
- Beta
* - VIIRS EDR Flood data in hdf4 format
- `viirs_edr_flood`
- Beta
* - GRIB2 format
- `grib`
- Beta
* - SCMI ABI L1B format
- `abi_l1b_scmi`
- Beta
* - VIRR data in HDF5 format
- `virr_l1b`
- Beta
* - MERSI-2 L1B data in HDF5 format
- `mersi2_l1b`
- Beta
* - FY-4A AGRI L1 data in HDF5 format
- `agri_l1`
- Beta
* - Vaisala Global Lightning Dataset GLD360 data in ASCII format
- `vaisala_gld360`
- Beta
* - TROPOMI L2 data in NetCDF4 format
- `tropomi_l2`
- Beta
* - Hydrology SAF products in GRIB format
- `hsaf_grib`
- | Beta
| Only the h03, h03b, h05 and h05B products are supported at-present
* - GEO-KOMPSAT-2 AMI L1B data in NetCDF4 format
- `ami_l1b`
- Beta
* - GOES-R GLM Grided Level 2 in NetCDF4 format
- `glm_l2`
- Beta
* - Sentinel-3 SLSTR SST data in NetCDF4 format
- `ghrsst_l2`
- Beta
* - IASI level 2 SO2 in BUFR format
- `iasi_l2_so2_bufr`
- Beta
* - HY-2B Scatterometer level 2b data in HDF5 format from both EUMETSAT and NSOAS
- `hy2_scat_l2b_h5`
- Beta
* - OMPS EDR data in HDF5 format
- `omps_edr`
- Beta
* - VII Level 2 in NetCDF4 format
- `vii_l2_nc`
- Beta
* - VII Level 1b in NetCDF4 format
- `vii_l1b_nc`
- Beta
* - MTG FCI Level 2 in NetCDF4 format
- `fci_l2_nc`
- Beta
* - SMOS level 2 wind data in NetCDF4 format
- `smos_l2_wind`
- Beta
* - AMSR2 level 2 wind data in HDF5 format
- `amsr2_l2`
- Beta
* - GPM IMERG level 3 precipitation data in HDF5 format
- `gpm_imerg`
- Nominal
* - AMSR2 level 2 GAASP in NetCDF4 format
- `amsr2_l2_gaasp`
- Beta
* - MiRS level 2 Precipitation and Surface Products (IMG) in NetCDF4 format
- `mirs`
- Beta
* - MIMIC Total Precipitable Water Product Reader in NetCDF format
- mimicTPW2_comp
- Beta
* - SEADAS L2 Chlorphyll A product in HDF4 format
- seadas_l2
- Beta
* - AAPP L1C MHS format
- `aapp_mhs_l1c`
- Nominal
* - AAPP L1C AMSU-B format
- `aapp_amsub_l1c`
- Beta
* - Arctica-M (N1) MSU-GS/A data in HDF5 format
- `msu_gsa_l1b`
- Beta
.. note::

Status description:

Defunct
Most likely the reader is not functional. If it is there is a good chance of
bugs and/or performance problems (e.g. not ported to dask/xarray yet). Future
development is unclear. Users are encouraged to contribute (see section
:doc:`dev_guide/CONTRIBUTING` and/or get help on Slack or by opening a Github issue).

Alpha
This denotes early development status. Reader is functional and implements some
or all of the nominal features. There might be bugs. Exactness of results is
not be guaranteed. Use at your own risk.

Beta
This denotes final developement status. Reader is functional and implements all
nominal features. Results should be dependable but there might be bugs. Users
are actively encouraged to test and report bugs.

Nominal
This denotes a finished status. Reader is functional and most likely no new
features will be introduced. It has been tested and there are no known bugs.

Indices and tables
==================
Expand Down