Skip to content

Commit dea6a1b

Browse files
authored
chore: add librarian integration for google-cloud-spanner (#16548)
Fixes #16490
1 parent d03de8a commit dea6a1b

File tree

155 files changed

+2574
-337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+2574
-337
lines changed

.kokoro/system.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ packages_with_system_tests=(
101101
"google-cloud-logging"
102102
"google-cloud-ndb"
103103
"google-cloud-pubsub"
104+
"google-cloud-spanner"
104105
"google-cloud-testutils"
105106
"sqlalchemy-bigquery"
106107
"pandas-gbq"

.librarian/config.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ libraries:
1616
# Allow releases for google-cloud-storage once this bug is fixed.
1717
- id: "google-cloud-storage"
1818
release_blocked: true
19-
# TODO(https://github.com/googleapis/google-cloud-python/issues/16490):
20-
# Allow generation for google-cloud-spanner once this bug is fixed.
21-
- id: "google-cloud-spanner"
22-
generate_blocked: true
2319
# TODO(https://github.com/googleapis/google-cloud-python/issues/16494):
2420
# Allow generation for google-cloud-bigtable once this bug is fixed.
2521
- id: "google-cloud-bigtable"

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

Lines changed: 1281 additions & 110 deletions
Large diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "spanner",
3+
"name_pretty": "Cloud Spanner",
4+
"product_documentation": "https://cloud.google.com/spanner/docs/",
5+
"client_documentation": "https://cloud.google.com/python/docs/reference/spanner/latest",
6+
"issue_tracker": "https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open",
7+
"release_level": "stable",
8+
"language": "python",
9+
"library_type": "GAPIC_COMBO",
10+
"repo": "googleapis/google-cloud-python",
11+
"distribution_name": "google-cloud-spanner",
12+
"api_id": "spanner.googleapis.com",
13+
"requires_billing": true,
14+
"default_version": "v1",
15+
"codeowner_team": "@googleapis/spanner-team",
16+
"api_shortname": "spanner",
17+
"api_description": "is the world's first fully managed relational database service \nto offer both strong consistency and horizontal scalability for \nmission-critical online transaction processing (OLTP) applications. With Cloud \nSpanner you enjoy all the traditional benefits of a relational database; but \nunlike any other relational database service, Cloud Spanner scales horizontally \nto hundreds or thousands of servers to handle the biggest transactional \nworkloads."
18+
}

.librarian/state.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3246,7 +3246,7 @@ libraries:
32463246
tag_format: '{id}-v{version}'
32473247
- id: google-cloud-spanner
32483248
version: 3.64.0
3249-
last_generated_commit: 64f1dbf504bab7b58ed96a539a5b26a7ebfc65c7
3249+
last_generated_commit: 3e09ac03bab9dba5b8800248cf10190219938a26
32503250
apis:
32513251
- path: google/spanner/admin/instance/v1
32523252
service_config: spanner.yaml
@@ -3279,9 +3279,11 @@ libraries:
32793279
- ^packages/google-cloud-spanner/docs/spanner_v1/spanner.rst
32803280
- ^packages/google-cloud-spanner/docs/spanner_v1/services_.rst
32813281
- ^packages/google-cloud-spanner/docs/spanner_v1/types_.rst
3282+
- ^packages/google-cloud-spanner/docs/spanner_admin_database_v1/database_admin.rst
32823283
- ^packages/google-cloud-spanner/docs/spanner_admin_database_v1/spanner_admin_database.rst
32833284
- ^packages/google-cloud-spanner/docs/spanner_admin_database_v1/services_.rst
32843285
- ^packages/google-cloud-spanner/docs/spanner_admin_database_v1/types_.rst
3286+
- ^packages/google-cloud-spanner/docs/spanner_admin_instance_v1/instance_admin.rst
32853287
- ^packages/google-cloud-spanner/docs/spanner_admin_instance_v1/spanner_admin_instance.rst
32863288
- ^packages/google-cloud-spanner/docs/spanner_admin_instance_v1/services_.rst
32873289
- ^packages/google-cloud-spanner/docs/spanner_admin_instance_v1/types_.rst
@@ -3306,10 +3308,22 @@ libraries:
33063308
- ^packages/google-cloud-spanner/google/cloud/spanner_admin_instance_v1/py.typed
33073309
- ^packages/google-cloud-spanner/google/cloud/spanner_admin_instance_v1/services
33083310
- ^packages/google-cloud-spanner/google/cloud/spanner_admin_instance_v1/types
3311+
- ^packages/google-cloud-spanner/google/cloud/spanner_admin_database/__init__.py
3312+
- ^packages/google-cloud-spanner/google/cloud/spanner_admin_database/gapic_version.py
3313+
- ^packages/google-cloud-spanner/google/cloud/spanner_admin_database/py.typed
3314+
- ^packages/google-cloud-spanner/google/cloud/spanner_admin_instance/__init__.py
3315+
- ^packages/google-cloud-spanner/google/cloud/spanner_admin_instance/gapic_version.py
3316+
- ^packages/google-cloud-spanner/google/cloud/spanner_admin_instance/py.typed
3317+
- ^packages/google-cloud-spanner/google/cloud/spanner/__init__.py
3318+
- ^packages/google-cloud-spanner/google/cloud/spanner/gapic_version.py
3319+
- ^packages/google-cloud-spanner/google/cloud/spanner/py.typed
33093320
- ^packages/google-cloud-spanner/testing
33103321
- ^packages/google-cloud-spanner/tests/__init__.py
33113322
- ^packages/google-cloud-spanner/tests/unit/__init__.py
3312-
- ^packages/google-cloud-spanner/tests/unit/gapic
3323+
- ^packages/google-cloud-spanner/tests/unit/gapic/spanner_admin_database_v1
3324+
- ^packages/google-cloud-spanner/tests/unit/gapic/spanner_admin_instance_v1
3325+
- ^packages/google-cloud-spanner/tests/unit/gapic/spanner_v1
3326+
- ^packages/google-cloud-spanner/tests/unit/gapic/__init__.py
33133327
- ^packages/google-cloud-spanner/samples/generated_samples
33143328
tag_format: '{id}-v{version}'
33153329
- id: google-cloud-speech
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
show_missing = True
6+
omit =
7+
google/cloud/spanner/__init__.py
8+
google/cloud/spanner/gapic_version.py
9+
exclude_lines =
10+
# Re-enable the standard pragma
11+
pragma: NO COVER
12+
# Ignore debug-only repr
13+
def __repr__

packages/google-cloud-spanner/.flake8

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2024 Google LLC
2+
# Copyright 2025 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
65
# you may not use this file except in compliance with the License.
76
# You may obtain a copy of the License at
87
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
109
#
1110
# Unless required by applicable law or agreed to in writing, software
1211
# distributed under the License is distributed on an "AS IS" BASIS,
1312
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
16-
17-
# Generated by synthtool. DO NOT EDIT!
15+
#
1816
[flake8]
17+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
18+
# Resolve flake8 lint issues
1919
ignore = E203, E231, E266, E501, W503
2020
exclude =
21-
# Exclude generated code.
22-
**/proto/**
21+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
22+
# Ensure that generated code passes flake8 lint
2323
**/gapic/**
2424
**/services/**
2525
**/types/**
26+
# Exclude Protobuf gencode
2627
*_pb2.py
2728

2829
# Standard linting exemptions.

packages/google-cloud-spanner/.repo-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
"default_version": "v1",
1515
"codeowner_team": "@googleapis/spanner-team",
1616
"api_shortname": "spanner",
17-
"api_description": "is a fully managed, mission-critical, \nrelational database service that offers transactional consistency at global scale, \nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \nfor high availability.\n\nBe sure to activate the Cloud Spanner API on the Developer's Console to\nuse Cloud Spanner from your project."
17+
"api_description": "is the world's first fully managed relational database service \nto offer both strong consistency and horizontal scalability for \nmission-critical online transaction processing (OLTP) applications. With Cloud \nSpanner you enjoy all the traditional benefits of a relational database; but \nunlike any other relational database service, Cloud Spanner scales horizontally \nto hundreds or thousands of servers to handle the biggest transactional \nworkloads."
1818
}
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2024 Google LLC
2+
# Copyright 2025 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
65
# you may not use this file except in compliance with the License.
76
# You may obtain a copy of the License at
87
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
109
#
1110
# Unless required by applicable law or agreed to in writing, software
1211
# distributed under the License is distributed on an "AS IS" BASIS,
1312
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
16-
17-
# Generated by synthtool. DO NOT EDIT!
15+
#
1816
include README.rst LICENSE
19-
recursive-include google *.json *.proto py.typed
17+
recursive-include google *.py *.pyi *.json *.proto py.typed
2018
recursive-include tests *
2119
global-exclude *.py[co]
2220
global-exclude __pycache__
23-
24-
# Exclude scripts for samples readmegen
25-
prune scripts/readme-gen

0 commit comments

Comments
 (0)