Content-Length: 466657 | pFad | http://github.com/googleapis/python-monitoring/commit/fa76440d73c25600e371a2b52380d1368ff3ee04

78 chore: add prerelease nox session (#454) · googleapis/python-monitoring@fa76440 · GitHub
Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit fa76440

Browse files
chore: add prerelease nox session (#454)
Source-Link: googleapis/synthtool@050953d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:65e656411895bff71cffcae97246966460160028f253c2e45b7a25d805a5b142 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b60be99 commit fa76440

File tree

4 files changed

+80
-2
lines changed

4 files changed

+80
-2
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32
17-
# created: 2022-05-05T22:08:23.383410683Z
16+
digest: sha256:65e656411895bff71cffcae97246966460160028f253c2e45b7a25d805a5b142
17+
# created: 2022-06-12T13:11:45.905884945Z
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "prerelease_deps"
7+
}

.kokoro/presubmit/prerelease-deps.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "prerelease_deps"
7+
}

noxfile.py

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,67 @@ def docfx(session):
328328
os.path.join("docs", ""),
329329
os.path.join("docs", "_build", "html", ""),
330330
)
331+
332+
333+
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
334+
def prerelease_deps(session):
335+
"""Run all tests with prerelease versions of dependencies installed."""
336+
337+
prerel_deps = [
338+
"protobuf",
339+
"googleapis-common-protos",
340+
"google-auth",
341+
"grpcio",
342+
"grpcio-status",
343+
"google-api-core",
344+
"proto-plus",
345+
# dependencies of google-auth
346+
"cryptography",
347+
"pyasn1",
348+
]
349+
350+
for dep in prerel_deps:
351+
session.install("--pre", "--no-deps", "--upgrade", dep)
352+
353+
# Remaining dependencies
354+
other_deps = ["requests"]
355+
session.install(*other_deps)
356+
357+
session.install(*UNIT_TEST_STANDARD_DEPENDENCIES)
358+
session.install(*SYSTEM_TEST_STANDARD_DEPENDENCIES)
359+
360+
# Because we test minimum dependency versions on the minimum Python
361+
# version, the first version we test with in the unit tests sessions has a
362+
# constraints file containing all dependencies and extras.
363+
with open(
364+
CURRENT_DIRECTORY
365+
/ "testing"
366+
/ f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
367+
encoding="utf-8",
368+
) as constraints_file:
369+
constraints_text = constraints_file.read()
370+
371+
# Ignore leading whitespace and comment lines.
372+
deps = [
373+
match.group(1)
374+
for match in re.finditer(
375+
r"^\s*(\S+)(?===\S+)", constraints_text, flags=re.MULTILINE
376+
)
377+
]
378+
379+
# Don't overwrite prerelease packages.
380+
deps = [dep for dep in deps if dep not in prerel_deps]
381+
# We use --no-deps to ensure that pre-release versions aren't overwritten
382+
# by the version ranges in setup.py.
383+
session.install(*deps)
384+
session.install("--no-deps", "-e", ".[all]")
385+
386+
# Print out prerelease package versions
387+
session.run(
388+
"python", "-c", "import google.protobuf; print(google.protobuf.__version__)"
389+
)
390+
session.run("python", "-c", "import grpc; print(grpc.__version__)")
391+
392+
session.run("py.test", "tests/unit")
393+
session.run("py.test", "tests/system")
394+
session.run("py.test", "samples/snippets")

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/googleapis/python-monitoring/commit/fa76440d73c25600e371a2b52380d1368ff3ee04

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy