Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 4979c9e

Browse files
committed
chore: add doctest: +SKIP
1 parent 6834736 commit 4979c9e

File tree

5 files changed

+51
-51
lines changed

5 files changed

+51
-51
lines changed

bigframes/_config/bigquery_options.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def application_name(self) -> Optional[str]:
130130
**Examples:**
131131
132132
>>> import bigframes.pandas as bpd
133-
>>> bpd.options.bigquery.application_name = "my-app/1.0.0"
133+
>>> bpd.options.bigquery.application_name = "my-app/1.0.0" # doctest: +SKIP
134134
135135
Returns:
136136
None or str:
@@ -154,8 +154,8 @@ def credentials(self) -> Optional[google.auth.credentials.Credentials]:
154154
155155
>>> import bigframes.pandas as bpd
156156
>>> import google.auth
157-
>>> credentials, project = google.auth.default()
158-
>>> bpd.options.bigquery.credentials = credentials
157+
>>> credentials, project = google.auth.default() # doctest: +SKIP
158+
>>> bpd.options.bigquery.credentials = credentials # doctest: +SKIP
159159
160160
Returns:
161161
None or google.auth.credentials.Credentials:
@@ -178,7 +178,7 @@ def location(self) -> Optional[str]:
178178
**Examples:**
179179
180180
>>> import bigframes.pandas as bpd
181-
>>> bpd.options.bigquery.location = "US"
181+
>>> bpd.options.bigquery.location = "US" # doctest: +SKIP
182182
183183
Returns:
184184
None or str:
@@ -199,7 +199,7 @@ def project(self) -> Optional[str]:
199199
**Examples:**
200200
201201
>>> import bigframes.pandas as bpd
202-
>>> bpd.options.bigquery.project = "my-project"
202+
>>> bpd.options.bigquery.project = "my-project" # doctest: +SKIP
203203
204204
Returns:
205205
None or str:
@@ -231,7 +231,7 @@ def bq_connection(self) -> Optional[str]:
231231
**Examples:**
232232
233233
>>> import bigframes.pandas as bpd
234-
>>> bpd.options.bigquery.bq_connection = "my-project.us.my-connection"
234+
>>> bpd.options.bigquery.bq_connection = "my-project.us.my-connection" # doctest: +SKIP
235235
236236
Returns:
237237
None or str:
@@ -258,7 +258,7 @@ def skip_bq_connection_check(self) -> bool:
258258
**Examples:**
259259
260260
>>> import bigframes.pandas as bpd
261-
>>> bpd.options.bigquery.skip_bq_connection_check = True
261+
>>> bpd.options.bigquery.skip_bq_connection_check = True # doctest: +SKIP
262262
263263
Returns:
264264
bool:
@@ -335,8 +335,8 @@ def use_regional_endpoints(self) -> bool:
335335
**Examples:**
336336
337337
>>> import bigframes.pandas as bpd
338-
>>> bpd.options.bigquery.location = "europe-west3"
339-
>>> bpd.options.bigquery.use_regional_endpoints = True
338+
>>> bpd.options.bigquery.location = "europe-west3" # doctest: +SKIP
339+
>>> bpd.options.bigquery.use_regional_endpoints = True # doctest: +SKIP
340340
341341
Returns:
342342
bool:
@@ -380,7 +380,7 @@ def kms_key_name(self) -> Optional[str]:
380380
**Examples:**
381381
382382
>>> import bigframes.pandas as bpd
383-
>>> bpd.options.bigquery.kms_key_name = "projects/my-project/locations/us/keyRings/my-ring/cryptoKeys/my-key"
383+
>>> bpd.options.bigquery.kms_key_name = "projects/my-project/locations/us/keyRings/my-ring/cryptoKeys/my-key" # doctest: +SKIP
384384
385385
Returns:
386386
None or str:
@@ -402,7 +402,7 @@ def ordering_mode(self) -> Literal["strict", "partial"]:
402402
**Examples:**
403403
404404
>>> import bigframes.pandas as bpd
405-
>>> bpd.options.bigquery.ordering_mode = "partial"
405+
>>> bpd.options.bigquery.ordering_mode = "partial" # doctest: +SKIP
406406
407407
Returns:
408408
Literal:
@@ -485,7 +485,7 @@ def enable_polars_execution(self) -> bool:
485485
**Examples:**
486486
487487
>>> import bigframes.pandas as bpd
488-
>>> bpd.options.bigquery.enable_polars_execution = True
488+
>>> bpd.options.bigquery.enable_polars_execution = True # doctest: +SKIP
489489
490490
"""
491491
return self._enable_polars_execution

bigframes/_config/compute_options.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,30 @@ class ComputeOptions:
2828
>>> import bigframes.pandas as bpd
2929
>>> df = bpd.read_gbq("bigquery-public-data.ml_datasets.penguins")
3030
31-
>>> bpd.options.compute.maximum_bytes_billed = 500
31+
>>> bpd.options.compute.maximum_bytes_billed = 500 # doctest: +SKIP
3232
>>> df.to_pandas() # this should fail # doctest: +SKIP
3333
google.api_core.exceptions.InternalServerError: 500 Query exceeded limit for bytes billed: 500. 10485760 or higher required.
3434
35-
>>> bpd.options.compute.maximum_bytes_billed = None # reset option
35+
>>> bpd.options.compute.maximum_bytes_billed = None # reset option # doctest: +SKIP
3636
3737
To add multiple extra labels to a query configuration, use the `assign_extra_query_labels`
3838
method with keyword arguments:
3939
40-
>>> bpd.options.compute.assign_extra_query_labels(test1=1, test2="abc")
41-
>>> bpd.options.compute.extra_query_labels
40+
>>> bpd.options.compute.assign_extra_query_labels(test1=1, test2="abc") # doctest: +SKIP
41+
>>> bpd.options.compute.extra_query_labels # doctest: +SKIP
4242
{'test1': 1, 'test2': 'abc'}
4343
4444
Alternatively, you can add labels individually by directly accessing the `extra_query_labels`
4545
dictionary:
4646
47-
>>> bpd.options.compute.extra_query_labels["test3"] = False
48-
>>> bpd.options.compute.extra_query_labels
47+
>>> bpd.options.compute.extra_query_labels["test3"] = False # doctest: +SKIP
48+
>>> bpd.options.compute.extra_query_labels # doctest: +SKIP
4949
{'test1': 1, 'test2': 'abc', 'test3': False}
5050
5151
To remove a label from the configuration, use the `del` keyword on the desired label key:
5252
53-
>>> del bpd.options.compute.extra_query_labels["test1"]
54-
>>> bpd.options.compute.extra_query_labels
53+
>>> del bpd.options.compute.extra_query_labels["test1"] # doctest: +SKIP
54+
>>> bpd.options.compute.extra_query_labels # doctest: +SKIP
5555
{'test2': 'abc', 'test3': False}
5656
"""
5757

@@ -66,7 +66,7 @@ class ComputeOptions:
6666
**Examples:**
6767
6868
>>> import bigframes.pandas as bpd
69-
>>> bpd.options.compute.ai_ops_confirmation_threshold = 100
69+
>>> bpd.options.compute.ai_ops_confirmation_threshold = 100 # doctest: +SKIP
7070
7171
Returns:
7272
Optional[int]: Number of rows.
@@ -81,7 +81,7 @@ class ComputeOptions:
8181
**Examples:**
8282
8383
>>> import bigframes.pandas as bpd
84-
>>> bpd.options.compute.ai_ops_threshold_autofail = True
84+
>>> bpd.options.compute.ai_ops_threshold_autofail = True # doctest: +SKIP
8585
8686
Returns:
8787
bool: True if the guard is enabled.
@@ -98,7 +98,7 @@ class ComputeOptions:
9898
**Examples:**
9999
100100
>>> import bigframes.pandas as bpd
101-
>>> bpd.options.compute.allow_large_results = True
101+
>>> bpd.options.compute.allow_large_results = True # doctest: +SKIP
102102
103103
Returns:
104104
bool | None: True if results > 10 GB are enabled.
@@ -114,7 +114,7 @@ class ComputeOptions:
114114
**Examples:**
115115
116116
>>> import bigframes.pandas as bpd
117-
>>> bpd.options.compute.enable_multi_query_execution = True
117+
>>> bpd.options.compute.enable_multi_query_execution = True # doctest: +SKIP
118118
119119
Returns:
120120
bool | None: True if enabled.
@@ -142,7 +142,7 @@ class ComputeOptions:
142142
**Examples:**
143143
144144
>>> import bigframes.pandas as bpd
145-
>>> bpd.options.compute.maximum_bytes_billed = 1000
145+
>>> bpd.options.compute.maximum_bytes_billed = 1000 # doctest: +SKIP
146146
147147
Returns:
148148
int | None: Number of bytes, if set.
@@ -162,7 +162,7 @@ class ComputeOptions:
162162
**Examples:**
163163
164164
>>> import bigframes.pandas as bpd
165-
>>> bpd.options.compute.maximum_result_rows = 1000
165+
>>> bpd.options.compute.maximum_result_rows = 1000 # doctest: +SKIP
166166
167167
Returns:
168168
int | None: Number of rows, if set.

bigframes/_config/experiment_options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def semantic_operators(self) -> bool:
3636
**Examples:**
3737
3838
>>> import bigframes.pandas as bpd
39-
>>> bpd.options.experiments.semantic_operators = True
39+
>>> bpd.options.experiments.semantic_operators = True # doctest: +SKIP
4040
"""
4141
return self._semantic_operators
4242

@@ -56,7 +56,7 @@ def ai_operators(self) -> bool:
5656
**Examples:**
5757
5858
>>> import bigframes.pandas as bpd
59-
>>> bpd.options.experiments.ai_operators = True
59+
>>> bpd.options.experiments.ai_operators = True # doctest: +SKIP
6060
"""
6161
return self._ai_operators
6262

bigframes/_config/sampling_options.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SamplingOptions:
3535
**Examples:**
3636
3737
>>> import bigframes.pandas as bpd
38-
>>> bpd.options.sampling.max_download_size = 1000
38+
>>> bpd.options.sampling.max_download_size = 1000 # doctest: +SKIP
3939
"""
4040

4141
enable_downsampling: bool = False
@@ -49,7 +49,7 @@ class SamplingOptions:
4949
**Examples:**
5050
5151
>>> import bigframes.pandas as bpd
52-
>>> bpd.options.sampling.enable_downsampling = True
52+
>>> bpd.options.sampling.enable_downsampling = True # doctest: +SKIP
5353
"""
5454

5555
sampling_method: Literal["head", "uniform"] = "uniform"
@@ -64,7 +64,7 @@ class SamplingOptions:
6464
**Examples:**
6565
6666
>>> import bigframes.pandas as bpd
67-
>>> bpd.options.sampling.sampling_method = "head"
67+
>>> bpd.options.sampling.sampling_method = "head" # doctest: +SKIP
6868
"""
6969

7070
random_state: Optional[int] = None
@@ -77,7 +77,7 @@ class SamplingOptions:
7777
**Examples:**
7878
7979
>>> import bigframes.pandas as bpd
80-
>>> bpd.options.sampling.random_state = 42
80+
>>> bpd.options.sampling.random_state = 42 # doctest: +SKIP
8181
"""
8282

8383
def with_max_download_size(self, max_rows: Optional[int]) -> SamplingOptions:

third_party/bigframes_vendored/pandas/core/config_init.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ class DisplayOptions:
2929
>>> import bigframes.pandas as bpd
3030
>>> df = bpd.read_gbq("bigquery-public-data.ml_datasets.penguins")
3131
32-
>>> bpd.options.display.repr_mode = "deferred"
33-
>>> df.head(20) # will no longer run the job
32+
>>> bpd.options.display.repr_mode = "deferred" # doctest: +SKIP
33+
>>> df.head(20) # will no longer run the job # doctest: +SKIP
3434
Computation deferred. Computation will process 28.9 kB
3535
3636
Users can also get a dry run of the job by accessing the query_job property before they've run the job. This will return a dry run instance of the job they can inspect.
3737
38-
>>> df.query_job.total_bytes_processed
38+
>>> df.query_job.total_bytes_processed # doctest: +SKIP
3939
28947
4040
4141
User can execute the job by calling .to_pandas()
@@ -44,21 +44,21 @@ class DisplayOptions:
4444
4545
Reset repr_mode option
4646
47-
>>> bpd.options.display.repr_mode = "head"
47+
>>> bpd.options.display.repr_mode = "head" # doctest: +SKIP
4848
4949
Can also set the progress_bar option to see the progress bar in terminal,
5050
51-
>>> bpd.options.display.progress_bar = "terminal"
51+
>>> bpd.options.display.progress_bar = "terminal" # doctest: +SKIP
5252
5353
notebook,
5454
55-
>>> bpd.options.display.progress_bar = "notebook"
55+
>>> bpd.options.display.progress_bar = "notebook" # doctest: +SKIP
5656
5757
or just remove it.
5858
5959
Setting to default value "auto" will detect and show progress bar automatically.
6060
61-
>>> bpd.options.display.progress_bar = "auto"
61+
>>> bpd.options.display.progress_bar = "auto" # doctest: +SKIP
6262
"""
6363

6464
# Options borrowed from pandas.
@@ -71,7 +71,7 @@ class DisplayOptions:
7171
**Examples:**
7272
7373
>>> import bigframes.pandas as bpd
74-
>>> bpd.options.display.max_columns = 50
74+
>>> bpd.options.display.max_columns = 50 # doctest: +SKIP
7575
"""
7676

7777
max_rows: int = 10
@@ -83,7 +83,7 @@ class DisplayOptions:
8383
**Examples:**
8484
8585
>>> import bigframes.pandas as bpd
86-
>>> bpd.options.display.max_rows = 50
86+
>>> bpd.options.display.max_rows = 50 # doctest: +SKIP
8787
"""
8888

8989
precision: int = 6
@@ -95,7 +95,7 @@ class DisplayOptions:
9595
**Examples:**
9696
9797
>>> import bigframes.pandas as bpd
98-
>>> bpd.options.display.precision = 2
98+
>>> bpd.options.display.precision = 2 # doctest: +SKIP
9999
"""
100100

101101
# Options unique to BigQuery DataFrames.
@@ -109,7 +109,7 @@ class DisplayOptions:
109109
**Examples:**
110110
111111
>>> import bigframes.pandas as bpd
112-
>>> bpd.options.display.progress_bar = "terminal"
112+
>>> bpd.options.display.progress_bar = "terminal" # doctest: +SKIP
113113
"""
114114

115115
repr_mode: Literal["head", "deferred", "anywidget"] = "head"
@@ -129,7 +129,7 @@ class DisplayOptions:
129129
**Examples:**
130130
131131
>>> import bigframes.pandas as bpd
132-
>>> bpd.options.display.repr_mode = "deferred"
132+
>>> bpd.options.display.repr_mode = "deferred" # doctest: +SKIP
133133
"""
134134

135135
max_colwidth: Optional[int] = 50
@@ -142,7 +142,7 @@ class DisplayOptions:
142142
**Examples:**
143143
144144
>>> import bigframes.pandas as bpd
145-
>>> bpd.options.display.max_colwidth = 20
145+
>>> bpd.options.display.max_colwidth = 20 # doctest: +SKIP
146146
"""
147147

148148
max_info_columns: int = 100
@@ -153,7 +153,7 @@ class DisplayOptions:
153153
**Examples:**
154154
155155
>>> import bigframes.pandas as bpd
156-
>>> bpd.options.display.max_info_columns = 50
156+
>>> bpd.options.display.max_info_columns = 50 # doctest: +SKIP
157157
"""
158158

159159
max_info_rows: Optional[int] = 200_000
@@ -169,7 +169,7 @@ class DisplayOptions:
169169
**Examples:**
170170
171171
>>> import bigframes.pandas as bpd
172-
>>> bpd.options.display.max_info_rows = 100
172+
>>> bpd.options.display.max_info_rows = 100 # doctest: +SKIP
173173
"""
174174

175175
memory_usage: bool = True
@@ -182,7 +182,7 @@ class DisplayOptions:
182182
**Examples:**
183183
184184
>>> import bigframes.pandas as bpd
185-
>>> bpd.options.display.memory_usage = False
185+
>>> bpd.options.display.memory_usage = False # doctest: +SKIP
186186
"""
187187

188188
blob_display: bool = True
@@ -193,7 +193,7 @@ class DisplayOptions:
193193
**Examples:**
194194
195195
>>> import bigframes.pandas as bpd
196-
>>> bpd.options.display.blob_display = True
196+
>>> bpd.options.display.blob_display = True # doctest: +SKIP
197197
"""
198198

199199
blob_display_width: Optional[int] = None
@@ -203,7 +203,7 @@ class DisplayOptions:
203203
**Examples:**
204204
205205
>>> import bigframes.pandas as bpd
206-
>>> bpd.options.display.blob_display_width = 100
206+
>>> bpd.options.display.blob_display_width = 100 # doctest: +SKIP
207207
"""
208208
blob_display_height: Optional[int] = None
209209
"""
@@ -212,5 +212,5 @@ class DisplayOptions:
212212
**Examples:**
213213
214214
>>> import bigframes.pandas as bpd
215-
>>> bpd.options.display.blob_display_height = 100
215+
>>> bpd.options.display.blob_display_height = 100 # doctest: +SKIP
216216
"""

0 commit comments

Comments
 (0)