Skip to content
This repository was archived by the owner on Dec 31, 2023. 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
17 changes: 10 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
master_doc = "index"

# General information about the project.
project = u"google-cloud-trace"
copyright = u"2019, Google"
author = u"Google APIs"
project = "google-cloud-trace"
copyright = "2019, Google"
author = "Google APIs"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -261,7 +261,7 @@
(
master_doc,
"google-cloud-trace.tex",
u"google-cloud-trace Documentation",
"google-cloud-trace Documentation",
author,
"manual",
)
Expand Down Expand Up @@ -296,7 +296,7 @@
(
master_doc,
"google-cloud-trace",
u"google-cloud-trace Documentation",
"google-cloud-trace Documentation",
[author],
1,
)
Expand All @@ -315,7 +315,7 @@
(
master_doc,
"google-cloud-trace",
u"google-cloud-trace Documentation",
"google-cloud-trace Documentation",
author,
"google-cloud-trace",
"google-cloud-trace Library",
Expand All @@ -340,7 +340,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
18 changes: 14 additions & 4 deletions google/cloud/trace_v1/gapic/trace_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
from google.protobuf import timestamp_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-trace",).version
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-trace",
).version


class TraceServiceClient(object):
Expand Down Expand Up @@ -165,7 +167,9 @@ def __init__(
self.transport = transport
else:
self.transport = trace_service_grpc_transport.TraceServiceGrpcTransport(
address=api_endpoint, channel=channel, credentials=credentials,
address=api_endpoint,
channel=channel,
credentials=credentials,
)

if client_info is None:
Expand Down Expand Up @@ -252,7 +256,10 @@ def patch_traces(
client_info=self._client_info,
)

request = trace_pb2.PatchTracesRequest(project_id=project_id, traces=traces,)
request = trace_pb2.PatchTracesRequest(
project_id=project_id,
traces=traces,
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down Expand Up @@ -497,7 +504,10 @@ def get_trace(
client_info=self._client_info,
)

request = trace_pb2.GetTraceRequest(project_id=project_id, trace_id=trace_id,)
request = trace_pb2.GetTraceRequest(
project_id=project_id,
trace_id=trace_id,
)
return self._inner_api_calls["get_trace"](
request, retry=retry, timeout=timeout, metadata=metadata
)
12 changes: 9 additions & 3 deletions google/cloud/trace_v1/proto/trace_pb2.py

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

6 changes: 2 additions & 4 deletions google/cloud/trace_v1/proto/trace_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,13 @@ class TraceServiceServicer(object):
"""

def ListTraces(self, request, context):
"""Returns of a list of traces that match the specified filter conditions.
"""
"""Returns of a list of traces that match the specified filter conditions."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")

def GetTrace(self, request, context):
"""Gets a single trace by its ID.
"""
"""Gets a single trace by its ID."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
Expand Down
16 changes: 12 additions & 4 deletions google/cloud/trace_v2/gapic/trace_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
from google.rpc import status_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-trace",).version
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-trace",
).version


class TraceServiceClient(object):
Expand Down Expand Up @@ -84,7 +86,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 @@ -184,7 +187,9 @@ def __init__(
self.transport = transport
else:
self.transport = trace_service_grpc_transport.TraceServiceGrpcTransport(
address=api_endpoint, channel=channel, credentials=credentials,
address=api_endpoint,
channel=channel,
credentials=credentials,
)

if client_info is None:
Expand Down Expand Up @@ -451,7 +456,10 @@ def batch_write_spans(
client_info=self._client_info,
)

request = tracing_pb2.BatchWriteSpansRequest(name=name, spans=spans,)
request = tracing_pb2.BatchWriteSpansRequest(
name=name,
spans=spans,
)
if metadata is None:
metadata = []
metadata = list(metadata)
Expand Down
26 changes: 20 additions & 6 deletions google/cloud/trace_v2/proto/trace_pb2.py

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

3 changes: 1 addition & 2 deletions google/cloud/trace_v2/proto/tracing_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def BatchWriteSpans(self, request, context):
raise NotImplementedError("Method not implemented!")

def CreateSpan(self, request, context):
"""Creates a new span.
"""
"""Creates a new span."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
Expand Down
13 changes: 9 additions & 4 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==22.3.0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"
Expand All @@ -40,7 +40,9 @@ def lint(session):
"""
session.install("flake8", BLACK_VERSION)
session.run(
"black", "--check", *BLACK_PATHS,
"black",
"--check",
*BLACK_PATHS,
)
session.run("flake8", "google", "tests")

Expand All @@ -57,7 +59,8 @@ def blacken(session):
"""
session.install(BLACK_VERSION)
session.run(
"black", *BLACK_PATHS,
"black",
*BLACK_PATHS,
)


Expand Down Expand Up @@ -120,7 +123,9 @@ def system(session):
# 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", ".")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
release_status = "Development Status :: 3 - Alpha"
dependencies = [
"google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0",
"google-cloud-core >= 1.0.3, < 2.0dev",
"google-cloud-core >= 1.0.3, < 3.0dev",
]
extras = {}

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/v1/test__gapic_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ def test_list_traces(self):


class _TracePbBase(object):
project = u"PROJECT"
trace_id = u"test_trace_id"
project = "PROJECT"
trace_id = "test_trace_id"
span_id = 1234
span_name = u"test_span_name"
span_name = "test_span_name"
start_time = "2017-06-24T00:12:50.369990Z"
end_time = "2017-06-24T00:13:39.633255Z"
start_seconds = 1498263170
Expand Down