Skip to content

Commit 43f86f6

Browse files
committed
Update other supporting files
1 parent 9506c0b commit 43f86f6

File tree

5 files changed

+22
-17
lines changed

5 files changed

+22
-17
lines changed

.github/header-checker-lint.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
"allowedLicenses": ["Apache-2.0", "MIT", "BSD-3"],
33
"ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt", "**/__init__.py", "samples/**/constraints.txt", "samples/**/constraints-test.txt"],
44
"sourceFileExtensions": [
5-
"ts",
6-
"js",
7-
"java",
8-
"sh",
9-
"Dockerfile",
10-
"yaml",
5+
"css",
6+
"ts",
7+
"js",
8+
"java",
9+
"sh",
10+
"Dockerfile",
11+
"yaml",
1112
"py",
1213
"html",
1314
"txt"
1415
]
15-
}
16+
}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ repos:
4646
rev: v2.0.2
4747
hooks:
4848
- id: biome-check
49-
files: '\.js$'
49+
files: '\.(css|js)$'

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Generated by synthtool. DO NOT EDIT!
1818
include README.rst LICENSE
1919
recursive-include third_party/bigframes_vendored *
20-
recursive-include bigframes *.json *.proto *.js py.typed
20+
recursive-include bigframes *.css *.json *.proto *.js py.typed
2121
recursive-include tests *
2222
global-exclude *.py[co]
2323
global-exclude __pycache__

bigframes/display/anywidget.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
else:
4343
WIDGET_BASE = object
4444

45+
_DEFAULT_PAGE_SIZE = 25
4546

4647
class TableWidget(WIDGET_BASE):
4748
"""
@@ -63,10 +64,10 @@ def __init__(self, dataframe: bigframes.dataframe.DataFrame):
6364
self._dataframe = dataframe
6465

6566
# respect display options
66-
self.page_size = bigframes.options.display.max_rows
67+
page_size = bigframes.options.display.max_rows
6768

6869
# Initialize data fetching attributes.
69-
self._batches = dataframe.to_pandas_batches(page_size=self.page_size)
70+
self._batches = dataframe.to_pandas_batches(page_size=page_size)
7071

7172
# Use list of DataFrames to avoid memory copies from concatenation
7273
self._cached_batches: List[pd.DataFrame] = []
@@ -82,9 +83,12 @@ def __init__(self, dataframe: bigframes.dataframe.DataFrame):
8283
# TODO(b/428238610): Start iterating over the result of `to_pandas_batches()`
8384
# before we get here so that the count might already be cached.
8485
self.row_count = len(dataframe)
85-
86-
# get the initial page
87-
self._set_table_html()
86+
# get the initial page, either through resetting the page_size or
87+
# explicitly.
88+
if page_size != self.page_size:
89+
self.page_size = page_size
90+
else:
91+
self._set_table_html()
8892

8993
@functools.cached_property
9094
def _css(self):

owlbot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@
100100
"recursive-include third_party/bigframes_vendored *\nrecursive-include bigframes",
101101
)
102102

103-
# Include JavaScript files for display widgets
103+
# Include CSS and JS files for display widgets
104104
assert 1 == s.replace( # MANIFEST.in
105105
["MANIFEST.in"],
106-
re.escape("recursive-include bigframes *.json *.proto py.typed"),
107-
"recursive-include bigframes *.json *.proto *.js py.typed",
106+
re.escape("recursive-include bigframes *.css *.json *.proto py.typed"),
107+
"recursive-include bigframes *.css *.json *.proto *.js py.typed",
108108
)
109109

110110
# Fixup the documentation.

0 commit comments

Comments
 (0)