Skip to content

Commit 8a950b4

Browse files
authored
Adding check that **all** setup.py README's are valid RST. (googleapis#3318)
* Adding check that **all** setup.py README's are valid RST. Follow up to googleapis#3316. Fixes googleapis#2446. * Fixing duplicate reference in Logging README. * Fixing duplicate reference in Monitoring README.
1 parent 5d99380 commit 8a950b4

File tree

19 files changed

+153
-2
lines changed

19 files changed

+153
-2
lines changed

bigquery/nox.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ def lint(session):
7777
session.run('flake8', 'google/cloud/bigquery')
7878

7979

80+
@nox.session
81+
def lint_setup_py(session):
82+
"""Verify that setup.py is valid (including RST check)."""
83+
session.interpreter = 'python3.6'
84+
session.install('docutils', 'Pygments')
85+
session.run(
86+
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
87+
88+
8089
@nox.session
8190
def cover(session):
8291
"""Run the final coverage report.

bigtable/nox.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ def lint(session):
7676
session.run('flake8', 'google/cloud/bigtable')
7777

7878

79+
@nox.session
80+
def lint_setup_py(session):
81+
"""Verify that setup.py is valid (including RST check)."""
82+
session.interpreter = 'python3.6'
83+
session.install('docutils', 'Pygments')
84+
session.run(
85+
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
86+
87+
7988
@nox.session
8089
def cover(session):
8190
"""Run the final coverage report.

core/nox.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ def lint(session):
5353
session.run('flake8', 'google/cloud/core')
5454

5555

56+
@nox.session
57+
def lint_setup_py(session):
58+
"""Verify that setup.py is valid (including RST check)."""
59+
session.interpreter = 'python3.6'
60+
session.install('docutils', 'Pygments')
61+
session.run(
62+
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
63+
64+
5665
@nox.session
5766
def cover(session):
5867
"""Run the final coverage report.

dns/nox.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ def lint(session):
5555
session.run('flake8', 'google/cloud/dns')
5656

5757

58+
@nox.session
59+
def lint_setup_py(session):
60+
"""Verify that setup.py is valid (including RST check)."""
61+
session.interpreter = 'python3.6'
62+
session.install('docutils', 'Pygments')
63+
session.run(
64+
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
65+
66+
5867
@nox.session
5968
def cover(session):
6069
"""Run the final coverage report.

error_reporting/nox.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ def lint(session):
5555
session.run('flake8', 'google/cloud/error_reporting')
5656

5757

58+
@nox.session
59+
def lint_setup_py(session):
60+
"""Verify that setup.py is valid (including RST check)."""
61+
session.interpreter = 'python3.6'
62+
session.install('docutils', 'Pygments')
63+
session.run(
64+
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
65+
66+
5867
@nox.session
5968
def cover(session):
6069
"""Run the final coverage report.

language/nox.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ def lint(session):
7777
session.run('flake8', 'google/cloud/language')
7878

7979

80+
@nox.session
81+
def lint_setup_py(session):
82+
"""Verify that setup.py is valid (including RST check)."""
83+
session.interpreter = 'python3.6'
84+
session.install('docutils', 'Pygments')
85+
session.run(
86+
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
87+
88+
8089
@nox.session
8190
def cover(session):
8291
"""Run the final coverage report.

logging/README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Using the API
3535
`Stackdriver Logging`_ API (`Logging API docs`_) allows you to store, search,
3636
analyze, monitor, and alert on log data and events from Google Cloud Platform.
3737

38-
.. _Stackdriver Logging: https://cloud.google.com/logging/
3938
.. _Logging API docs: https://cloud.google.com/logging/docs/
4039

4140
.. code:: python

logging/nox.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ def lint(session):
7979
session.run('flake8', 'google/cloud/logging')
8080

8181

82+
@nox.session
83+
def lint_setup_py(session):
84+
"""Verify that setup.py is valid (including RST check)."""
85+
session.interpreter = 'python3.6'
86+
session.install('docutils', 'Pygments')
87+
session.run(
88+
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
89+
90+
8291
@nox.session
8392
def cover(session):
8493
"""Run the final coverage report.

monitoring/README.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ insights via dashboards, charts, and alerts.
4242
This package currently supports all Monitoring API operations other than
4343
writing custom metrics.
4444

45-
.. _Stackdriver Monitoring: https://cloud.google.com/monitoring/
4645
.. _Monitoring API docs: https://cloud.google.com/monitoring/api/ref_v3/rest/
4746

4847
List available metric types:

monitoring/nox.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ def lint(session):
7777
session.run('flake8', 'google/cloud/monitoring')
7878

7979

80+
@nox.session
81+
def lint_setup_py(session):
82+
"""Verify that setup.py is valid (including RST check)."""
83+
session.interpreter = 'python3.6'
84+
session.install('docutils', 'Pygments')
85+
session.run(
86+
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
87+
88+
8089
@nox.session
8190
def cover(session):
8291
"""Run the final coverage report.

0 commit comments

Comments
 (0)