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

build(python): fix docs and docfx builds #1063

6 changes: 3 additions & 3 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Google LLC
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:346ab2efb51649c5dde7756cbbdc60dd394852ba83b9bbffc292a63549f33c17
# created: 2023-12-14T22:17:57.611773021Z
digest: sha256:5ea6d0ab82c956b50962f91d94e206d3921537ae5fe1549ec5326381d8905cfa
# created: 2024-01-15T16:32:08.142785673Z
6 changes: 3 additions & 3 deletions .kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ jeepney==0.8.0 \
# via
# keyring
# secretstorage
jinja2==3.1.2 \
--hash=sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 \
--hash=sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61
jinja2==3.1.3 \
--hash=sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa \
--hash=sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90
# via gcp-releasetool
keyring==24.2.0 \
--hash=sha256:4901caaf597bfd3bbd78c9a0c7c4c29fcd8310dab2cffefe749e916b6527acd6 \
Expand Down
30 changes: 25 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,19 @@ def mypy(session):
session.install("-e", ".[all]")
session.install(MYPY_VERSION)

# Just install the type info directly, since "mypy --install-types" might
# require an additional pass.
session.install("types-protobuf", "types-setuptools")

# Version 2.1.1 of google-api-core version is the first type-checked release.
# Version 2.2.0 of google-cloud-core version is the first type-checked release.
session.install(
"google-api-core[grpc]>=2.1.1",
"google-cloud-core>=2.2.0",
)

# Just install the type info directly, since "mypy --install-types" might
# require an additional pass.
# Exclude types-protobuf==4.24.0.20240106
# See https://github.com/python/typeshed/issues/11254
session.install("types-protobuf!=4.24.0.20240106", "types-setuptools")

# TODO: Only check the hand-written layer, the generated code does not pass
# mypy checks yet.
# https://github.com/googleapis/gapic-generator-python/issues/1092
Expand Down Expand Up @@ -334,7 +336,16 @@ def docs(session):

session.install("-e", ".")
session.install(
"sphinx==4.0.1",
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
"sphinxcontrib-applehelp==1.0.4",
"sphinxcontrib-devhelp==1.0.2",
"sphinxcontrib-htmlhelp==2.0.1",
"sphinxcontrib-qthelp==1.0.3",
"sphinxcontrib-serializinghtml==1.1.5",
"sphinx==4.5.0",
"alabaster",
"recommonmark",
)
Expand All @@ -360,6 +371,15 @@ def docfx(session):

session.install("-e", ".")
session.install(
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
"sphinxcontrib-applehelp==1.0.4",
"sphinxcontrib-devhelp==1.0.2",
"sphinxcontrib-htmlhelp==2.0.1",
"sphinxcontrib-qthelp==1.0.3",
"sphinxcontrib-serializinghtml==1.1.5",
"gcp-sphinx-docfx-yaml",
"alabaster",
"recommonmark",
Expand Down
10 changes: 6 additions & 4 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,17 +366,19 @@ def mypy(session):
session.install("-e", ".[all]")
session.install(MYPY_VERSION)

# Just install the type info directly, since "mypy --install-types" might
# require an additional pass.
session.install("types-protobuf", "types-setuptools")

# Version 2.1.1 of google-api-core version is the first type-checked release.
# Version 2.2.0 of google-cloud-core version is the first type-checked release.
session.install(
"google-api-core[grpc]>=2.1.1",
"google-cloud-core>=2.2.0",
)

# Just install the type info directly, since "mypy --install-types" might
# require an additional pass.
# Exclude types-protobuf==4.24.0.20240106
# See https://github.com/python/typeshed/issues/11254
session.install("types-protobuf!=4.24.0.20240106", "types-setuptools")

# TODO: Only check the hand-written layer, the generated code does not pass
# mypy checks yet.
# https://github.com/googleapis/gapic-generator-python/issues/1092
Expand Down