Skip to content

Commit 1078510

Browse files
chore: update templated files (googleapis#278)
* chore: update templated files Source-Link: googleapis/synthtool@a37f74c Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:d3de8a02819f65001effcbd3ea76ce97e9bcff035c7a89457f40f892c87c5b32 * exclude noxfile.py from templates --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 55dff95 commit 1078510

22 files changed

+288
-419
lines changed

.coveragerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

.github/.OwlBot.lock.yaml

+2-2
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:5a4c19d17e597b92d786e569be101e636c9c2817731f80a5adec56b2aa8fe070
17-
# created: 2024-04-12T11:35:58.922854369Z
16+
digest: sha256:d3de8a02819f65001effcbd3ea76ce97e9bcff035c7a89457f40f892c87c5b32
17+
# created: 2024-07-03T17:43:00.77142528Z

.github/auto-label.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

.kokoro/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/docker/docs/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

.kokoro/populate-secrets.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC.
2+
# Copyright 2024 Google LLC.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/publish-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/requirements.txt

+266-243
Large diffs are not rendered by default.

.kokoro/test-samples-against-head.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/test-samples-impl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/test-samples.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/trampoline.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/trampoline_v2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

.trampolinerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

owlbot.py

+1-155
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"pandas": "https://pandas.pydata.org/pandas-docs/stable/"
3535
},
3636
)
37-
s.move(templated_files, excludes=["docs/multiprocessing.rst", "README.rst", ".github/workflows/unittest.yml"])
37+
s.move(templated_files, excludes=["docs/multiprocessing.rst", "README.rst", ".github/workflows/unittest.yml", "noxfile.py"])
3838

3939
# ----------------------------------------------------------------------------
4040
# Fixup files
@@ -44,160 +44,6 @@
4444
[".coveragerc"], "google/cloud/__init__.py", "db_dtypes/requirements.py",
4545
)
4646

47-
s.replace(
48-
["noxfile.py"], r"[\"']google[\"']", '"db_dtypes"',
49-
)
50-
51-
s.replace(
52-
["noxfile.py"], r"import shutil", "import re\nimport shutil",
53-
)
54-
55-
s.replace(
56-
["noxfile.py"], "--cov=google", "--cov=db_dtypes",
57-
)
58-
59-
# There are no system tests for this package.
60-
old_sessions = """
61-
"unit",
62-
"system",
63-
"cover",
64-
"lint",
65-
"""
66-
67-
new_sessions = """
68-
"lint",
69-
"unit",
70-
"unit_prerelease",
71-
"compliance",
72-
"compliance_prerelease",
73-
"cover",
74-
"""
75-
76-
s.replace(["noxfile.py"], old_sessions, new_sessions)
77-
78-
# Add compliance tests.
79-
s.replace(
80-
["noxfile.py"], r"def default\(session\):", "def default(session, tests_path):"
81-
)
82-
s.replace(["noxfile.py"], r'os.path.join\("tests", "unit"\),', "tests_path,")
83-
s.replace(
84-
["noxfile.py"],
85-
r'f"--junitxml=unit_{session.python}_sponge_log.xml",',
86-
r'f"--junitxml={os.path.split(tests_path)[-1]}_{session.python}_sponge_log.xml",',
87-
)
88-
s.replace(
89-
["noxfile.py"],
90-
r'''
91-
@nox.session\(python=UNIT_TEST_PYTHON_VERSIONS\)
92-
def unit\(session\):
93-
"""Run the unit test suite."""
94-
default\(session\)
95-
''',
96-
r'''
97-
def prerelease(session, tests_path):
98-
constraints_path = str(
99-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
100-
)
101-
102-
# PyArrow prerelease packages are published to an alternative PyPI host.
103-
# https://arrow.apache.org/docs/python/install.html#installing-nightly-packages
104-
session.install(
105-
"--extra-index-url",
106-
"https://pypi.fury.io/arrow-nightlies/",
107-
"--prefer-binary",
108-
"--pre",
109-
"--upgrade",
110-
"pyarrow",
111-
)
112-
# Avoid pandas==2.2.0rc0 as this version causes PyArrow to fail. Once newer
113-
# prerelease comes out, this constraint can be removed. See
114-
# https://github.com/googleapis/python-db-dtypes-pandas/issues/234
115-
session.install(
116-
"--extra-index-url",
117-
"https://pypi.anaconda.org/scipy-wheels-nightly/simple",
118-
"--prefer-binary",
119-
"--pre",
120-
"--upgrade",
121-
"pandas!=2.2.0rc0",
122-
)
123-
session.install(
124-
"mock",
125-
"asyncmock",
126-
"pytest",
127-
"pytest-cov",
128-
"pytest-asyncio",
129-
"-c",
130-
constraints_path,
131-
)
132-
133-
# Because we test minimum dependency versions on the minimum Python
134-
# version, the first version we test with in the unit tests sessions has a
135-
# constraints file containing all dependencies and extras.
136-
with open(
137-
CURRENT_DIRECTORY
138-
/ "testing"
139-
/ f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
140-
encoding="utf-8",
141-
) as constraints_file:
142-
constraints_text = constraints_file.read()
143-
144-
# Ignore leading whitespace and comment lines.
145-
deps = [
146-
match.group(1)
147-
for match in re.finditer(
148-
r"^\\s*(\\S+)(?===\\S+)", constraints_text, flags=re.MULTILINE
149-
)
150-
]
151-
152-
# We use --no-deps to ensure that pre-release versions aren't overwritten
153-
# by the version ranges in setup.py.
154-
session.install(*deps)
155-
session.install("--no-deps", "-e", ".")
156-
157-
# Print out prerelease package versions.
158-
session.run("python", "-m", "pip", "freeze")
159-
160-
# Run py.test against the unit tests.
161-
session.run(
162-
"py.test",
163-
"--quiet",
164-
f"--junitxml={os.path.split(tests_path)[-1]}_prerelease_{session.python}_sponge_log.xml",
165-
"--cov=db_dtypes",
166-
"--cov=tests/unit",
167-
"--cov-append",
168-
"--cov-config=.coveragerc",
169-
"--cov-report=",
170-
"--cov-fail-under=0",
171-
tests_path,
172-
*session.posargs,
173-
)
174-
175-
176-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[-1])
177-
def compliance(session):
178-
"""Run the compliance test suite."""
179-
default(session, os.path.join("tests", "compliance"))
180-
181-
182-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[-1])
183-
def compliance_prerelease(session):
184-
"""Run the compliance test suite with prerelease dependencies."""
185-
prerelease(session, os.path.join("tests", "compliance"))
186-
187-
188-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
189-
def unit(session):
190-
"""Run the unit test suite."""
191-
default(session, os.path.join("tests", "unit"))
192-
193-
194-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS[-1])
195-
def unit_prerelease(session):
196-
"""Run the unit test suite with prerelease dependencies."""
197-
prerelease(session, os.path.join("tests", "unit"))
198-
''',
199-
)
200-
20147
# ----------------------------------------------------------------------------
20248
# Samples templates
20349
# ----------------------------------------------------------------------------

scripts/decrypt-secrets.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Copyright 2023 Google LLC All rights reserved.
3+
# Copyright 2024 Google LLC All rights reserved.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

scripts/readme-gen/readme_gen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)