Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a2b81be

Browse filesBrowse files
chore: fix kokoro config for samples (googleapis#426)
Source-Link: googleapis/synthtool@dd05f9d Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:aea14a583128771ae8aefa364e1652f3c56070168ef31beb203534222d842b8b
1 parent a1c52be commit a2b81be
Copy full SHA for a2b81be

File tree

Expand file treeCollapse file tree

8 files changed

+35
-7
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+35
-7
lines changed

‎.github/.OwlBot.lock.yaml

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
docker:
22
image: gcr.io/repo-automation-bots/owlbot-python:latest
3-
digest: sha256:5ff7446edeaede81c3ed58b23a4e76a5403fba1350ce28478045657303b6479d
3+
digest: sha256:aea14a583128771ae8aefa364e1652f3c56070168ef31beb203534222d842b8b

‎.kokoro/samples/python3.6/periodic-head.cfg

Copy file name to clipboardExpand all lines: .kokoro/samples/python3.6/periodic-head.cfg
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ env_vars: {
77

88
env_vars: {
99
key: "TRAMPOLINE_BUILD_FILE"
10-
value: "github/python-pubsub/.kokoro/test-samples-against-head.sh"
10+
value: "github/python-spanner/.kokoro/test-samples-against-head.sh"
1111
}

‎.kokoro/samples/python3.7/periodic-head.cfg

Copy file name to clipboardExpand all lines: .kokoro/samples/python3.7/periodic-head.cfg
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ env_vars: {
77

88
env_vars: {
99
key: "TRAMPOLINE_BUILD_FILE"
10-
value: "github/python-pubsub/.kokoro/test-samples-against-head.sh"
10+
value: "github/python-spanner/.kokoro/test-samples-against-head.sh"
1111
}

‎.kokoro/samples/python3.8/periodic-head.cfg

Copy file name to clipboardExpand all lines: .kokoro/samples/python3.8/periodic-head.cfg
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ env_vars: {
77

88
env_vars: {
99
key: "TRAMPOLINE_BUILD_FILE"
10-
value: "github/python-pubsub/.kokoro/test-samples-against-head.sh"
10+
value: "github/python-spanner/.kokoro/test-samples-against-head.sh"
1111
}

‎.kokoro/samples/python3.9/periodic-head.cfg

Copy file name to clipboardExpand all lines: .kokoro/samples/python3.9/periodic-head.cfg
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ env_vars: {
77

88
env_vars: {
99
key: "TRAMPOLINE_BUILD_FILE"
10-
value: "github/python-pubsub/.kokoro/test-samples-against-head.sh"
10+
value: "github/python-spanner/.kokoro/test-samples-against-head.sh"
1111
}

‎CONTRIBUTING.rst

Copy file name to clipboardExpand all lines: CONTRIBUTING.rst
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,30 @@ Build the docs via:
177177

178178
$ nox -s docs
179179

180+
*************************
181+
Samples and code snippets
182+
*************************
183+
184+
Code samples and snippets live in the `samples/` catalogue. Feel free to
185+
provide more examples, but make sure to write tests for those examples.
186+
Each folder containing example code requires its own `noxfile.py` script
187+
which automates testing. If you decide to create a new folder, you can
188+
base it on the `samples/samples` folder (providing `noxfile.py` and
189+
the requirements files).
190+
191+
The tests will run against a real Google Cloud Project, so you should
192+
configure them just like the System Tests.
193+
194+
- To run sample tests, you can execute::
195+
196+
# Run all tests in a folder
197+
$ cd samples/samples
198+
$ nox -s py-3.8
199+
200+
# Run a single sample test
201+
$ cd samples/samples
202+
$ nox -s py-3.8 -- -k <name of test>
203+
180204
********************************************
181205
Note About ``README`` as it pertains to PyPI
182206
********************************************

‎owlbot.py

Copy file name to clipboardExpand all lines: owlbot.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ def get_staging_dirs(
121121
"\n\g<0>",
122122
)
123123

124+
# Update samples folder in CONTRIBUTING.rst
125+
s.replace("CONTRIBUTING.rst", "samples/snippets", "samples/samples")
126+
124127
# ----------------------------------------------------------------------------
125128
# Samples templates
126129
# ----------------------------------------------------------------------------

‎samples/samples/noxfile.py

Copy file name to clipboardExpand all lines: samples/samples/noxfile.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
# WARNING - WARNING - WARNING - WARNING - WARNING
2929
# WARNING - WARNING - WARNING - WARNING - WARNING
3030

31-
# Copy `noxfile_config.py` to your directory and modify it instead.
31+
BLACK_VERSION = "black==19.10b0"
3232

33+
# Copy `noxfile_config.py` to your directory and modify it instead.
3334

3435
# `TEST_CONFIG` dict is a configuration hook that allows users to
3536
# modify the test configurations. The values here should be in sync
@@ -159,7 +160,7 @@ def lint(session: nox.sessions.Session) -> None:
159160

160161
@nox.session
161162
def blacken(session: nox.sessions.Session) -> None:
162-
session.install("black")
163+
session.install(BLACK_VERSION)
163164
python_files = [path for path in os.listdir(".") if path.endswith(".py")]
164165

165166
session.run("black", *python_files)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.