Skip to content

Commit

Permalink
Merge pull request #444 from djhoese/bugfix-docs-table
Browse files Browse the repository at this point in the history
Fix the readers table in the sphinx docs so it wraps text
  • Loading branch information
djhoese authored Oct 5, 2018
2 parents 2773d36 + e26d64c commit 75e8cb8
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
13 changes: 13 additions & 0 deletions doc/source/_static/theme_overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* override table width restrictions */
@media screen and (min-width: 767px) {

.wy-table-responsive table td {
/* !important prevents the common CSS stylesheets from overriding
this as on RTD they are loaded after this stylesheet */
white-space: normal !important;
}

.wy-table-responsive {
overflow: visible !important;
}
}
8 changes: 7 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __getattr__(cls, name):

# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'default'
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -157,6 +157,12 @@ def __getattr__(cls, name):
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_context = {
'css_files': [
'_static/theme_overrides.css', # override wide tables in RTD theme
],
}

# 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
1 change: 1 addition & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ installation.

.. list-table:: SatPy Readers
:header-rows: 1
:widths: 45 25 30

* - Description
- Reader name
Expand Down
8 changes: 4 additions & 4 deletions doc/source/writers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ the specified colors.
>>> colorize(img, **kwargs)
>>> img.show()

Similarly it is possible to use discreet values without color interpolation
using `palettize()` instead of `colorize()`
Similarly it is possible to use discrete values without color interpolation
using `palettize()` instead of `colorize()`.

You can define several colormaps and ranges in the `palettes` list and they
are merged together. See trollimage_ documentation for more information how
Expand All @@ -109,9 +109,9 @@ The above example can be used in enhancements YAML config like this:
Saving multiple Scenes in one go
================================

As mentioned earlier, it is possible to save ``Scene`` datasets directly
As mentioned earlier, it is possible to save `Scene` datasets directly
using :meth:`~satpy.scene.Scene.save_datasets` method. However,
sometimes it is beneficial to collect more ``Scene``s together and process
sometimes it is beneficial to collect more `Scene`\ s together and process
and save them all at once.

::
Expand Down
2 changes: 1 addition & 1 deletion satpy/writers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def compute_writer_results(results):
Args:
results (iterable): Iterable of dask graphs resulting from calls to
`scn.save_datasets(..., compute=False)
`scn.save_datasets(..., compute=False)`
"""
if not results:
return
Expand Down

0 comments on commit 75e8cb8

Please sign in to comment.