Skip to content

Commit 6b88da7

Browse files
committed
chore: apply monorepo cleanup to google-cloud-spanner
1 parent 58d7bd3 commit 6b88da7

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

packages/google-cloud-spanner/docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For a list of all ``google-cloud-spanner`` releases:
5555
.. toctree::
5656
:maxdepth: 2
5757

58-
changelog
58+
CHANGELOG
5959

6060
.. toctree::
6161
:hidden:

packages/google-cloud-spanner/noxfile.py

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,17 @@
4242
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.14"]
4343

4444
UNIT_TEST_PYTHON_VERSIONS: List[str] = [
45+
"3.8",
4546
"3.9",
4647
"3.10",
4748
"3.11",
4849
"3.12",
4950
"3.13",
5051
"3.14",
5152
]
53+
54+
ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS)
55+
ALL_PYTHON.extend(["3.7"])
5256
UNIT_TEST_STANDARD_DEPENDENCIES = [
5357
"mock",
5458
"asyncmock",
@@ -95,6 +99,9 @@
9599
"docs",
96100
"docfx",
97101
"format",
102+
"prerelease_deps",
103+
"core_deps_from_source",
104+
"mypy",
98105
]
99106

100107
# Error if a python version is missing
@@ -193,7 +200,7 @@ def install_unittest_dependencies(session, *constraints):
193200
session.run("pip", "list")
194201

195202

196-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
203+
@nox.session(python=ALL_PYTHON)
197204
@nox.parametrize(
198205
"protobuf_implementation",
199206
["python", "upb", "cpp"],
@@ -512,6 +519,14 @@ def prerelease_deps(session, protobuf_implementation, database_dialect):
512519
):
513520
session.skip("cpp implementation is not supported in python 3.11+")
514521

522+
# Sanity check: Only run tests if credentials or emulator are set.
523+
if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", "") and not os.environ.get(
524+
"SPANNER_EMULATOR_HOST", ""
525+
):
526+
session.skip(
527+
"Credentials or emulator host must be set via environment variable"
528+
)
529+
515530
# Install all dependencies
516531
session.install("-e", ".[all, tests, tracing]")
517532
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
@@ -621,3 +636,19 @@ def prerelease_deps(session, protobuf_implementation, database_dialect):
621636
"SKIP_BACKUP_TESTS": "true",
622637
},
623638
)
639+
640+
@nox.session(python=DEFAULT_PYTHON_VERSION)
641+
def mypy(session):
642+
"""Run the type checker."""
643+
# TODO(https://github.com/googleapis/google-cloud-python/issues/16014):
644+
# Add mypy tests
645+
session.skip("mypy tests are not yet supported")
646+
647+
@nox.session(python=DEFAULT_PYTHON_VERSION)
648+
def core_deps_from_source(session):
649+
"""Run all tests with core dependencies installed from source
650+
rather than pulling the dependencies from PyPI.
651+
"""
652+
# TODO(https://github.com/googleapis/google-cloud-python/issues/16014):
653+
# Add core deps from source tests
654+
session.skip("Core deps from source tests are not yet supported")

packages/google-cloud-spanner/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"License :: OSI Approved :: Apache Software License",
8888
"Programming Language :: Python",
8989
"Programming Language :: Python :: 3",
90+
"Programming Language :: Python :: 3.8",
9091
"Programming Language :: Python :: 3.9",
9192
"Programming Language :: Python :: 3.10",
9293
"Programming Language :: Python :: 3.11",
@@ -99,7 +100,7 @@
99100
packages=packages,
100101
install_requires=dependencies,
101102
extras_require=extras,
102-
python_requires=">=3.9",
103+
python_requires=">=3.8",
103104
include_package_data=True,
104105
zip_safe=False,
105106
)

0 commit comments

Comments
 (0)