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

Grafeas: Add 'client_options' support, update list method docstrings (via synth). #8510

Merged
merged 4 commits into from Jul 13, 2019

Conversation

yoshi-automation
Copy link
Contributor

This PR was generated using Autosynth. 🌈

Here's the log from Synthtool:

synthtool > Executing /tmpfs/src/git/autosynth/working_repo/grafeas/synth.py.
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:45263333b058a4b3c26a8b7680a2710f43eae3d250f791a6cb66423991dcb2df
Status: Image is up to date for googleapis/artman:latest
synthtool > Cloning googleapis.
synthtool > Running generator for grafeas/artman_grafeas_v1.yaml.
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1.
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/attestation.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/attestation.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/provenance.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/provenance.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/deployment.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/deployment.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/vulnerability.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/vulnerability.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/discovery.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/discovery.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/common.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/common.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/image.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/image.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/build.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/build.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/cvss.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/cvss.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/package.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/package.proto
synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/grafeas/v1/grafeas.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto/grafeas.proto
synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/grafeas-v1/google/cloud/grafeas_v1/proto.
synthtool > Replaced 'from grafeas\\.v1( import \\w*_pb2)' in grafeas/grafeas_v1/types.py.
synthtool > Replaced 'from grafeas\\.v1( import \\w*_pb2)' in grafeas/grafeas_v1/gapic/grafeas_client.py.
synthtool > Replaced 'from grafeas\\.v1( import \\w*_pb2)' in grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py.
synthtool > Replaced 'from grafeas\\.v1( import \\w*_pb2)' in tests/unit/gapic/v1/test_grafeas_client_v1.py.
synthtool > Replaced 'from grafeas_v1\\.proto( import \\w*_pb2)' in grafeas/grafeas_v1/proto/grafeas_pb2.py.
synthtool > Replaced 'from grafeas_v1\\.proto( import \\w*_pb2)' in grafeas/grafeas_v1/proto/discovery_pb2.py.
synthtool > Replaced 'from grafeas_v1\\.proto( import \\w*_pb2)' in grafeas/grafeas_v1/proto/vulnerability_pb2.py.
synthtool > Replaced 'from grafeas_v1\\.proto( import \\w*_pb2)' in grafeas/grafeas_v1/proto/build_pb2.py.
synthtool > Replaced 'from grafeas_v1\\.proto( import \\w*_pb2)' in grafeas/grafeas_v1/proto/attestation_pb2.py.
synthtool > Replaced 'from grafeas_v1\\.proto' in grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py.
synthtool > Replaced 'google-cloud-grafeas' in grafeas/grafeas_v1/gapic/grafeas_client.py.
synthtool > Replaced '(\\s+)__doc__ = \\"\\"\\"Attributes:' in grafeas/grafeas_v1/proto/vulnerability_pb2.py.
synthtool > Replaced 'Container Analysis' in docs/gapic/v1/api.rst.
synthtool > Replaced 'Container Analysis' in docs/gapic/v1/types.rst.
synthtool > Replaced '    SERVICE_ADDRESS = \'containeranalysis\\.googleapis\\.com:443\'\n    \\"\\"\\"The default address of the service\\.\\"\\"\\"' in grafeas/grafeas_v1/gapic/grafeas_client.py.
synthtool > No replacements made in grafeas/**/grafeas_client.py for pattern     def __init__\(self, transport=None, channel=None, credentials=None,
            client_config=None, client_info=None\):, maybe replacement is not longer needed?
synthtool > Replaced 'Union\\[~\\.GrafeasGrpcTransport,\n                    Callable\\[\\[~\\.Credentials, type], ~\\.GrafeasGrpcTransport\\]' in grafeas/grafeas_v1/gapic/grafeas_client.py.
synthtool > Replaced '            channel \\(grpc\\.Channel\\): DEPRECATED\\. A ``Channel`` instance\n                through which to make calls\\. This argument is mutually exclusive\n                with ``credentials``; providing both will raise an exception\\.\n            credentials \\(google\\.auth\\.credentials\\.Credentials\\): The\n                authorization credentials to attach to requests\\. These\n                credentials identify this application to the service\\. If none\n                are specified, the client will attempt to ascertain the\n                credentials from the environment\\.\n                This argument is mutually exclusive with providing a\n                transport instance to ``transport``; doing so will raise\n                an exception\\.' in grafeas/grafeas_v1/gapic/grafeas_client.py.
synthtool > No replacements made in grafeas/**/grafeas_client.py for pattern if channel:
            warnings\.warn\('The `channel` argument is deprecated; use '
                          '`transport` instead\.',
                          PendingDeprecationWarning, stacklevel=2\)

        \# Instantiate the transport\.
        \# The transport is responsible for handling serialization and
        \# deserialization and actually sending data to the service\.
        if transport:
            if callable\(transport\):
                self\.transport = transport\(
                    credentials=credentials,
                    default_class=grafeas_grpc_transport\.GrafeasGrpcTransport,
                \)
            else:
                if credentials:
                    raise ValueError\(
                        'Received both a transport instance and '
                        'credentials; these are mutually exclusive\.'
                    \)
                self\.transport = transport
        else:
            self\.transport = grafeas_grpc_transport\.GrafeasGrpcTransport\(
                address=self\.SERVICE_ADDRESS,
                channel=channel,
                credentials=credentials,
            \), maybe replacement is not longer needed?
synthtool > Replaced '        Example:\n            >>> from grafeas import grafeas_v1\n            >>>\n            >>> client = grafeas_v1\\.GrafeasClient\\(\\)' in grafeas/grafeas_v1/gapic/grafeas_client.py.
synthtool > Replaced '    @classmethod\n    def from_service_account_file\\(cls, filename, \\*args, \\*\\*kwargs\\):\n        """Creates an instance of this client using the provided credentials\n        file\\.\n\n        Args:\n            filename \\(str\\): The path to the service account private key json\n                file\\.\n            args: Additional arguments to pass to the constructor\\.\n            kwargs: Additional arguments to pass to the constructor\\.\n\n        Returns:\n            GrafeasClient: The constructed client\\.\n        """\n        credentials = service_account\\.Credentials\\.from_service_account_file\\(\n            filename\\)\n        kwargs\\[\'credentials\'\\] = credentials\n        return cls\\(\\*args, \\*\\*kwargs\\)\n\n    from_service_account_json = from_service_account_file' in grafeas/grafeas_v1/gapic/grafeas_client.py.
synthtool > Replaced "    \\# The scopes needed to make gRPC calls to all of the methods defined\n    \\# in this service\\.\n    _OAUTH_SCOPES = \\(\n        'https://www\\.googleapis\\.com/auth/cloud-platform',\n    \\)" in grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py.
synthtool > Replaced "    def __init__\\(self, channel=None, credentials=None,\n                 address='containeranalysis\\.googleapis\\.com:443'\\):" in grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py.
synthtool > Replaced '        \\# Create the channel\\.\n        if channel is None:\n            channel = self\\.create_channel\\(\n                address=address,\n                credentials=credentials,\n            \\)\n' in grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py.
synthtool > Replaced "    def create_channel\\(\n                cls,\n                address='containeranalysis\\.googleapis\\.com:443',\n                credentials=None,\n                \\*\\*kwargs\\):" in grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py.
synthtool > Replaced '        Args:\n            address \\(str\\): The host for the channel to use\\.\n            credentials \\(~\\.Credentials\\): The\n                authorization credentials to attach to requests\\. These\n                credentials identify this application to the service\\. If\n                none are specified, the client will attempt to ascertain\n                the credentials from the environment\\.' in grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py.
synthtool > Replaced '        return google\\.api_core\\.grpc_helpers\\.create_channel\\(\n            address,\n            credentials=credentials,\n            scopes=cls\\._OAUTH_SCOPES,\n            \\*\\*kwargs\n        \\)' in grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py.
synthtool > Replaced '        \\"\\"\\"Instantiate the transport class\\.\n\n        Args:\n            channel \\(grpc\\.Channel\\): A ``Channel`` instance through\n                which to make calls\\. This argument is mutually exclusive\n                with ``credentials``; providing both will raise an exception\\.\n            credentials \\(google\\.auth\\.credentials\\.Credentials\\): The\n                authorization credentials to attach to requests\\. These\n                credentials identify this application to the service\\. If none\n                are specified, the client will attempt to ascertain the\n                credentials from the environment\\.\n            address \\(str\\): The address where the service is hosted\\.' in grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py.
synthtool > Replaced 'from grafeas\\.grafeas_v1\\.proto import grafeas_pb2' in tests/unit/gapic/v1/test_grafeas_client_v1.py.
synthtool > Replaced '(\\s+)client = grafeas_v1\\.GrafeasClient\\(\\)' in tests/unit/gapic/v1/test_grafeas_client_v1.py.
.coveragerc
.flake8
MANIFEST.in
noxfile.py.j2
setup.cfg
Running session blacken
Creating virtualenv using python3.6 in .nox/blacken
pip install black
black grafeas tests docs
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/__init__.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/gapic/enums.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/gapic/grafeas_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/attestation_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/build_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/attestation_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/common_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/build_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/cvss_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/common_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/deployment_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/deployment_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/discovery_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/discovery_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/image_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/cvss_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/package_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/image_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/provenance_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/package_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/types.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/vulnerability_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/tests/unit/gapic/v1/test_grafeas_client_v1.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/provenance_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/grafeas/grafeas/grafeas_v1/proto/grafeas_pb2.py
All done! ✨ 🍰 ✨
30 files reformatted, 5 files left unchanged.
Session blacken was successful.
synthtool > Cleaned up 2 temporary directories.
synthtool > Wrote metadata to synth.metadata.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 28, 2019
@tseaver tseaver changed the title [CHANGE ME] Re-generated grafeas to pick up changes in the API or client library generator. Grafeas: Add 'client_options' support, update list method docstrings (via synth). Jun 28, 2019
@tseaver tseaver added do not merge Indicates a pull request not ready for merge, due to either quality or timing. needs work This is a pull request that needs a little love. labels Jun 28, 2019
@tseaver
Copy link
Contributor

tseaver commented Jun 28, 2019

@busunkim96 Code generation seems pretty broken here.

@busunkim96 busunkim96 self-assigned this Jun 28, 2019
@busunkim96 busunkim96 force-pushed the autosynth-grafeas branch 2 times, most recently from 274bbb3 to 82914e5 Compare July 12, 2019 23:31
@busunkim96 busunkim96 removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. needs work This is a pull request that needs a little love. labels Jul 12, 2019
@busunkim96 busunkim96 merged commit ae2e705 into master Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. codegen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants