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

Commit b2c078b

Browse files
committed
try to restore docs changes
1 parent c799b28 commit b2c078b

3 files changed

Lines changed: 47 additions & 9 deletions

File tree

conftest.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from __future__ import annotations
16+
17+
import numpy as np
18+
import pandas as pd
19+
import pyarrow as pa
20+
import pytest
21+
22+
import bigframes._config
23+
24+
25+
@pytest.fixture(scope="session")
26+
def polars_session():
27+
pytest.importorskip("polars")
28+
29+
from bigframes.testing import polars_session
30+
31+
return polars_session.TestSession()
32+
33+
34+
@pytest.fixture(autouse=True)
35+
def default_doctest_imports(doctest_namespace, polars_session):
36+
"""
37+
Avoid some boilerplate in pandas-inspired tests.
38+
39+
See: https://docs.pytest.org/en/stable/how-to/doctest.html#doctest-namespace-fixture
40+
"""
41+
doctest_namespace["np"] = np
42+
doctest_namespace["pd"] = pd
43+
doctest_namespace["pa"] = pa
44+
doctest_namespace["bpd"] = polars_session
45+
bigframes._config.options.display.progress_bar = None

noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@
4646
"3.11",
4747
]
4848

49-
# pytest-retry is not yet compatible with pytest 8.x.
50-
# https://github.com/str0zzapreti/pytest-retry/issues/32
51-
PYTEST_VERSION = "pytest<8.0.0dev"
49+
PYTEST_VERSION = "pytest==8.4.2"
5250
SPHINX_VERSION = "sphinx==4.5.0"
5351
LINT_PATHS = [
5452
"docs",
@@ -115,7 +113,7 @@
115113
# Make sure we leave some versions without "extras" so we know those
116114
# dependencies are actually optional.
117115
"3.10": ["tests", "scikit-learn", "anywidget"],
118-
"3.11": ["tests", "scikit-learn", "polars", "anywidget"],
116+
LATEST_FULLY_SUPPORTED_PYTHON: ["tests", "scikit-learn", "polars", "anywidget"],
119117
"3.13": ["tests", "polars", "anywidget"],
120118
}
121119

third_party/bigframes_vendored/pandas/core/arrays/datetimelike.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ def strftime(self, date_format: str):
1515
**Examples:**
1616
1717
>>> import bigframes.pandas as bpd
18-
>>> bpd.options.display.progress_bar = None
1918
2019
>>> s = bpd.to_datetime(
2120
... ['2014-08-15 08:15:12', '2012-02-29 08:15:12+06:00', '2015-08-15 08:15:12+05:00'],
@@ -52,8 +51,6 @@ def normalize(self):
5251
**Examples:**
5352
5453
>>> import pandas as pd
55-
>>> import bigframes.pandas as bpd
56-
>>> bpd.options.display.progress_bar = None
5754
>>> s = bpd.Series(pd.date_range(
5855
... start='2014-08-01 10:00',
5956
... freq='h',
@@ -87,8 +84,6 @@ def floor(self, freq: str):
8784
**Examples:**
8885
8986
>>> import pandas as pd
90-
>>> import bigframes.pandas as bpd
91-
>>> bpd.options.display.progress_bar = None
9287
>>> rng = pd.date_range('1/1/2018 11:59:00', periods=3, freq='min')
9388
>>> bpd.Series(rng).dt.floor("h")
9489
0 2018-01-01 11:00:00

0 commit comments

Comments
 (0)