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

Backport PR #23868 on branch v3.6.2-doc (Show errors and warnings in doc CI after build.) #24611

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 21 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,32 @@ commands:
[ "$CIRCLE_PR_NUMBER" = "" ]; then
export RELEASE_TAG='-t release'
fi
make html O="-T $RELEASE_TAG -j4"
make html O="-T $RELEASE_TAG -j4 -w /tmp/sphinxerrorswarnings.log"
rm -r build/html/_sources
working_directory: doc
- save_cache:
key: sphinx-env-v1-{{ .BuildNum }}-{{ .Environment.CIRCLE_JOB }}
paths:
- doc/build/doctrees

doc-show-errors-warnings:
steps:
- run:
name: Extract possible build errors and warnings
command: |
(grep "WARNING\|ERROR" /tmp/sphinxerrorswarnings.log ||
echo "No errors or warnings")

doc-show-deprecations:
steps:
- run:
name: Extract possible deprecation warnings in examples and tutorials
command: |
(grep DeprecationWarning -r -l doc/build/html/gallery ||
echo "No deprecation warnings in gallery")
(grep DeprecationWarning -r -l doc/build/html/tutorials ||
echo "No deprecation warnings in tutorials")

doc-bundle:
steps:
- run:
Expand Down Expand Up @@ -186,6 +204,8 @@ jobs:
- doc-deps-install

- doc-build
- doc-show-errors-warnings
- doc-show-deprecations

- doc-bundle

Expand Down
9 changes: 4 additions & 5 deletions examples/images_contours_and_fields/pcolormesh_grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ def _annotate(ax, x, y, title):
# -----------------------------
#
# Often, however, data is provided where *X* and *Y* match the shape of *Z*.
# While this makes sense for other ``shading`` types, it is no longer permitted
# when ``shading='flat'`` (and will raise a MatplotlibDeprecationWarning as of
# Matplotlib v3.3). Historically, Matplotlib silently dropped the last row and
# column of *Z* in this case, to match Matlab's behavior. If this behavior is
# still desired, simply drop the last row and column manually:
# While this makes sense for other ``shading`` types, it is not permitted
# when ``shading='flat'``. Historically, Matplotlib silently dropped the last
# row and column of *Z* in this case, to match Matlab's behavior. If this
# behavior is still desired, simply drop the last row and column manually:

x = np.arange(ncols) # note *not* ncols + 1 as before
y = np.arange(nrows)
Expand Down
5 changes: 2 additions & 3 deletions examples/images_contours_and_fields/pcolormesh_levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@
# Often a user wants to pass *X* and *Y* with the same sizes as *Z* to
# `.axes.Axes.pcolormesh`. This is also allowed if ``shading='auto'`` is
# passed (default set by :rc:`pcolor.shading`). Pre Matplotlib 3.3,
# ``shading='flat'`` would drop the last column and row of *Z*; while that
# is still allowed for back compatibility purposes, a DeprecationWarning is
# raised. If this is really what you want, then simply drop the last row and
# ``shading='flat'`` would drop the last column and row of *Z*, but now gives
# an error. If this is really what you want, then simply drop the last row and
# column of Z manually:

x = np.arange(10) # len = 10
Expand Down