Skip to content

Commit 5b60505

Browse files
committed
revert doctest changes
1 parent f7a017a commit 5b60505

File tree

43 files changed

+1370
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1370
-149
lines changed

bigframes/bigquery/_operations/ai.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ def generate(
5252
5353
>>> import bigframes.pandas as bpd
5454
>>> import bigframes.bigquery as bbq
55+
>>> bpd.options.display.progress_bar = None
5556
>>> country = bpd.Series(["Japan", "Canada"])
56-
>>> bbq.ai.generate(("What's the capital city of ", country, " one word only")) # doctest: +SKIP
57+
>>> bbq.ai.generate(("What's the capital city of ", country, " one word only"))
5758
0 {'result': 'Tokyo\\n', 'full_response': '{"cand...
5859
1 {'result': 'Ottawa\\n', 'full_response': '{"can...
5960
dtype: struct<result: string, full_response: extension<dbjson<JSONArrowType>>, status: string>[pyarrow]
6061
61-
>>> bbq.ai.generate(("What's the capital city of ", country, " one word only")).struct.field("result") # doctest: +SKIP
62+
>>> bbq.ai.generate(("What's the capital city of ", country, " one word only")).struct.field("result")
6263
0 Tokyo\\n
6364
1 Ottawa\\n
6465
Name: result, dtype: string
@@ -146,6 +147,7 @@ def generate_bool(
146147
147148
>>> import bigframes.pandas as bpd
148149
>>> import bigframes.bigquery as bbq
150+
>>> bpd.options.display.progress_bar = None
149151
>>> df = bpd.DataFrame({
150152
... "col_1": ["apple", "bear", "pear"],
151153
... "col_2": ["fruit", "animal", "animal"]
@@ -223,6 +225,7 @@ def generate_int(
223225
224226
>>> import bigframes.pandas as bpd
225227
>>> import bigframes.bigquery as bbq
228+
>>> bpd.options.display.progress_bar = None
226229
>>> animal = bpd.Series(["Kangaroo", "Rabbit", "Spider"])
227230
>>> bbq.ai.generate_int(("How many legs does a ", animal, " have?"))
228231
0 {'result': 2, 'full_response': '{"candidates":...
@@ -297,6 +300,7 @@ def generate_double(
297300
298301
>>> import bigframes.pandas as bpd
299302
>>> import bigframes.bigquery as bbq
303+
>>> bpd.options.display.progress_bar = None
300304
>>> animal = bpd.Series(["Kangaroo", "Rabbit", "Spider"])
301305
>>> bbq.ai.generate_double(("How many legs does a ", animal, " have?"))
302306
0 {'result': 2.0, 'full_response': '{"candidates...
@@ -368,6 +372,7 @@ def if_(
368372
**Examples:**
369373
>>> import bigframes.pandas as bpd
370374
>>> import bigframes.bigquery as bbq
375+
>>> bpd.options.display.progress_bar = None
371376
>>> us_state = bpd.Series(["Massachusetts", "Illinois", "Hawaii"])
372377
>>> bbq.ai.if_((us_state, " has a city called Springfield"))
373378
0 True
@@ -417,6 +422,7 @@ def classify(
417422
418423
>>> import bigframes.pandas as bpd
419424
>>> import bigframes.bigquery as bbq
425+
>>> bpd.options.display.progress_bar = None
420426
>>> df = bpd.DataFrame({'creature': ['Cat', 'Salmon']})
421427
>>> df['type'] = bbq.ai.classify(df['creature'], ['Mammal', 'Fish'])
422428
>>> df
@@ -467,6 +473,7 @@ def score(
467473
468474
>>> import bigframes.pandas as bpd
469475
>>> import bigframes.bigquery as bbq
476+
>>> bpd.options.display.progress_bar = None
470477
>>> animal = bpd.Series(["Tiger", "Rabbit", "Blue Whale"])
471478
>>> bbq.ai.score(("Rank the relative weights of ", animal, " on the scale from 1 to 3")) # doctest: +SKIP
472479
0 2.0

bigframes/bigquery/_operations/approx_agg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def approx_top_count(
4040
4141
>>> import bigframes.pandas as bpd
4242
>>> import bigframes.bigquery as bbq
43+
>>> bpd.options.display.progress_bar = None
4344
>>> s = bpd.Series(["apple", "apple", "pear", "pear", "pear", "banana"])
4445
>>> bbq.approx_top_count(s, number=2)
4546
[{'value': 'pear', 'count': 3}, {'value': 'apple', 'count': 2}]

bigframes/conftest.py

Lines changed: 0 additions & 44 deletions
This file was deleted.

bigframes/operations/semantics.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def agg(
5252
**Examples:**
5353
5454
>>> import bigframes.pandas as bpd
55+
>>> bpd.options.display.progress_bar = None
5556
>>> bpd.options.experiments.semantic_operators = True
5657
>>> bpd.options.compute.semantic_ops_confirmation_threshold = 25
5758
@@ -246,7 +247,8 @@ def cluster_by(
246247
**Examples:**
247248
248249
>>> import bigframes.pandas as bpd
249-
>>> bpd.options.experiments.semantic_operators = True
250+
>>> bpd.options.display.progress_bar = None
251+
>>> bpd.options.experiments.semantic_operators = True
250252
>>> bpd.options.compute.semantic_ops_confirmation_threshold = 25
251253
252254
>>> import bigframes.ml.llm as llm
@@ -319,7 +321,8 @@ def filter(self, instruction: str, model, ground_with_google_search: bool = Fals
319321
**Examples:**
320322
321323
>>> import bigframes.pandas as bpd
322-
>>> bpd.options.experiments.semantic_operators = True
324+
>>> bpd.options.display.progress_bar = None
325+
>>> bpd.options.experiments.semantic_operators = True
323326
>>> bpd.options.compute.semantic_ops_confirmation_threshold = 25
324327
325328
>>> import bigframes.ml.llm as llm
@@ -432,7 +435,8 @@ def map(
432435
**Examples:**
433436
434437
>>> import bigframes.pandas as bpd
435-
>>> bpd.options.experiments.semantic_operators = True
438+
>>> bpd.options.display.progress_bar = None
439+
>>> bpd.options.experiments.semantic_operators = True
436440
>>> bpd.options.compute.semantic_ops_confirmation_threshold = 25
437441
438442
>>> import bigframes.ml.llm as llm
@@ -554,7 +558,8 @@ def join(
554558
**Examples:**
555559
556560
>>> import bigframes.pandas as bpd
557-
>>> bpd.options.experiments.semantic_operators = True
561+
>>> bpd.options.display.progress_bar = None
562+
>>> bpd.options.experiments.semantic_operators = True
558563
>>> bpd.options.compute.semantic_ops_confirmation_threshold = 25
559564
560565
>>> import bigframes.ml.llm as llm
@@ -692,6 +697,7 @@ def search(
692697
** Examples: **
693698
694699
>>> import bigframes.pandas as bpd
700+
>>> bpd.options.display.progress_bar = None
695701
696702
>>> import bigframes
697703
>>> bigframes.options.experiments.semantic_operators = True
@@ -794,7 +800,8 @@ def top_k(
794800
**Examples:**
795801
796802
>>> import bigframes.pandas as bpd
797-
>>> bpd.options.experiments.semantic_operators = True
803+
>>> bpd.options.display.progress_bar = None
804+
>>> bpd.options.experiments.semantic_operators = True
798805
>>> bpd.options.compute.semantic_ops_confirmation_threshold = 25
799806
800807
>>> import bigframes.ml.llm as llm
@@ -994,7 +1001,8 @@ def sim_join(
9941001
** Examples: **
9951002
9961003
>>> import bigframes.pandas as bpd
997-
>>> bpd.options.experiments.semantic_operators = True
1004+
>>> bpd.options.display.progress_bar = None
1005+
>>> bpd.options.experiments.semantic_operators = True
9981006
>>> bpd.options.compute.semantic_ops_confirmation_threshold = 25
9991007
10001008
>>> import bigframes.ml.llm as llm

bigframes/operations/strings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def reverse(self) -> series.Series:
6868
**Examples:**
6969
7070
>>> import bigframes.pandas as bpd
71+
>>> bpd.options.display.progress_bar = None
7172
7273
>>> s = bpd.Series(["apple", "banana", "", bpd.NA])
7374
>>> s.str.reverse()

third_party/bigframes_vendored/geopandas/geoseries.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class GeoSeries:
1818
>>> import bigframes.geopandas
1919
>>> import bigframes.pandas as bpd
2020
>>> from shapely.geometry import Point
21+
>>> bpd.options.display.progress_bar = None
2122
2223
>>> s = bigframes.geopandas.GeoSeries([Point(1, 1), Point(2, 2), Point(3, 3)])
2324
>>> s
@@ -72,6 +73,7 @@ def x(self) -> bigframes.series.Series:
7273
>>> import bigframes.pandas as bpd
7374
>>> import geopandas.array
7475
>>> import shapely.geometry
76+
>>> bpd.options.display.progress_bar = None
7577
7678
>>> series = bpd.Series(
7779
... [shapely.geometry.Point(1, 2), shapely.geometry.Point(2, 3), shapely.geometry.Point(3, 4)],
@@ -98,6 +100,7 @@ def y(self) -> bigframes.series.Series:
98100
>>> import bigframes.pandas as bpd
99101
>>> import geopandas.array
100102
>>> import shapely.geometry
103+
>>> bpd.options.display.progress_bar = None
101104
102105
>>> series = bpd.Series(
103106
... [shapely.geometry.Point(1, 2), shapely.geometry.Point(2, 3), shapely.geometry.Point(3, 4)],
@@ -126,6 +129,7 @@ def boundary(self) -> bigframes.geopandas.GeoSeries:
126129
>>> import bigframes.pandas as bpd
127130
>>> import geopandas.array
128131
>>> import shapely.geometry
132+
>>> bpd.options.display.progress_bar = None
129133
130134
>>> from shapely.geometry import Polygon, LineString, Point
131135
>>> s = geopandas.GeoSeries(
@@ -167,6 +171,7 @@ def from_xy(cls, x, y, index=None, **kwargs) -> bigframes.geopandas.GeoSeries:
167171
168172
>>> import bigframes.pandas as bpd
169173
>>> import bigframes.geopandas
174+
>>> bpd.options.display.progress_bar = None
170175
171176
>>> x = [2.5, 5, -3.0]
172177
>>> y = [0.5, 1, 1.5]
@@ -205,6 +210,7 @@ def from_wkt(cls, data, index=None) -> bigframes.geopandas.GeoSeries:
205210
206211
>>> import bigframes as bpd
207212
>>> import bigframes.geopandas
213+
>>> bpd.options.display.progress_bar = None
208214
209215
>>> wkts = [
210216
... 'POINT (1 1)',
@@ -240,6 +246,7 @@ def to_wkt(self) -> bigframes.series.Series:
240246
>>> import bigframes as bpd
241247
>>> import bigframes.geopandas
242248
>>> from shapely.geometry import Point
249+
>>> bpd.options.display.progress_bar = None
243250
244251
>>> s = bigframes.geopandas.GeoSeries([Point(1, 1), Point(2, 2), Point(3, 3)])
245252
>>> s
@@ -272,6 +279,7 @@ def difference(self: GeoSeries, other: GeoSeries) -> GeoSeries: # type: ignore
272279
>>> import bigframes as bpd
273280
>>> import bigframes.geopandas
274281
>>> from shapely.geometry import Polygon, LineString, Point
282+
>>> bpd.options.display.progress_bar = None
275283
276284
We can check two GeoSeries against each other, row by row:
277285
@@ -403,6 +411,7 @@ def intersection(self: GeoSeries, other: GeoSeries) -> GeoSeries: # type: ignor
403411
>>> import bigframes as bpd
404412
>>> import bigframes.geopandas
405413
>>> from shapely.geometry import Polygon, LineString, Point
414+
>>> bpd.options.display.progress_bar = None
406415
407416
We can check two GeoSeries against each other, row by row.
408417

third_party/bigframes_vendored/pandas/AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ file to indicate the copyright and license terms:
4747

4848
Other licenses can be found in the LICENSES directory.
4949

50+
License
5051
=======
5152

5253
pandas is distributed under a 3-clause ("Simplified" or "New") BSD

third_party/bigframes_vendored/pandas/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Here are just a few of the things that pandas does well:
6060
generation and frequency conversion, moving window statistics,
6161
date shifting and lagging
6262

63+
6364
[missing-data]: https://pandas.pydata.org/pandas-docs/stable/user_guide/missing_data.html
6465
[insertion-deletion]: https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html#column-selection-addition-deletion
6566
[alignment]: https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html?highlight=alignment#intro-to-data-structures
@@ -119,6 +120,7 @@ python setup.py install
119120

120121
or for installing in [development mode](https://pip.pypa.io/en/latest/cli/pip_install/#install-editable):
121122

123+
122124
```sh
123125
python -m pip install -e . --no-build-isolation --no-use-pep517
124126
```

0 commit comments

Comments
 (0)