Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ci: Upload doc warnings and errors as artifacts
  • Loading branch information
QuLogic committed Dec 15, 2022
commit 626d13cefd96d9434889e992fc2e73fe8ae54474
28 changes: 22 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ commands:
[ "$CIRCLE_PR_NUMBER" = "" ]; then
export RELEASE_TAG='-t release'
fi
mkdir -p logs
make html O="-T $RELEASE_TAG -j4 -w /tmp/sphinxerrorswarnings.log"
rm -r build/html/_sources
working_directory: doc
Expand All @@ -154,20 +155,35 @@ commands:
- run:
name: Extract possible build errors and warnings
command: |
(grep "WARNING\|ERROR" /tmp/sphinxerrorswarnings.log ||
echo "No errors or warnings")
(grep "WARNING\|ERROR" /tmp/sphinxerrorswarnings.log ||
echo "No errors or warnings")
# Save logs as an artifact, and convert from absolute paths to
# repository-relative paths.
sed "s~$PWD/~~" /tmp/sphinxerrorswarnings.log > \
doc/logs/sphinx-errors-warnings.log
when: always
- store_artifacts:
path: doc/logs/sphinx-errors-warnings.log

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")
(grep -rl DeprecationWarning doc/build/html/gallery ||

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it worth it to add the plot_types gallery or nah 'cause it's super specific?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied the existing warning checks, but I don't see any reason not to check plot_types as well.

echo "No deprecation warnings in gallery")
(grep -rl DeprecationWarning doc/build/html/plot_types ||
echo "No deprecation warnings in plot_types")
(grep -rl DeprecationWarning doc/build/html/tutorials ||
echo "No deprecation warnings in tutorials")
# Save deprecations that are from this absolute directory, and
# convert to repository-relative paths.
(grep -Ero --no-filename "$PWD/.+DeprecationWarning.+$" \
doc/build/html/{gallery,plot_types,tutorials} || echo) | \
sed "s~$PWD/~~" > doc/logs/sphinx-deprecations.log
when: always
- store_artifacts:
path: doc/logs/sphinx-deprecations.log

doc-bundle:
steps:
Expand Down