-
Notifications
You must be signed in to change notification settings - Fork 63
docs: remove import bigframes.pandas as bpd boilerplate from many samples #2147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
8cfaca6
c85d47f
78bfccf
210dc9a
bed4069
aa23fca
20cae2d
f57a8c3
d8ab16b
1dc648b
9de6f9f
5d23dee
20d7c27
534471e
fbe606e
171f3ec
ded5c1e
841bc64
81f49a6
f7a017a
5b60505
a97cc93
5aaacfe
922bbf4
765b678
4aa47a8
f75f5bf
a7058ac
62d5911
70021f3
9350209
23346b0
03822d7
dc02baf
5df828b
ddbb32d
d80bfcb
0a5a935
1126244
8b069e8
d63a95f
6a8f694
6aadbaf
beb3a7d
95e4394
d33147a
676c8b0
a7f542c
699ce4d
ace646a
c799b28
b2c078b
e6f711f
9906cc8
00b89d6
44a4cab
f884610
b81a6e6
fe54feb
150d8be
4334a44
937fff7
358fc0e
c7438c2
42c8586
22e6fb2
1157f41
f36cce2
7ed9029
2b97c2b
4462425
dd28c1c
90cf6ab
7dc6db7
af90071
3bb0464
e7425fc
e99de45
2aa7f25
9414971
8ced818
9db2c19
e4c5571
49f32b8
c3a9d61
e1f3f2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,8 +12,15 @@ | |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import numpy as np | ||
| import pandas as pd | ||
| import pyarrow as pa | ||
| import pytest | ||
|
|
||
| import bigframes._config | ||
|
|
||
|
|
||
| @pytest.fixture(scope="session") | ||
| def polars_session(): | ||
|
|
@@ -22,3 +29,17 @@ def polars_session(): | |
| from bigframes.testing import polars_session | ||
|
|
||
| return polars_session.TestSession() | ||
|
|
||
|
|
||
| @pytest.fixture(autouse=True) | ||
| def default_doctest_imports(doctest_namespace, polars_session): | ||
| """ | ||
| Avoid some boilerplate in pandas-inspired tests. | ||
|
|
||
| See: https://docs.pytest.org/en/stable/how-to/doctest.html#doctest-namespace-fixture | ||
| """ | ||
| doctest_namespace["np"] = np | ||
| doctest_namespace["pd"] = pd | ||
| doctest_namespace["pa"] = pa | ||
| doctest_namespace["bpd"] = polars_session | ||
|
||
| bigframes._config.options.display.progress_bar = None | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I recommend reviewing this with "hide whitespace" turned on. The only change is to increase indentation to fix samples tests that break due to an attempted import of this file without Polars installed. |
Uh oh!
There was an error while loading. Please reload this page.