You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by bh...@apache.org on 2022/06/16 18:43:15 UTC
[beam] branch master updated: Remove dataframe warnings from py38-docs logs (#21861)
This is an automated email from the ASF dual-hosted git repository.
bhulette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 079d3e9eff3 Remove dataframe warnings from py38-docs logs (#21861)
079d3e9eff3 is described below
commit 079d3e9eff391257aec4a287dea67aeb0a8df49a
Author: Brian Hulette <bh...@google.com>
AuthorDate: Thu Jun 16 11:43:08 2022 -0700
Remove dataframe warnings from py38-docs logs (#21861)
---
sdks/python/scripts/generate_pydoc.sh | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/sdks/python/scripts/generate_pydoc.sh b/sdks/python/scripts/generate_pydoc.sh
index e3f327d5270..a097caebefa 100755
--- a/sdks/python/scripts/generate_pydoc.sh
+++ b/sdks/python/scripts/generate_pydoc.sh
@@ -248,24 +248,28 @@ EOF
# Build the documentation using sphinx
# Reference: http://www.sphinx-doc.org/en/stable/man/sphinx-build.html
+# Note we cut out warnings from apache_beam.dataframe, this package uses pandas
+# documentation verbatim.
python $(type -p sphinx-build) -v -a -E -q target/docs/source \
target/docs/_build -c target/docs/source \
- -w "target/docs/sphinx-build.warnings.log"
+ |& grep -E -v 'apache_beam\.dataframe.*WARNING:' \
+ |& tee "target/docs/sphinx-build.log"
# Fail if there are errors or warnings in docs
-! grep -q "ERROR:" target/docs/sphinx-build.warnings.log || exit 1
-(! grep -v 'apache_beam.dataframe' target/docs/sphinx-build.warnings.log | grep -q "WARNING:") || exit 1
+! grep -q "ERROR:" target/docs/sphinx-build.log || exit 1
+! grep -q "WARNING:" target/docs/sphinx-build.log || exit 1
# Run tests for code samples, these can be:
# - Code blocks using '.. testsetup::', '.. testcode::' and '.. testoutput::'
# - Interactive code starting with '>>>'
python -msphinx -M doctest target/docs/source \
target/docs/_build -c target/docs/source \
- -w "target/docs/sphinx-doctest.warnings.log"
+ |& grep -E -v 'apache_beam\.dataframe.*WARNING:' \
+ |& tee "target/docs/sphinx-doctest.log"
# Fail if there are errors or warnings in docs
-! grep -q "ERROR:" target/docs/sphinx-doctest.warnings.log || exit 1
-(! grep -v 'apache_beam.dataframe' target/docs/sphinx-doctest.warnings.log | grep -q "WARNING:") || exit 1
+! grep -q "ERROR:" target/docs/sphinx-doctest.log || exit 1
+! grep -q "WARNING:" target/docs/sphinx-doctest.log || exit 1
# Message is useful only when this script is run locally. In a remote
# test environment, this path will be removed when the test completes.