Skip to content

Commit

Permalink
Merge pull request #24611 from meeseeksmachine/auto-backport-of-pr-23…
Browse files Browse the repository at this point in the history
…868-on-v3.6.2-doc

Backport PR #23868 on branch v3.6.2-doc (Show errors and warnings in doc CI after build.)
  • Loading branch information
rcomer committed Dec 4, 2022
2 parents 05379ab + 6377e6e commit ba522ce
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
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

0 comments on commit ba522ce

Please sign in to comment.