From b66f17ee75323cd690793bec4bf9a2fe47643073 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Thu, 20 Apr 2017 09:37:25 -0700 Subject: [PATCH] Adding check that **all** setup.py README's are valid RST. Follow up to #3316. Fixes #2446. --- bigquery/nox.py | 9 +++++++++ bigtable/nox.py | 9 +++++++++ core/nox.py | 9 +++++++++ dns/nox.py | 9 +++++++++ error_reporting/nox.py | 9 +++++++++ language/nox.py | 9 +++++++++ logging/nox.py | 9 +++++++++ monitoring/nox.py | 9 +++++++++ nox.py | 9 +++++++++ pubsub/nox.py | 9 +++++++++ resource_manager/nox.py | 9 +++++++++ runtimeconfig/nox.py | 9 +++++++++ spanner/nox.py | 9 +++++++++ speech/nox.py | 9 +++++++++ storage/nox.py | 9 +++++++++ translate/nox.py | 9 +++++++++ vision/nox.py | 9 +++++++++ 17 files changed, 153 insertions(+) diff --git a/bigquery/nox.py b/bigquery/nox.py index 58b16e23dd86..27bfb7f87ac4 100644 --- a/bigquery/nox.py +++ b/bigquery/nox.py @@ -77,6 +77,15 @@ def lint(session): session.run('flake8', 'google/cloud/bigquery') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/bigtable/nox.py b/bigtable/nox.py index bded96fcbe29..bc60a19c8217 100644 --- a/bigtable/nox.py +++ b/bigtable/nox.py @@ -76,6 +76,15 @@ def lint(session): session.run('flake8', 'google/cloud/bigtable') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/core/nox.py b/core/nox.py index ba1e72f8a5f7..1b9ef352e3a5 100644 --- a/core/nox.py +++ b/core/nox.py @@ -53,6 +53,15 @@ def lint(session): session.run('flake8', 'google/cloud/core') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/dns/nox.py b/dns/nox.py index 1e5e10be32fa..0fc4850053ec 100644 --- a/dns/nox.py +++ b/dns/nox.py @@ -55,6 +55,15 @@ def lint(session): session.run('flake8', 'google/cloud/dns') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/error_reporting/nox.py b/error_reporting/nox.py index 7b455a0e32b6..746417ccd3e1 100644 --- a/error_reporting/nox.py +++ b/error_reporting/nox.py @@ -55,6 +55,15 @@ def lint(session): session.run('flake8', 'google/cloud/error_reporting') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/language/nox.py b/language/nox.py index 5f1ce1cd597d..2b4f372786ed 100644 --- a/language/nox.py +++ b/language/nox.py @@ -77,6 +77,15 @@ def lint(session): session.run('flake8', 'google/cloud/language') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/logging/nox.py b/logging/nox.py index c96ad4871a77..7f6447c56924 100644 --- a/logging/nox.py +++ b/logging/nox.py @@ -79,6 +79,15 @@ def lint(session): session.run('flake8', 'google/cloud/logging') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/monitoring/nox.py b/monitoring/nox.py index b9d48d7814dc..ad69f1c610b3 100644 --- a/monitoring/nox.py +++ b/monitoring/nox.py @@ -77,6 +77,15 @@ def lint(session): session.run('flake8', 'google/cloud/monitoring') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/nox.py b/nox.py index 3cdcce56244c..0496492572f9 100644 --- a/nox.py +++ b/nox.py @@ -37,3 +37,12 @@ def docs(session): # Build the docs! session.run('bash', './test_utils/scripts/update_docs.sh') + + +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') diff --git a/pubsub/nox.py b/pubsub/nox.py index c9300982d6b8..209ed41f9bfc 100644 --- a/pubsub/nox.py +++ b/pubsub/nox.py @@ -77,6 +77,15 @@ def lint(session): session.run('flake8', 'google/cloud/pubsub') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/resource_manager/nox.py b/resource_manager/nox.py index d8851ec4bc32..8a5cb2f6fa5e 100644 --- a/resource_manager/nox.py +++ b/resource_manager/nox.py @@ -55,6 +55,15 @@ def lint(session): session.run('flake8', 'google/cloud/resource_manager') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/runtimeconfig/nox.py b/runtimeconfig/nox.py index e84c6fa39ea4..3d228059a8d0 100644 --- a/runtimeconfig/nox.py +++ b/runtimeconfig/nox.py @@ -55,6 +55,15 @@ def lint(session): session.run('flake8', 'google/cloud/runtimeconfig') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/spanner/nox.py b/spanner/nox.py index ebe45f2f39bf..f1f3240e36e2 100644 --- a/spanner/nox.py +++ b/spanner/nox.py @@ -77,6 +77,15 @@ def lint(session): session.run('flake8', 'google/cloud/spanner') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/speech/nox.py b/speech/nox.py index ed7a7e85997c..272a60231491 100644 --- a/speech/nox.py +++ b/speech/nox.py @@ -77,6 +77,15 @@ def lint(session): session.run('flake8', 'google/cloud/speech') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/storage/nox.py b/storage/nox.py index 00a8b641897b..4ad6d34cb3b6 100644 --- a/storage/nox.py +++ b/storage/nox.py @@ -77,6 +77,15 @@ def lint(session): session.run('flake8', 'google/cloud/storage') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/translate/nox.py b/translate/nox.py index 43d3622a6562..43fb3612de2a 100644 --- a/translate/nox.py +++ b/translate/nox.py @@ -77,6 +77,15 @@ def lint(session): session.run('flake8', 'google/cloud/translate') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report. diff --git a/vision/nox.py b/vision/nox.py index d8f4cd8cb4f6..0008296bdbe3 100644 --- a/vision/nox.py +++ b/vision/nox.py @@ -77,6 +77,15 @@ def lint(session): session.run('flake8', 'google/cloud/vision') +@nox.session +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.interpreter = 'python3.6' + session.install('docutils', 'Pygments') + session.run( + 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + + @nox.session def cover(session): """Run the final coverage report.