Skip to content

Commit

Permalink
chore(v1): release 1.1.1 (#431)
Browse files Browse the repository at this point in the history
* chore(v1): release 1.1.1

* chore: format with py2 compat black

* chore: fix docs

* chore: add init files to system test dir

* chore: run system tests with bigquery<3

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Bu Sun Kim <busunkim@google.com>
  • Loading branch information
release-please[bot] and busunkim96 authored Apr 7, 2022
1 parent 8b8dea7 commit c65c35b
Show file tree
Hide file tree
Showing 19 changed files with 102 additions and 39 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

[1]: https://pypi.org/project/google-cloud-bigquery-storage/#history

### [1.1.1](https://github.com/googleapis/python-bigquery-storage/compare/v1.1.0...v1.1.1) (2022-04-04)


### Bug Fixes

* **v1:** require google-api-core >= 1.31.5, >= 2.3.2 on v1 release ([d4babe0](https://github.com/googleapis/python-bigquery-storage/commit/d4babe00d8bca473757a2da01d255246b9b1e1f1))

## 1.1.0

09-14-2020 08:51 PDT
Expand Down
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,10 @@
intersphinx_mapping = {
"python": ("http://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"google.api_core": (
"https://googleapis.dev/python/google-api-core/latest/",
None,
),
"grpc": ("https://grpc.io/grpc/python/", None),
}

Expand Down
21 changes: 16 additions & 5 deletions google/cloud/bigquery_storage_v1/gapic/big_query_read_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def from_service_account_file(cls, filename, *args, **kwargs):
def project_path(cls, project):
"""Return a fully-qualified project string."""
return google.api_core.path_template.expand(
"projects/{project}", project=project,
"projects/{project}",
project=project,
)

@classmethod
Expand Down Expand Up @@ -204,7 +205,9 @@ def __init__(
self.transport = transport
else:
self.transport = big_query_read_grpc_transport.BigQueryReadGrpcTransport(
address=api_endpoint, channel=channel, credentials=credentials,
address=api_endpoint,
channel=channel,
credentials=credentials,
)

if client_info is None:
Expand Down Expand Up @@ -319,7 +322,9 @@ def create_read_session(
)

request = storage_pb2.CreateReadSessionRequest(
parent=parent, read_session=read_session, max_stream_count=max_stream_count,
parent=parent,
read_session=read_session,
max_stream_count=max_stream_count,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -401,7 +406,10 @@ def read_rows(
client_info=self._client_info,
)

request = storage_pb2.ReadRowsRequest(read_stream=read_stream, offset=offset,)
request = storage_pb2.ReadRowsRequest(
read_stream=read_stream,
offset=offset,
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -484,7 +492,10 @@ def split_read_stream(
client_info=self._client_info,
)

request = storage_pb2.SplitReadStreamRequest(name=name, fraction=fraction,)
request = storage_pb2.SplitReadStreamRequest(
name=name,
fraction=fraction,
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
4 changes: 3 additions & 1 deletion google/cloud/bigquery_storage_v1/proto/storage_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion google/cloud/bigquery_storage_v1/proto/stream_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def from_service_account_file(cls, filename, *args, **kwargs):
def project_path(cls, project):
"""Return a fully-qualified project string."""
return google.api_core.path_template.expand(
"projects/{project}", project=project,
"projects/{project}",
project=project,
)

@classmethod
Expand Down Expand Up @@ -194,8 +195,12 @@ def __init__(
)
self.transport = transport
else:
self.transport = big_query_storage_grpc_transport.BigQueryStorageGrpcTransport(
address=api_endpoint, channel=channel, credentials=credentials,
self.transport = (
big_query_storage_grpc_transport.BigQueryStorageGrpcTransport(
address=api_endpoint,
channel=channel,
credentials=credentials,
)
)

if client_info is None:
Expand Down Expand Up @@ -415,7 +420,9 @@ def read_rows(
client_info=self._client_info,
)

request = storage_pb2.ReadRowsRequest(read_position=read_position,)
request = storage_pb2.ReadRowsRequest(
read_position=read_position,
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -503,7 +510,8 @@ def batch_create_read_session_streams(
)

request = storage_pb2.BatchCreateReadSessionStreamsRequest(
session=session, requested_streams=requested_streams,
session=session,
requested_streams=requested_streams,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -587,7 +595,9 @@ def finalize_stream(
client_info=self._client_info,
)

request = storage_pb2.FinalizeStreamRequest(stream=stream,)
request = storage_pb2.FinalizeStreamRequest(
stream=stream,
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -670,7 +680,8 @@ def split_read_stream(
)

request = storage_pb2.SplitReadStreamRequest(
original_stream=original_stream, fraction=fraction,
original_stream=original_stream,
fraction=fraction,
)
if metadata is None:
metadata = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def from_service_account_file(cls, filename, *args, **kwargs):
def project_path(cls, project):
"""Return a fully-qualified project string."""
return google.api_core.path_template.expand(
"projects/{project}", project=project,
"projects/{project}",
project=project,
)

@classmethod
Expand Down Expand Up @@ -204,7 +205,9 @@ def __init__(
self.transport = transport
else:
self.transport = big_query_read_grpc_transport.BigQueryReadGrpcTransport(
address=api_endpoint, channel=channel, credentials=credentials,
address=api_endpoint,
channel=channel,
credentials=credentials,
)

if client_info is None:
Expand Down Expand Up @@ -317,7 +320,9 @@ def create_read_session(
)

request = storage_pb2.CreateReadSessionRequest(
parent=parent, read_session=read_session, max_stream_count=max_stream_count,
parent=parent,
read_session=read_session,
max_stream_count=max_stream_count,
)
if metadata is None:
metadata = []
Expand Down Expand Up @@ -399,7 +404,10 @@ def read_rows(
client_info=self._client_info,
)

request = storage_pb2.ReadRowsRequest(read_stream=read_stream, offset=offset,)
request = storage_pb2.ReadRowsRequest(
read_stream=read_stream,
offset=offset,
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -482,7 +490,10 @@ def split_read_stream(
client_info=self._client_info,
)

request = storage_pb2.SplitReadStreamRequest(name=name, fraction=fraction,)
request = storage_pb2.SplitReadStreamRequest(
name=name,
fraction=fraction,
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
4 changes: 3 additions & 1 deletion google/cloud/bigquery_storage_v1beta2/proto/arrow_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion google/cloud/bigquery_storage_v1beta2/proto/storage_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion google/cloud/bigquery_storage_v1beta2/proto/stream_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 17 additions & 12 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import nox


BLACK_VERSION = "black==19.10b0"
BLACK_VERSION = "black==21.12b0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"
Expand All @@ -38,14 +38,16 @@ def lint(session):
Returns a failure if the linters find linting errors or sufficiently
serious code quality issues.
"""
session.install("flake8", BLACK_VERSION)
session.install("flake8", BLACK_VERSION, "click<8.1")
session.run(
"black", "--check", *BLACK_PATHS,
"black",
"--check",
*BLACK_PATHS,
)
session.run("flake8", "google", "tests")


@nox.session(python="3.6")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def blacken(session):
"""Run black.
Expand All @@ -55,9 +57,10 @@ def blacken(session):
That run uses an image that doesn't have 3.6 installed. Before updating this
check the state of the `gcp_ubuntu_config` we use for that Kokoro run.
"""
session.install(BLACK_VERSION)
session.install(BLACK_VERSION, "click<8.1")
session.run(
"black", *BLACK_PATHS,
"black",
*BLACK_PATHS,
)


Expand Down Expand Up @@ -118,12 +121,14 @@ def system(session):
# Use pre-release gRPC for system tests.
session.install("--pre", "grpcio")

session.install("google-cloud-bigquery")
session.install("google-cloud-bigquery<3")

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install(
"mock", "pytest", "google-cloud-testutils",
"mock",
"pytest",
"google-cloud-testutils",
)
session.install("-e", ".[fastavro,pandas,pyarrow]")
session.install("-e", ".")
Expand Down Expand Up @@ -153,7 +158,7 @@ def docs(session):
"""Build the docs for this library."""

session.install("-e", ".")
session.install("sphinx<3.0.0", "alabaster", "recommonmark")
session.install("sphinx<3.0.0", "jinja2<3.1", "alabaster", "recommonmark")

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
Expand All @@ -175,9 +180,9 @@ def docfx(session):
"""Build the docfx yaml files for this library."""

session.install("-e", ".")
# sphinx-docfx-yaml supports up to sphinx version 1.5.5.
# https://github.com/docascode/sphinx-docfx-yaml/issues/97
session.install("sphinx==1.5.5", "alabaster", "recommonmark", "sphinx-docfx-yaml")
session.install(
"sphinx<3.0.0", "jinja2<3.1", "alabaster", "recommonmark", "sphinx-docfx-yaml"
)

shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
Expand Down
2 changes: 1 addition & 1 deletion samples/quickstart/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def py(session):


def _get_repo_root():
""" Returns the root folder of the project. """
"""Returns the root folder of the project."""
# Get root of this repository. Assume we don't have directories nested deeper than 10 items.
p = Path(os.getcwd())
for i in range(10):
Expand Down
5 changes: 4 additions & 1 deletion samples/to_dataframe/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def clients():
)

# Make clients.
bqclient = bigquery.Client(credentials=credentials, project=your_project_id,)
bqclient = bigquery.Client(
credentials=credentials,
project=your_project_id,
)
bqstorageclient = bigquery_storage_v1beta1.BigQueryStorageClient(
credentials=credentials
)
Expand Down
2 changes: 1 addition & 1 deletion samples/to_dataframe/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def py(session):


def _get_repo_root():
""" Returns the root folder of the project. """
"""Returns the root folder of the project."""
# Get root of this repository. Assume we don't have directories nested deeper than 10 items.
p = Path(os.getcwd())
for i in range(10):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

name = "google-cloud-bigquery-storage"
description = "BigQuery Storage API API client library"
version = "1.0.0"
version = "1.1.1"
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
"google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
Expand Down
Empty file added tests/__init__.py
Empty file.
Empty file added tests/system/__init__.py
Empty file.
Empty file added tests/system/v1/__init__.py
Empty file.
Empty file.

0 comments on commit c65c35b

Please sign in to comment.