Skip to content

Commit 978de98

Browse files
authored
chore: generate spanner (googleapis#17406)
Fixes googleapis#17281 Fixes googleapis#17373 `docker run -u $(id -u):$(id -g) -v .:/repo -v ~/.cache:/.cache -w /repo docker.io/library/librarian-python:<Latest SHA> generate -v google-cloud-spanner` produced no diff with these changes. This PR is needed to update the post processing following googleapis#17344 which added handwritten changes on top of the auto-generated files `noxfile.py` and `setup.py` for `google-cloud-spanner`.
1 parent 1255547 commit 978de98

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

.librarian/generator-input/client-post-processing/spanner-integration.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,17 @@ replacements:
146146
"google-cloud-monitoring >= 2.16.0",
147147
"mmh3 >= 4.1.0",
148148
]
149-
extras = {"libcst": "libcst >= 0.2.5"}
149+
extras = {
150+
"libcst": "libcst >= 0.2.5",
151+
"test": [
152+
"pytest",
153+
"mock",
154+
"asyncmock",
155+
"pytest-cov",
156+
"pytest-asyncio",
157+
"pytest-xdist",
158+
],
159+
}
150160
count: 1
151161
- paths: [packages/google-cloud-spanner/docs/index.rst]
152162
before: '(?s)API Reference\n-------------.*'
@@ -647,6 +657,7 @@ replacements:
647657
"pytest",
648658
"pytest-cov",
649659
"pytest-asyncio",
660+
"pytest-xdist",
650661
]
651662
MOCK_SERVER_ADDITIONAL_DEPENDENCIES = [
652663
"google-cloud-testutils",
@@ -844,6 +855,8 @@ replacements:
844855
# Run py.test against the unit tests.
845856
args = [
846857
"py.test",
858+
"-n",
859+
"auto",
847860
"-s",
848861
f"--junitxml=unit_{session.python}_sponge_log.xml",
849862
"--cov=google",
@@ -1358,7 +1371,6 @@ replacements:
13581371
def mypy(session):
13591372
"""Run the type checker."""
13601373
session.skip("Mypy is not yet supported")
1361-
13621374
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2579):
13631375
# use the latest version of mypy
13641376
session.install(
@@ -1401,6 +1413,25 @@ replacements:
14011413
libcst==0.2.5
14021414
googleapis-common-protos==1.60.0
14031415
count: 1
1416+
- paths: [
1417+
packages/google-cloud-spanner/noxfile.py
1418+
]
1419+
before: |
1420+
session.install\(\*dep_paths, "--no-deps", "--ignore-installed"\)
1421+
[\s\S]*?session.run\(\s+"py.test",\s+"tests/unit",
1422+
after: |
1423+
session.install(*dep_paths, "--no-deps", "--ignore-installed")
1424+
session.install("pytest-xdist")
1425+
print(
1426+
f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}"
1427+
)
1428+
1429+
session.run(
1430+
"py.test",
1431+
"-n",
1432+
"auto",
1433+
"tests/unit",
1434+
count: 1
14041435
- paths: [packages/google-cloud-spanner/testing/constraints-3.10.txt]
14051436
before: 'grpcio==1.59.0\n(?!grpcio-status)'
14061437
after: |

0 commit comments

Comments
 (0)