Skip to content

Commit eff2456

Browse files
committed
Show errors and warnings as well as deprecation warnings in doc CI after build.
1 parent 06660ef commit eff2456

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

.circleci/config.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,28 @@ commands:
141141
[ "$CIRCLE_PR_NUMBER" = "" ]; then
142142
export RELEASE_TAG='-t release'
143143
fi
144-
make html O="-T $RELEASE_TAG -j4"
144+
make html O="-T $RELEASE_TAG -j4 -w /tmp/sphinxerrorswarnings.log"
145145
rm -r build/html/_sources
146146
working_directory: doc
147147
- save_cache:
148148
key: sphinx-env-v1-{{ .BuildNum }}-{{ .Environment.CIRCLE_JOB }}
149149
paths:
150150
- doc/build/doctrees
151151

152+
doc-show-errors-warnings:
153+
steps:
154+
- run:
155+
(grep "WARNING\|ERROR" /tmp/sphinxerrorswarnings.log ||
156+
echo "No errors or warnings")
157+
158+
doc-show-deprecations:
159+
steps:
160+
- run:
161+
(grep DeprecationWarning -r -l doc/build/html/gallery ||
162+
echo "No deprecation warnings in gallery")
163+
(grep DeprecationWarning -r -l doc/build/html/tutorials ||
164+
echo "No deprecation warnings in tutorials")
165+
152166
doc-bundle:
153167
steps:
154168
- run:
@@ -186,6 +200,8 @@ jobs:
186200
- doc-deps-install
187201

188202
- doc-build
203+
- doc-show-errors-warnings
204+
- doc-show-deprecations
189205

190206
- doc-bundle
191207

examples/images_contours_and_fields/pcolormesh_grids.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ def _annotate(ax, x, y, title):
5454
# -----------------------------
5555
#
5656
# Often, however, data is provided where *X* and *Y* match the shape of *Z*.
57-
# While this makes sense for other ``shading`` types, it is no longer permitted
58-
# when ``shading='flat'`` (and will raise a MatplotlibDeprecationWarning as of
59-
# Matplotlib v3.3). Historically, Matplotlib silently dropped the last row and
60-
# column of *Z* in this case, to match Matlab's behavior. If this behavior is
61-
# still desired, simply drop the last row and column manually:
57+
# While this makes sense for other ``shading`` types, it is not permitted
58+
# when ``shading='flat'``. Historically, Matplotlib silently dropped the last
59+
# row and column of *Z* in this case, to match Matlab's behavior. If this
60+
# behavior is still desired, simply drop the last row and column manually:
6261

6362
x = np.arange(ncols) # note *not* ncols + 1 as before
6463
y = np.arange(nrows)

examples/images_contours_and_fields/pcolormesh_levels.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@
5252
# Often a user wants to pass *X* and *Y* with the same sizes as *Z* to
5353
# `.axes.Axes.pcolormesh`. This is also allowed if ``shading='auto'`` is
5454
# passed (default set by :rc:`pcolor.shading`). Pre Matplotlib 3.3,
55-
# ``shading='flat'`` would drop the last column and row of *Z*; while that
56-
# is still allowed for back compatibility purposes, a DeprecationWarning is
57-
# raised. If this is really what you want, then simply drop the last row and
55+
# ``shading='flat'`` would drop the last column and row of *Z*, but now gives
56+
# an error. If this is really what you want, then simply drop the last row and
5857
# column of Z manually:
5958

6059
x = np.arange(10) # len = 10

0 commit comments

Comments
 (0)