Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,10 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("http://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
"python": ("https://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"grpc": ("https://grpc.io/grpc/python/", None),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
}

Expand Down
12 changes: 9 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

DEFAULT_PYTHON_VERSION = "3.8"
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"]
UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8"]
UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]


@nox.session(python=DEFAULT_PYTHON_VERSION)
Expand Down Expand Up @@ -75,7 +75,10 @@ def default(session):
session.install(
"mock", "pytest", "pytest-cov",
)
session.install("-e", ".[fastavro,pandas,pyarrow]")
extras = "fastavro,pandas,pyarrow"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know synthtool will just revert this change, but I figure we can manually keep this in until pyarrow 3.0 is out.

if session.python == "3.9":
extras = "fastavro,pandas"
session.install("-e", f".[{extras}]")

# Run py.test against the unit tests.
session.run(
Expand Down Expand Up @@ -129,7 +132,10 @@ def system(session):
session.install(
"mock", "pytest", "google-cloud-testutils",
)
session.install("-e", ".[fastavro,pandas,pyarrow]")
extras = "fastavro,pandas,pyarrow"
if session.python == "3.9":
extras = "fastavro,pandas"
session.install("-e", f".[{extras}]")

# Run py.test against the system tests.
if system_test_exists:
Expand Down
6 changes: 3 additions & 3 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-bigquery-storage.git",
"sha": "7cf4f32abde1436fbe6c0848647b4ff703e60f85"
"sha": "994a7c1cb1f8008e630d2325a9c168001e5081b4"
}
},
{
Expand All @@ -19,14 +19,14 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b"
"sha": "9a7d9fbb7045c34c9d3d22c1ff766eeae51f04c9"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b"
"sha": "9a7d9fbb7045c34c9d3d22c1ff766eeae51f04c9"
}
}
],
Expand Down
Empty file added tests/unit/__init__.py
Empty file.
73 changes: 73 additions & 0 deletions tests/unit/helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import datetime
import decimal

import pytz


SCALAR_COLUMNS = [
{"name": "int_col", "type": "int64"},
{"name": "float_col", "type": "float64"},
{"name": "num_col", "type": "numeric"},
{"name": "bool_col", "type": "bool"},
{"name": "str_col", "type": "string"},
{"name": "bytes_col", "type": "bytes"},
{"name": "date_col", "type": "date"},
{"name": "time_col", "type": "time"},
{"name": "ts_col", "type": "timestamp"},
]
SCALAR_COLUMN_NAMES = [field["name"] for field in SCALAR_COLUMNS]
SCALAR_BLOCKS = [
[
{
"int_col": 123,
"float_col": 3.14,
"num_col": decimal.Decimal("9.99"),
"bool_col": True,
"str_col": "hello world",
"bytes_col": b"ascii bytes",
"date_col": datetime.date(1998, 9, 4),
"time_col": datetime.time(12, 0),
"ts_col": datetime.datetime(2000, 1, 1, 5, 0, tzinfo=pytz.utc),
},
{
"int_col": 456,
"float_col": 2.72,
"num_col": decimal.Decimal("0.99"),
"bool_col": False,
"str_col": "hallo welt",
"bytes_col": b"\xbb\xee\xff",
"date_col": datetime.date(1995, 3, 2),
"time_col": datetime.time(13, 37),
"ts_col": datetime.datetime(1965, 4, 3, 2, 1, tzinfo=pytz.utc),
},
],
[
{
"int_col": 789,
"float_col": 1.23,
"num_col": decimal.Decimal("5.67"),
"bool_col": True,
"str_col": u"こんにちは世界",
"bytes_col": b"\x54\x69\x6d",
"date_col": datetime.date(1970, 1, 1),
"time_col": datetime.time(16, 20),
"ts_col": datetime.datetime(1991, 8, 25, 20, 57, 8, tzinfo=pytz.utc),
}
],
]
Loading