Skip to content

Commit

Permalink
FIX: Fix the failing build of the gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 committed Jan 3, 2024
1 parent 9df6896 commit ac12e3c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
- cartopy
- cvxopt
- xarray
- sphinx
- sphinx<7.2
- ipython
- pandoc
- pkg-config
Expand Down
17 changes: 10 additions & 7 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@
"sphinx.ext.napoleon",
"sphinx_copybutton",
"sphinx_gallery.gen_gallery",
"sphinx_gallery.load_style",
"sphinx_design",
"nbsphinx",
"myst_nb",
"ablog",
]

exclude_patterns = ["_build", "**.ipynb_checkpoints"]

# only include examples if the BUILD_PYART_EXAMPLES env. variable is set
extensions.append("sphinx_gallery.gen_gallery")
sphinx_gallery_conf = {"examples_dirs": "../../examples", "gallery_dirs": "examples"}
sphinx_gallery_conf = {
"examples_dirs": "../../examples",
"gallery_dirs": "examples",
"abort_on_example_error": True,
}


# Configuration options for plot_directive. See:
Expand Down Expand Up @@ -124,7 +124,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -203,7 +203,7 @@
post_auto_excerpt = 2

# Don't execute the jupyter notebooks
jupyter_execute_notebooks = "off"
nb_execution_mode = "off"

# Extra variables that will be available to the templates. Used to create the
# links to the Github repository sources and issues
Expand Down Expand Up @@ -263,6 +263,9 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)

# Make MyST generate anchors for headings
myst_heading_anchors = 2

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
Expand Down
4 changes: 2 additions & 2 deletions examples/retrieve/plot_convective_stratiform.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

######################################
# How the algorithm works
# ----------
# -----------------------
# This first section describes how the convective-stratiform algorithm works (see references for full details). This
# algorithm is a feature detection algorithm and classifies fields as "convective" or "stratiform". The algorithm is
# designed to detect features in a reflectivity field but can also detect features in fields such as rain rate or
Expand Down Expand Up @@ -446,7 +446,7 @@

######################################
# Summary of recommendations and best practices
# ----------
# ---------------------------------------------
# * Tune your parameters to your specific purpose
# * Use a rescaled field if possible (i.e. linear reflectivity, rain or snow rate)
# * Keep ``estimate_flag=True`` to see uncertainty in classification
Expand Down
9 changes: 4 additions & 5 deletions examples/retrieve/plot_feature_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

######################################
# How the algorithm works
# ----------
# -----------------------
# The feature detection algorithm works by identifying features that exceed the background value by an amount that
# varies with the background value. The algorithm is heavily customizable and is designed to work with a variety of
# datasets. Here, we show several examples of how to use the algorithm with different types of radar data.
Expand All @@ -33,7 +33,7 @@

######################################
# Part 1: Warm-season convective-stratiform classification
# ----------
# --------------------------------------------------------
# **Classification of summer convective example**
#
# Our first example classifies echo from a summer convective event.
Expand Down Expand Up @@ -397,8 +397,7 @@

######################################
# Part 2: Cool-season feature detection
# ----------
######################################
# -------------------------------------
# **Winter storm example**
#
# In this example, we will show how to algorithm can be used to detect features (snow bands) in winter storms. Here, we
Expand Down Expand Up @@ -778,7 +777,7 @@ def quick_image_mute(field, muted_ref):
plt.show()
######################################
# Summary of recommendations and best practices
# ----------
# ---------------------------------------------
# * Tune your parameters to your specific purpose
# * Use a rescaled field if possible (i.e. linear reflectivity, rain or snow rate)
# * Keep ``estimate_flag=True`` to see uncertainty in classification
Expand Down
4 changes: 2 additions & 2 deletions examples/retrieve/plot_hydrometeor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
=========================================
=============================================
Calculate and Plot hydrometeor classification
=========================================
=============================================
Calculates a hydrometeor classification and displays the results
"""
Expand Down

0 comments on commit ac12e3c

Please sign in to comment.