diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index ba7b2f7..108063d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:3728d8fd14daa46a96d04ce61c6451a3ac864dc48fb71eecbb4411f4a95618d4 + digest: sha256:4ee57a76a176ede9087c14330c625a71553cf9c72828b2c0ca12f5338171ba60 diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg index 2cadd8d..312160b 100644 --- a/.kokoro/docs/common.cfg +++ b/.kokoro/docs/common.cfg @@ -30,6 +30,7 @@ env_vars: { env_vars: { key: "V2_STAGING_BUCKET" + # Push google cloud library docs to the Cloud RAD bucket `docs-staging-v2` value: "docs-staging-v2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index e2d8cb6..469b850 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +### [1.2.1](https://www.github.com/googleapis/python-source-context/compare/v1.2.0...v1.2.1) (2021-11-01) + + +### Bug Fixes + +* **deps:** drop packaging dependency ([5234b6b](https://www.github.com/googleapis/python-source-context/commit/5234b6bd2e42a1b7cd6bcb4a0055801a81c928ca)) +* **deps:** require google-api-core >= 1.28.0 ([5234b6b](https://www.github.com/googleapis/python-source-context/commit/5234b6bd2e42a1b7cd6bcb4a0055801a81c928ca)) + + +### Documentation + +* list oneofs in docstring ([5234b6b](https://www.github.com/googleapis/python-source-context/commit/5234b6bd2e42a1b7cd6bcb4a0055801a81c928ca)) + ## [1.2.0](https://www.github.com/googleapis/python-source-context/compare/v1.1.0...v1.2.0) (2021-10-18) diff --git a/docs/index.rst b/docs/index.rst index 6a3ecc3..d017529 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,12 +11,13 @@ API Reference source_context_v1/services source_context_v1/types + Changelog --------- For a list of all ``google-cloud-source-context`` releases: .. toctree:: - :maxdepth: 2 + :maxdepth: 2 - changelog + changelog diff --git a/google/cloud/source_context_v1/types/source_context.py b/google/cloud/source_context_v1/types/source_context.py index 5bec072..7edbc9c 100644 --- a/google/cloud/source_context_v1/types/source_context.py +++ b/google/cloud/source_context_v1/types/source_context.py @@ -38,19 +38,30 @@ class SourceContext(proto.Message): SourceContext together with a path point to a unique revision of a single file or directory. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: cloud_repo (google.cloud.source_context_v1.types.CloudRepoSourceContext): A SourceContext referring to a revision in a cloud repo. + This field is a member of `oneof`_ ``context``. cloud_workspace (google.cloud.source_context_v1.types.CloudWorkspaceSourceContext): A SourceContext referring to a snapshot in a cloud workspace. + This field is a member of `oneof`_ ``context``. gerrit (google.cloud.source_context_v1.types.GerritSourceContext): A SourceContext referring to a Gerrit project. + This field is a member of `oneof`_ ``context``. git (google.cloud.source_context_v1.types.GitSourceContext): A SourceContext referring to any third party Git repo (e.g. GitHub). + This field is a member of `oneof`_ ``context``. """ cloud_repo = proto.Field( @@ -107,15 +118,25 @@ class CloudRepoSourceContext(proto.Message): r"""A CloudRepoSourceContext denotes a particular revision in a cloud repo (a repo hosted by the Google Cloud Platform). + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: repo_id (google.cloud.source_context_v1.types.RepoId): The ID of the repo. revision_id (str): A revision ID. + This field is a member of `oneof`_ ``revision``. alias_name (str): The name of an alias (branch, tag, etc.). + This field is a member of `oneof`_ ``revision``. alias_context (google.cloud.source_context_v1.types.AliasContext): An alias, which may be a branch or tag. + This field is a member of `oneof`_ ``revision``. """ repo_id = proto.Field(proto.MESSAGE, number=1, message="RepoId",) @@ -145,6 +166,13 @@ class CloudWorkspaceSourceContext(proto.Message): class GerritSourceContext(proto.Message): r"""A SourceContext referring to a Gerrit project. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: host_uri (str): The URI of a running Gerrit instance. @@ -155,10 +183,13 @@ class GerritSourceContext(proto.Message): hostURI/project. revision_id (str): A revision (commit) ID. + This field is a member of `oneof`_ ``revision``. alias_name (str): The name of an alias (branch, tag, etc.). + This field is a member of `oneof`_ ``revision``. alias_context (google.cloud.source_context_v1.types.AliasContext): An alias, which may be a branch or tag. + This field is a member of `oneof`_ ``revision``. """ host_uri = proto.Field(proto.STRING, number=1,) @@ -189,13 +220,22 @@ class GitSourceContext(proto.Message): class RepoId(proto.Message): r"""A unique identifier for a cloud repo. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: project_repo_id (google.cloud.source_context_v1.types.ProjectRepoId): A combination of a project ID and a repo name. + This field is a member of `oneof`_ ``id``. uid (str): A server-assigned, globally unique identifier. + This field is a member of `oneof`_ ``id``. """ project_repo_id = proto.Field( diff --git a/noxfile.py b/noxfile.py index 2bb4cf7..2a2001c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -101,7 +101,7 @@ def default(session): "py.test", "--quiet", f"--junitxml=unit_{session.python}_sponge_log.xml", - "--cov=google/cloud", + "--cov=google", "--cov=tests/unit", "--cov-append", "--cov-config=.coveragerc", diff --git a/setup.py b/setup.py index b5d3ac7..51b14f8 100644 --- a/setup.py +++ b/setup.py @@ -22,16 +22,15 @@ name = "google-cloud-source-context" description = "Python client for Source Context" -version = "1.2.0" +version = "1.2.1" release_status = "Development Status :: 5 - Production/Stable" url = "https://github.com/googleapis/python-source-context" dependencies = [ # NOTE: Maintainers, please do not require google-api-core>=2.x.x # Until this issue is closed # https://github.com/googleapis/google-cloud-python/issues/10566 - "google-api-core[grpc] >= 1.26.0, <3.0.0dev", + "google-api-core[grpc] >= 1.28.0, <3.0.0dev", "proto-plus >= 1.15.0", - "packaging >= 14.3", ] package_root = os.path.abspath(os.path.dirname(__file__)) diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index 3f7f11e..1e3ec8b 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -4,7 +4,5 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.26.0 +google-api-core==1.28.0 proto-plus==1.15.0 -packaging==14.3 -google-auth==1.24.0 # TODO: remove when google-auth>=1.25.0 is transitively required through google-api-core \ No newline at end of file