Skip to content

Commit

Permalink
fixup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
troyraen committed Jun 30, 2024
1 parent 412d1b3 commit 08304ea
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
18 changes: 10 additions & 8 deletions docs/source/api-reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ pittgoogle
.. autosummary::

pittgoogle.Alert
pittgoogle.Auth
pittgoogle.Consumer
pittgoogle.ProjectIds
pittgoogle.Schemas
pittgoogle.Subscription
pittgoogle.Table
pittgoogle.Topic
.. autosummary::

pittgoogle.alert.Alert
pittgoogle.auth.Auth
pittgoogle.bigquery.Table
pittgoogle.pubsub.Consumer
pittgoogle.pubsub.Subscription
pittgoogle.pubsub.Topic
pittgoogle.registry.ProjectIds
pittgoogle.registry.Schemas
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ If you run into trouble, please
:maxdepth: 1

listings
Install<one-time-setup/install>
one-time-setup/index
faq/index
for-developers/index
Expand Down
2 changes: 1 addition & 1 deletion docs/source/one-time-setup/install.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _install:

Install pittgoogle-client
-------------------------
=========================

.. automodule:: pittgoogle

Expand Down
10 changes: 10 additions & 0 deletions pittgoogle/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class Table:
client (google.cloud.bigquery.Client, optional):
BigQuery client that will be used to access the table.
If not provided, a new client will be created the first time it is requested.
----
"""

# Strings _below_ the field will make these also show up as individual properties in rendered docs.
Expand Down Expand Up @@ -134,6 +136,10 @@ def table(self) -> google.cloud.bigquery.Table:
"""Google Cloud BigQuery Table object that is connected to the Cloud resource.
Makes a `get_table` request if necessary.
Returns:
google.cloud.bigquery.Table:
The BigQuery Table object, connected to the Cloud resource.
"""
if self._table is None:
self._table = self.client.get_table(self.id)
Expand All @@ -144,6 +150,10 @@ def client(self) -> google.cloud.bigquery.Client:
"""Google Cloud BigQuery Client used to access the table.
This will be created using :attr:`Table.auth` if necessary.
Returns:
google.cloud.bigquery.Client:
The BigQuery client instance.
"""
if self._client is None:
self._client = google.cloud.bigquery.Client(credentials=self.auth.credentials)
Expand Down

0 comments on commit 08304ea

Please sign in to comment.