Skip to content

Commit 7b967e7

Browse files
1 parent 2f9fc09 commit 7b967e7

File tree

15 files changed

+150
-7
lines changed

15 files changed

+150
-7
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.9"
15+
python-version: "3.8"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel

.kokoro/samples/python3.7/common.cfg

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
# Specify which tests to run
11+
env_vars: {
12+
key: "RUN_TESTS_SESSION"
13+
value: "py-3.7"
14+
}
15+
16+
# Declare build specific Cloud project.
17+
env_vars: {
18+
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19+
value: "python-docs-samples-tests-py37"
20+
}
21+
22+
env_vars: {
23+
key: "TRAMPOLINE_BUILD_FILE"
24+
value: "github/python-db-dtypes-pandas/.kokoro/test-samples.sh"
25+
}
26+
27+
# Configure the docker image for kokoro-trampoline.
28+
env_vars: {
29+
key: "TRAMPOLINE_IMAGE"
30+
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
31+
}
32+
33+
# Download secrets for samples
34+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
35+
36+
# Download trampoline resources.
37+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
38+
39+
# Use the trampoline script to run in docker.
40+
build_file: "python-db-dtypes-pandas/.kokoro/trampoline_v2.sh"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
7+
8+
env_vars: {
9+
key: "TRAMPOLINE_BUILD_FILE"
10+
value: "github/python-db-dtypes-pandas/.kokoro/test-samples-against-head.sh"
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "False"
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}

.kokoro/samples/python3.8/common.cfg

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
# Specify which tests to run
11+
env_vars: {
12+
key: "RUN_TESTS_SESSION"
13+
value: "py-3.8"
14+
}
15+
16+
# Declare build specific Cloud project.
17+
env_vars: {
18+
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19+
value: "python-docs-samples-tests-py38"
20+
}
21+
22+
env_vars: {
23+
key: "TRAMPOLINE_BUILD_FILE"
24+
value: "github/python-db-dtypes-pandas/.kokoro/test-samples.sh"
25+
}
26+
27+
# Configure the docker image for kokoro-trampoline.
28+
env_vars: {
29+
key: "TRAMPOLINE_IMAGE"
30+
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
31+
}
32+
33+
# Download secrets for samples
34+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
35+
36+
# Download trampoline resources.
37+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
38+
39+
# Use the trampoline script to run in docker.
40+
build_file: "python-db-dtypes-pandas/.kokoro/trampoline_v2.sh"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
7+
8+
env_vars: {
9+
key: "TRAMPOLINE_BUILD_FILE"
10+
value: "github/python-db-dtypes-pandas/.kokoro/test-samples-against-head.sh"
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "False"
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}

.kokoro/test-samples-impl.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export PYTHONUNBUFFERED=1
3333
env | grep KOKORO
3434

3535
# Install nox
36-
python3.9 -m pip install --upgrade --quiet nox virtualenv
36+
# `virtualenv==20.26.6` is added for Python 3.7 compatibility
37+
python3.9 -m pip install --upgrade --quiet nox virtualenv==20.26.6
3738

3839
# Use secrets acessor service account to get secrets
3940
if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then

CONTRIBUTING.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

2424
- The feature must work fully on the following CPython versions:
25-
3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows.
25+
3.7, 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows.
2626

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -195,11 +195,11 @@ configure them just like the System Tests.
195195

196196
# Run all tests in a folder
197197
$ cd samples/snippets
198-
$ nox -s py-3.9
198+
$ nox -s py-3.8
199199

200200
# Run a single sample test
201201
$ cd samples/snippets
202-
$ nox -s py-3.9 -- -k <name of test>
202+
$ nox -s py-3.8 -- -k <name of test>
203203

204204
********************************************
205205
Note About ``README`` as it pertains to PyPI
@@ -221,12 +221,16 @@ Supported Python Versions
221221

222222
We support:
223223

224+
- `Python 3.7`_
225+
- `Python 3.8`_
224226
- `Python 3.9`_
225227
- `Python 3.10`_
226228
- `Python 3.11`_
227229
- `Python 3.12`_
228230
- `Python 3.13`_
229231

232+
.. _Python 3.7: https://docs.python.org/3.7/
233+
.. _Python 3.8: https://docs.python.org/3.8/
230234
.. _Python 3.9: https://docs.python.org/3.9/
231235
.. _Python 3.10: https://docs.python.org/3.10/
232236
.. _Python 3.11: https://docs.python.org/3.11/

samples/snippets/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8989

9090
# DO NOT EDIT - automatically generated.
9191
# All versions used to test samples.
92-
ALL_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
92+
ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
9393

9494
# Any default versions that should be ignored.
9595
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]

scripts/readme-gen/templates/install_deps.tmpl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Install Dependencies
1212
.. _Python Development Environment Setup Guide:
1313
https://cloud.google.com/python/setup
1414

15-
#. Create a virtualenv. Samples are compatible with Python >= 3.9.
15+
#. Create a virtualenv. Samples are compatible with Python 3.7+.
1616

1717
.. code-block:: bash
1818

0 commit comments

Comments
 (0)