Skip to content

Commit ffad464

Browse files
chore: enable owlbot (#23)
* chore: enable owlbot Change-Id: Idb2a03ab01d414f136a846d18f90329a9a50e4aa * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert some owlbot changes Change-Id: Iabe654bf693d82f5f1afdef7e9663577ded96025 * only exclude common.cfg Change-Id: I1199737edca971b648ec2cfddb82b4f378b3f97d * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * use correct path in build.sh Change-Id: I407dc0500f52c52ccd90e108ba821fd518a7fe1d * decrease coverage and use repo name in 'nightly' build Change-Id: I7d450364dd234c640d905c9ac2c2a96e7df08d02 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * restore pre-commit checks Change-Id: Iaf059d5b197d9cc9e87e3d17adf6c7c48ca41cb8 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent e76b5e7 commit ffad464

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1652
-366
lines changed

.coveragerc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2023 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Generated by synthtool. DO NOT EDIT!
18+
[run]
19+
branch = True
20+
omit =
21+
google/__init__.py
22+
google/cloud/__init__.py
23+
24+
[report]
25+
fail_under = 35
26+
show_missing = True
27+
exclude_lines =
28+
# Re-enable the standard pragma
29+
pragma: NO COVER
30+
# Ignore debug-only repr
31+
def __repr__
32+
# Ignore abstract methods
33+
raise NotImplementedError
34+
omit =
35+
*/gapic/*.py
36+
*/proto/*.py
37+
*/core/*.py
38+
*/site-packages/*.py
39+
google/cloud/__init__.py

.flake8

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2020 Google LLC
3+
# Copyright 2023 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.
@@ -18,8 +18,6 @@
1818
[flake8]
1919
ignore = E203, E231, E266, E501, W503
2020
exclude =
21-
third_party/**
22-
2321
# Exclude generated code.
2422
**/proto/**
2523
**/gapic/**

.github/.OwlBot.lock.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
docker:
15+
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16+
digest: sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7
17+
# created: 2023-08-02T10:53:29.114535628Z

.github/.OwlBot.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
docker:
16+
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
17+
18+
begin-after-commit-hash: 92006bb3cdc84677aa93c7f5235424ec2b157146

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# For syntax help see:
55
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
66
# Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json.
7+
78
# @googleapis/yoshi-python @googleapis/api-bigquery-dataframe are the default owners for changes in this repo
89
* @googleapis/yoshi-python @googleapis/api-bigquery-dataframe
910

.github/header-checker-lint.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"allowedLicenses": ["Apache-2.0", "MIT", "BSD-3"],
33
"ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt", "**/__init__.py", "samples/**/constraints.txt", "samples/**/constraints-test.txt"],
44
"sourceFileExtensions": [
5-
"ts",
6-
"js",
7-
"java",
8-
"sh",
9-
"Dockerfile",
10-
"yaml",
5+
"ts",
6+
"js",
7+
"java",
8+
"sh",
9+
"Dockerfile",
10+
"yaml",
1111
"py",
1212
"html",
1313
"txt"
1414
]
15-
}
15+
}

.github/sync-repo-settings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ branchProtectionRules:
1515
- 'unit (3.10)'
1616
- 'unit (3.11)'
1717
- 'cover'
18-
# TODO(tswast): add Kokoro once we've enabled it
18+
- 'Kokoro presubmit'
1919
permissionRules:
2020
- team: actools-python
2121
permission: admin

.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@v4
1414
with:
15-
python-version: "3.10"
15+
python-version: "3.8"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel

.github/workflows/unittest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Setup Python
4242
uses: actions/setup-python@v4
4343
with:
44-
python-version: "3.10"
44+
python-version: "3.8"
4545
- name: Install coverage
4646
run: |
4747
python -m pip install --upgrade setuptools pip wheel
@@ -54,4 +54,4 @@ jobs:
5454
- name: Report coverage results
5555
run: |
5656
coverage combine .coverage-results/.coverage*
57-
coverage report --show-missing --fail-under=40
57+
coverage report --show-missing --fail-under=35

.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ pip-log.txt
2626

2727
# Unit test / coverage reports
2828
.coverage
29-
.coverage.*
3029
.nox
3130
.cache
32-
.mypy_cache
3331
.pytest_cache
34-
.pytype
3532

3633

3734
# Mac
@@ -53,7 +50,6 @@ docs.metadata
5350

5451
# Virtual environment
5552
env/
56-
venv/
5753

5854
# Test logs
5955
coverage.xml
@@ -65,6 +61,3 @@ system_tests/local_test_setup
6561
# Make sure a generated file isn't accidentally committed.
6662
pylintrc
6763
pylintrc.test
68-
69-
# Notebook scratch
70-
.ipynb_checkpoints

.kokoro/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
set -eo pipefail
1717

1818
if [[ -z "${KOKORO_GOB_COMMIT}" ]]; then
19-
PROJECT_SCM="github"
19+
PROJECT_SCM="github/python-bigquery-dataframes"
2020
else
21-
PROJECT_SCM="git"
21+
PROJECT_SCM="git/bigframes"
2222
fi
2323

2424
if [[ -z "${PROJECT_ROOT:-}" ]]; then
25-
PROJECT_ROOT="${KOKORO_ARTIFACTS_DIR}/${PROJECT_SCM}/bigframes"
25+
PROJECT_ROOT="${KOKORO_ARTIFACTS_DIR}/${PROJECT_SCM}"
2626
fi
2727

2828
cd "${PROJECT_ROOT}"

.kokoro/continuous/continuous.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Format: //devtools/kokoro/config/proto/build.proto
1+
# Format: //devtools/kokoro/config/proto/build.proto
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/docker/docs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
8080
# Test pip
8181
RUN python3 -m pip
8282

83-
CMD ["python3.9"]
83+
CMD ["python3.8"]

.kokoro/docs/common.cfg

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ action {
1111
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
1212

1313
# Use the trampoline script to run in docker.
14-
build_file: "bigframes/.kokoro/trampoline_v2.sh"
14+
build_file: "python-bigquery-dataframes/.kokoro/trampoline_v2.sh"
1515

1616
# Configure the docker image for kokoro-trampoline.
1717
env_vars: {
@@ -20,12 +20,18 @@ env_vars: {
2020
}
2121
env_vars: {
2222
key: "TRAMPOLINE_BUILD_FILE"
23-
value: ".kokoro/publish-docs.sh"
23+
value: "github/python-bigquery-dataframes/.kokoro/publish-docs.sh"
24+
}
25+
26+
env_vars: {
27+
key: "STAGING_BUCKET"
28+
value: "docs-staging"
2429
}
2530

2631
env_vars: {
2732
key: "V2_STAGING_BUCKET"
28-
# Push google cloud library docs to the Cloud RAD bucket `docs-staging-v2`
33+
# Push non-cloud library docs to `docs-staging-v2-staging` instead of the
34+
# Cloud RAD bucket `docs-staging-v2`
2935
value: "docs-staging-v2"
3036
}
3137

@@ -58,4 +64,4 @@ before_action {
5864
keyname: "docuploader_service_account"
5965
}
6066
}
61-
}
67+
}

.kokoro/docs/docs-presubmit.cfg

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Format: //devtools/kokoro/config/proto/build.proto
22

3+
env_vars: {
4+
key: "STAGING_BUCKET"
5+
value: "gcloud-python-test"
6+
}
7+
38
env_vars: {
49
key: "V2_STAGING_BUCKET"
510
value: "gcloud-python-test"
@@ -13,11 +18,11 @@ env_vars: {
1318

1419
env_vars: {
1520
key: "TRAMPOLINE_BUILD_FILE"
16-
value: ".kokoro/build.sh"
21+
value: "github/python-bigquery-dataframes/.kokoro/build.sh"
1722
}
1823

1924
# Only run this nox session.
2025
env_vars: {
2126
key: "NOX_SESSION"
22-
value: "docfx"
27+
value: "docs docfx"
2328
}

.kokoro/docs/docs.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Format: //devtools/kokoro/config/proto/build.proto
1+
# Format: //devtools/kokoro/config/proto/build.proto

.kokoro/populate-secrets.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
# Copyright 2023 Google LLC.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;}
19+
function msg { println "$*" >&2 ;}
20+
function println { printf '%s\n' "$(now) $*" ;}
21+
22+
23+
# Populates requested secrets set in SECRET_MANAGER_KEYS from service account:
24+
# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com
25+
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
26+
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}"
27+
mkdir -p ${SECRET_LOCATION}
28+
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
29+
do
30+
msg "Retrieving secret ${key}"
31+
docker run --entrypoint=gcloud \
32+
--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \
33+
gcr.io/google.com/cloudsdktool/cloud-sdk \
34+
secrets versions access latest \
35+
--project cloud-devrel-kokoro-resources \
36+
--secret ${key} > \
37+
"${SECRET_LOCATION}/${key}"
38+
if [[ $? == 0 ]]; then
39+
msg "Secret written to ${SECRET_LOCATION}/${key}"
40+
else
41+
msg "Error retrieving secret ${key}"
42+
fi
43+
done

.kokoro/presubmit/common.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ action {
77
}
88
}
99

10-
build_file: "bigframes/.kokoro/build.sh"
10+
build_file: "python-bigquery-dataframes/.kokoro/build.sh"

.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+
}

.kokoro/presubmit/presubmit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Format: //devtools/kokoro/config/proto/build.proto
1+
# Format: //devtools/kokoro/config/proto/build.proto

.kokoro/publish-docs.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ export PATH="${HOME}/.local/bin:${PATH}"
2424
python3 -m pip install --require-hashes -r .kokoro/requirements.txt
2525
python3 -m nox --version
2626

27+
# build docs
28+
nox -s docs
29+
30+
# create metadata
31+
python3 -m docuploader create-metadata \
32+
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
33+
--version=$(python3 setup.py --version) \
34+
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
35+
--distribution-name=$(python3 setup.py --name) \
36+
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
37+
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
38+
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
39+
40+
cat docs.metadata
41+
42+
# upload docs
43+
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"
44+
45+
2746
# docfx yaml files
2847
nox -s docfx
2948

0 commit comments

Comments
 (0)