Skip to content

Commit 275712f

Browse files
authored
docs: clean up docs and let the nox pass (#24)
* docs: clean up docs and let the nox pass * update the commit * clean up the README.rst to pass lint_setup_py * Trigger Build * address comments
1 parent dfc64b8 commit 275712f

12 files changed

+8
-819
lines changed

README.rst

+4-61
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Python Client for Google BigQuery
2-
=================================
1+
IPython Magics for BigQuery
2+
===========================
33

44
|GA| |pypi| |versions|
55

@@ -70,7 +70,7 @@ Mac/Linux
7070
pip install virtualenv
7171
virtualenv <your-env>
7272
source <your-env>/bin/activate
73-
<your-env>/bin/pip install google-cloud-bigquery
73+
<your-env>/bin/pip install bigquery-magics
7474
7575
7676
Windows
@@ -81,61 +81,4 @@ Windows
8181
pip install virtualenv
8282
virtualenv <your-env>
8383
<your-env>\Scripts\activate
84-
<your-env>\Scripts\pip.exe install google-cloud-bigquery
85-
86-
Example Usage
87-
-------------
88-
89-
Perform a query
90-
~~~~~~~~~~~~~~~
91-
92-
.. code:: python
93-
94-
from google.cloud import bigquery
95-
96-
client = bigquery.Client()
97-
98-
# Perform a query.
99-
QUERY = (
100-
'SELECT name FROM `bigquery-public-data.usa_names.usa_1910_2013` '
101-
'WHERE state = "TX" '
102-
'LIMIT 100')
103-
query_job = client.query(QUERY) # API request
104-
rows = query_job.result() # Waits for query to finish
105-
106-
for row in rows:
107-
print(row.name)
108-
109-
Instrumenting With OpenTelemetry
110-
--------------------------------
111-
112-
This application uses `OpenTelemetry`_ to output tracing data from
113-
API calls to BigQuery. To enable OpenTelemetry tracing in
114-
the BigQuery client the following PyPI packages need to be installed:
115-
116-
.. _OpenTelemetry: https://opentelemetry.io
117-
118-
.. code-block:: console
119-
120-
pip install google-cloud-bigquery[opentelemetry] opentelemetry-exporter-gcp-trace
121-
122-
After installation, OpenTelemetry can be used in the BigQuery
123-
client and in BigQuery jobs. First, however, an exporter must be
124-
specified for where the trace data will be outputted to. An
125-
example of this can be found here:
126-
127-
.. code-block:: python
128-
129-
from opentelemetry import trace
130-
from opentelemetry.sdk.trace import TracerProvider
131-
from opentelemetry.sdk.trace.export import BatchSpanProcessor
132-
from opentelemetry.exporter.cloud_trace import CloudTraceSpanExporter
133-
tracer_provider = TracerProvider()
134-
tracer_provider = BatchSpanProcessor(CloudTraceSpanExporter())
135-
trace.set_tracer_provider(TracerProvider())
136-
137-
In this example all tracing data will be published to the Google
138-
`Cloud Trace`_ console. For more information on OpenTelemetry, please consult the `OpenTelemetry documentation`_.
139-
140-
.. _OpenTelemetry documentation: https://opentelemetry-python.readthedocs.io
141-
.. _Cloud Trace: https://cloud.google.com/trace
84+
<your-env>\Scripts\pip.exe install bigquery-magics

docs/bigquery/legacy_proto_types.rst

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Legacy proto-based Types for Google Cloud Bigquery v2 API
66
anymore. They might also differ from the types uspported on the backend. It is
77
therefore strongly advised to migrate to the types found in :doc:`standard_sql`.
88

9-
Also see the :doc:`3.0.0 Migration Guide<../UPGRADING>` for more information.
10-
119
.. automodule:: google.cloud.bigquery_v2.types
1210
:members:
1311
:undoc-members:

docs/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ More Examples
1515
.. toctree::
1616
:maxdepth: 2
1717

18-
usage/index
19-
Official Google BigQuery How-to Guides <https://cloud.google.com/bigquery/docs/how-to>
18+
magics
19+
Official Google BigQuery Magics Tutorials <https://cloud.google.com/bigquery/docs/visualize-jupyter>
2020

2121
API Reference
2222
-------------

docs/magics.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Code Samples
1515

1616
Running a query:
1717

18-
.. literalinclude:: ./samples/snippets/query.py
18+
.. literalinclude:: ../samples/snippets/query.py
1919
:dedent: 4
2020
:start-after: [START bigquery_jupyter_query]
2121
:end-before: [END bigquery_jupyter_query]
2222

2323
Running a parameterized query:
2424

25-
.. literalinclude:: ./samples/snippets/query_params_scalars.py
25+
.. literalinclude:: ../samples/snippets/query_params_scalars.py
2626
:dedent: 4
2727
:start-after: [START bigquery_jupyter_query_params_scalars]
2828
:end-before: [END bigquery_jupyter_query_params_scalars]

docs/usage/client.rst

-25
This file was deleted.

docs/usage/datasets.rst

-131
This file was deleted.

docs/usage/encryption.rst

-52
This file was deleted.

docs/usage/index.rst

-35
This file was deleted.

docs/usage/jobs.rst

-21
This file was deleted.

0 commit comments

Comments
 (0)