Skip to content
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

deps: make pyarrow and BQ Storage optional dependencies #1282

Merged
merged 62 commits into from
Dec 8, 2022
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
b7e2cbb
update dependencies
steffnay Jun 30, 2022
951a43e
Merge branch 'main' of github.com:googleapis/python-bigquery into py-…
steffnay Jul 8, 2022
e9c57d6
deps: pyarrow extras
steffnay Jul 8, 2022
47a489b
clean up comments
steffnay Jul 8, 2022
fd0c40c
add test pyarrow skips
steffnay Jul 8, 2022
85db3e5
Merge branch 'main' into py-extra
parthea Jul 9, 2022
1fac4d2
replace storage checks
steffnay Jul 11, 2022
eaada14
Merge branch 'main' of github.com:googleapis/python-bigquery into py-…
steffnay Jul 11, 2022
61c69e9
update tests
steffnay Jul 11, 2022
95da5c7
Merge branch 'py-extra' of github.com:steffnay/python-bigquery into p…
steffnay Jul 11, 2022
e31e4ef
update tests
steffnay Jul 11, 2022
b4f7160
Update setup.py
steffnay Jul 11, 2022
2bb6461
update system tests
steffnay Jul 12, 2022
2602e4d
Merge branch 'py-extra' of github.com:steffnay/python-bigquery into p…
steffnay Jul 12, 2022
3a87275
update verify_pandas_imports
steffnay Jul 14, 2022
e0a9a2a
add pyarrow guards
steffnay Jul 14, 2022
f3dbaea
add datetime check
steffnay Jul 15, 2022
91fccef
change pyarrow import
steffnay Jul 15, 2022
ac78a33
update
steffnay Jul 15, 2022
0d89234
add pyarrow skips
steffnay Jul 21, 2022
b774b4b
merge
steffnay Jul 21, 2022
79dd4cc
fix types
steffnay Jul 21, 2022
37d7a25
lint
steffnay Jul 21, 2022
9dedf78
Update google/cloud/bigquery/client.py
steffnay Aug 1, 2022
933963e
update pyarrow version
steffnay Aug 1, 2022
93d7639
Merge branch 'py-extra' of github.com:steffnay/python-bigquery into p…
steffnay Aug 1, 2022
45eed33
update test
steffnay Aug 1, 2022
6ac7204
Merge branch 'main' into py-extra
steffnay Aug 1, 2022
af00605
lint
steffnay Aug 1, 2022
5bd1f30
Merge branch 'py-extra' of github.com:steffnay/python-bigquery into p…
steffnay Aug 1, 2022
ef20ab5
update pyarrow req
steffnay Aug 1, 2022
95aceca
update noxfile
steffnay Aug 1, 2022
12591b3
Merge branch 'main' into py-extra
steffnay Aug 5, 2022
d0e9045
remove bignum check
steffnay Aug 5, 2022
5045ead
remove comments
steffnay Aug 5, 2022
050af79
Merge branch 'main' into py-extra
steffnay Aug 18, 2022
01dd2b2
Merge branch 'main' of github.com:googleapis/python-bigquery into py-…
steffnay Sep 23, 2022
1eb5fac
add test importorskip
steffnay Sep 23, 2022
f23657b
update test
steffnay Sep 24, 2022
7138f1e
update test
steffnay Sep 24, 2022
abb9b8c
update dependency
steffnay Sep 24, 2022
d69f8ad
change version
steffnay Sep 24, 2022
caa21cb
update imports
steffnay Sep 26, 2022
17d922a
Merge branch 'main' into py-extra
steffnay Oct 3, 2022
d52b301
Merge branch 'main' into py-extra
steffnay Dec 6, 2022
21ebf7d
adjust test expectations when google-cloud-bigquery-storage is not av…
tswast Dec 8, 2022
39b173a
export pyarrow exception
tswast Dec 8, 2022
88fa115
whitespace in docstrings
tswast Dec 8, 2022
1b926aa
format minimum bqstorage version string
tswast Dec 8, 2022
d71141d
restore optional bqstorage_client
tswast Dec 8, 2022
51332d1
restore optional bqstorage_client (in table.py)
tswast Dec 8, 2022
4c296ae
synchronize constraints and setup.py
tswast Dec 8, 2022
6067f90
synchronize signatures
tswast Dec 8, 2022
6c2b8a5
remove unnecessary bignumeric_type extra
tswast Dec 8, 2022
8196a15
more constraints sync
tswast Dec 8, 2022
5bac083
remove unnecessary mock
tswast Dec 8, 2022
dafdb64
fix unittest skip
tswast Dec 8, 2022
805f5d3
synchronize constraints
tswast Dec 8, 2022
b85dcf3
adjust shapely
tswast Dec 8, 2022
bf4f218
simplify with importorskip
tswast Dec 8, 2022
794f70c
blacken
tswast Dec 8, 2022
bab28b5
Merge branch 'main' into py-extra
tswast Dec 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adjust test expectations when google-cloud-bigquery-storage is not av…
…ailable
  • Loading branch information
tswast committed Dec 8, 2022
commit 21ebf7d114ef94f4f91ee4e282fd9161434728b5
11 changes: 6 additions & 5 deletions tests/unit/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -2846,14 +2846,15 @@ def test_to_arrow_ensure_bqstorage_client_wo_bqstorage(self):
api_request = mock.Mock(return_value={"rows": rows})

mock_client = _mock_client()
mock_client._ensure_bqstorage_client.return_value = None
row_iterator = self._make_one(mock_client, api_request, path, schema)

tbl = row_iterator.to_arrow(create_bqstorage_client=True)
def mock_verify_version():
raise _helpers.LegacyBigQueryStorageError("no bqstorage")

# The client attempted to create a BQ Storage client, and even though
# that was not possible, results were still returned without errors.
mock_client._ensure_bqstorage_client.assert_called_once()
with mock.patch("google.cloud.bigquery._helpers.BQ_STORAGE_VERSIONS.verify_version", mock_verify_version):
tbl = row_iterator.to_arrow(create_bqstorage_client=True)

mock_client._ensure_bqstorage_client.assert_not_called()
self.assertIsInstance(tbl, pyarrow.Table)
self.assertEqual(tbl.num_rows, 2)

Expand Down