Skip to content

Commit 6706678

Browse files
authored
Merge pull request #1004 from googleapis/sync-v3
chore: sync v3 with main
2 parents 71dde11 + c67377a commit 6706678

Some content is hidden

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

55 files changed

+1322
-174
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
docker:
22
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
3-
digest: sha256:87eee22d276554e4e52863ec9b1cb6a7245815dfae20439712bf644348215a5a
3+
digest: sha256:4ee57a76a176ede9087c14330c625a71553cf9c72828b2c0ca12f5338171ba60

.github/sync-repo-settings.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings
2+
# Allow merge commits to sync main and v3 with fewer conflicts.
3+
mergeCommitAllowed: true
24
# Rules for main branch protection
35
branchProtectionRules:
46
# Identifies the protection rule pattern. Name of the branch to be protected.
57
# Defaults to `main`
68
- pattern: main
9+
requiresLinearHistory: true
710
requiresCodeOwnerReviews: true
811
requiresStrictStatusChecks: true
912
requiredStatusCheckContexts:
@@ -15,6 +18,7 @@ branchProtectionRules:
1518
- 'Samples - Python 3.7'
1619
- 'Samples - Python 3.8'
1720
- pattern: v3
21+
requiresLinearHistory: false
1822
requiresCodeOwnerReviews: true
1923
requiresStrictStatusChecks: true
2024
requiredStatusCheckContexts:

.kokoro/docs/common.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ env_vars: {
3030

3131
env_vars: {
3232
key: "V2_STAGING_BUCKET"
33+
# Push google cloud library docs to the Cloud RAD bucket `docs-staging-v2`
3334
value: "docs-staging-v2"
3435
}
3536

.kokoro/samples/lint/common.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
3131
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3232

3333
# Use the trampoline script to run in docker.
34-
build_file: "python-bigquery/.kokoro/trampoline.sh"
34+
build_file: "python-bigquery/.kokoro/trampoline_v2.sh"

.kokoro/samples/python3.10/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.10"
14+
}
15+
16+
# Declare build specific Cloud project.
17+
env_vars: {
18+
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19+
value: "python-docs-samples-tests-310"
20+
}
21+
22+
env_vars: {
23+
key: "TRAMPOLINE_BUILD_FILE"
24+
value: "github/python-bigquery/.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-bigquery/.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-bigquery/.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.6/common.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
3737
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3838

3939
# Use the trampoline script to run in docker.
40-
build_file: "python-bigquery/.kokoro/trampoline.sh"
40+
build_file: "python-bigquery/.kokoro/trampoline_v2.sh"

.kokoro/samples/python3.6/periodic.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
env_vars: {
44
key: "INSTALL_LIBRARY_FROM_SOURCE"
55
value: "False"
6-
}
6+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
3737
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3838

3939
# Use the trampoline script to run in docker.
40-
build_file: "python-bigquery/.kokoro/trampoline.sh"
40+
build_file: "python-bigquery/.kokoro/trampoline_v2.sh"

.kokoro/samples/python3.7/periodic.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
env_vars: {
44
key: "INSTALL_LIBRARY_FROM_SOURCE"
55
value: "False"
6-
}
6+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
3737
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3838

3939
# Use the trampoline script to run in docker.
40-
build_file: "python-bigquery/.kokoro/trampoline.sh"
40+
build_file: "python-bigquery/.kokoro/trampoline_v2.sh"

.kokoro/samples/python3.8/periodic.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
env_vars: {
44
key: "INSTALL_LIBRARY_FROM_SOURCE"
55
value: "False"
6-
}
6+
}

.kokoro/samples/python3.9/common.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"
3737
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
3838

3939
# Use the trampoline script to run in docker.
40-
build_file: "python-bigquery/.kokoro/trampoline.sh"
40+
build_file: "python-bigquery/.kokoro/trampoline_v2.sh"

.kokoro/samples/python3.9/periodic.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
env_vars: {
44
key: "INSTALL_LIBRARY_FROM_SOURCE"
55
value: "False"
6-
}
6+
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,4 @@ set -eo pipefail
2323
# Enables `**` to include files nested inside sub-folders
2424
shopt -s globstar
2525

26-
cd github/python-bigquery
27-
2826
exec .kokoro/test-samples-impl.sh

.kokoro/test-samples.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ set -eo pipefail
2424
# Enables `**` to include files nested inside sub-folders
2525
shopt -s globstar
2626

27-
cd github/python-bigquery
28-
2927
# Run periodic samples tests at latest release
3028
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
3129
# preserving the test runner implementation.

.repo-metadata.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
2-
"name": "bigquery",
3-
"name_pretty": "Google Cloud BigQuery",
4-
"product_documentation": "https://cloud.google.com/bigquery",
5-
"client_documentation": "https://googleapis.dev/python/bigquery/latest",
6-
"issue_tracker": "https://issuetracker.google.com/savedsearches/559654",
7-
"release_level": "ga",
8-
"language": "python",
9-
"library_type": "GAPIC_COMBO",
10-
"repo": "googleapis/python-bigquery",
11-
"distribution_name": "google-cloud-bigquery",
12-
"api_id": "bigquery.googleapis.com",
13-
"requires_billing": false
14-
}
2+
"name": "bigquery",
3+
"name_pretty": "Google Cloud BigQuery",
4+
"product_documentation": "https://cloud.google.com/bigquery",
5+
"client_documentation": "https://googleapis.dev/python/bigquery/latest",
6+
"issue_tracker": "https://issuetracker.google.com/savedsearches/559654",
7+
"release_level": "ga",
8+
"language": "python",
9+
"library_type": "GAPIC_COMBO",
10+
"repo": "googleapis/python-bigquery",
11+
"distribution_name": "google-cloud-bigquery",
12+
"api_id": "bigquery.googleapis.com",
13+
"requires_billing": false,
14+
"default_version": "v2",
15+
"codeowner_team": "@googleapis/api-bigquery"
16+
}

.trampolinerc

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,26 @@
1616

1717
# Add required env vars here.
1818
required_envvars+=(
19-
"STAGING_BUCKET"
20-
"V2_STAGING_BUCKET"
2119
)
2220

2321
# Add env vars which are passed down into the container here.
2422
pass_down_envvars+=(
23+
"NOX_SESSION"
24+
###############
25+
# Docs builds
26+
###############
2527
"STAGING_BUCKET"
2628
"V2_STAGING_BUCKET"
27-
"NOX_SESSION"
29+
##################
30+
# Samples builds
31+
##################
32+
"INSTALL_LIBRARY_FROM_SOURCE"
33+
"RUN_TESTS_SESSION"
34+
"BUILD_SPECIFIC_GCLOUD_PROJECT"
35+
# Target directories.
36+
"RUN_TESTS_DIRS"
37+
# The nox session to run.
38+
"RUN_TESTS_SESSION"
2839
)
2940

3041
# Prevent unintentional override on the default image.

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@
55
[1]: https://pypi.org/project/google-cloud-bigquery/#history
66

77

8+
### [2.28.1](https://www.github.com/googleapis/python-bigquery/compare/v2.28.0...v2.28.1) (2021-10-07)
9+
10+
11+
### Bug Fixes
12+
13+
* support ARRAY data type when loading from DataFrame with Parquet ([#980](https://www.github.com/googleapis/python-bigquery/issues/980)) ([1e59083](https://www.github.com/googleapis/python-bigquery/commit/1e5908302d36e15442013af6f46b1c20af28255e))
14+
15+
## [2.28.0](https://www.github.com/googleapis/python-bigquery/compare/v2.27.1...v2.28.0) (2021-09-30)
16+
17+
18+
### Features
19+
20+
* add `AvroOptions` to configure AVRO external data ([#994](https://www.github.com/googleapis/python-bigquery/issues/994)) ([1a9431d](https://www.github.com/googleapis/python-bigquery/commit/1a9431d9e02eeb99e4712b61c623f9cca80134a6))
21+
22+
23+
### Documentation
24+
25+
* link to stable pandas docs ([#990](https://www.github.com/googleapis/python-bigquery/issues/990)) ([ea50e80](https://www.github.com/googleapis/python-bigquery/commit/ea50e8031fc035b3772a338bc00982de263cefad))
26+
827
### [2.27.1](https://www.github.com/googleapis/python-bigquery/compare/v2.27.0...v2.27.1) (2021-09-27)
928

1029

CONTRIBUTING.rst

Lines changed: 4 additions & 2 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.6, 3.7, 3.8 and 3.9 on both UNIX and Windows.
25+
3.6, 3.7, 3.8, 3.9 and 3.10 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
@@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.
7272

7373
- To run a single unit test::
7474

75-
$ nox -s unit-3.9 -- -k <name of test>
75+
$ nox -s unit-3.10 -- -k <name of test>
7676

7777

7878
.. note::
@@ -225,11 +225,13 @@ We support:
225225
- `Python 3.7`_
226226
- `Python 3.8`_
227227
- `Python 3.9`_
228+
- `Python 3.10`_
228229

229230
.. _Python 3.6: https://docs.python.org/3.6/
230231
.. _Python 3.7: https://docs.python.org/3.7/
231232
.. _Python 3.8: https://docs.python.org/3.8/
232233
.. _Python 3.9: https://docs.python.org/3.9/
234+
.. _Python 3.10: https://docs.python.org/3.10/
233235

234236

235237
Supported versions can be found in our ``noxfile.py`` `config`_.

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,10 @@
364364
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
365365
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
366366
"grpc": ("https://grpc.github.io/grpc/python/", None),
367-
"pandas": ("http://pandas.pydata.org/pandas-docs/stable/", None),
368-
"geopandas": ("https://geopandas.org/", None),
369367
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
370368
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
369+
"pandas": ("http://pandas.pydata.org/pandas-docs/stable/", None),
370+
"geopandas": ("https://geopandas.org/", None),
371371
}
372372

373373

docs/format_options.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
BigQuery Format Options
2+
=======================
3+
4+
.. automodule:: google.cloud.bigquery.format_options
5+
:members:
6+
:undoc-members:

docs/job_base.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Common Job Resource Classes
2+
===========================
3+
4+
.. automodule:: google.cloud.bigquery.job.base
5+
:members:

docs/query.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Query Resource Classes
2+
======================
3+
4+
.. automodule:: google.cloud.bigquery.query
5+
:members:

docs/reference.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ Job Classes
4747
job.CopyJob
4848
job.LoadJob
4949
job.ExtractJob
50-
job.UnknownJob
5150

5251
Job-Related Types
5352
-----------------
@@ -68,7 +67,11 @@ Job-Related Types
6867
job.SourceFormat
6968
job.WriteDisposition
7069
job.SchemaUpdateOption
71-
job.TransactionInfo
70+
71+
.. toctree::
72+
:maxdepth: 2
73+
74+
job_base
7275

7376

7477
Dataset
@@ -134,14 +137,10 @@ Schema
134137
Query
135138
=====
136139

137-
.. autosummary::
138-
:toctree: generated
140+
.. toctree::
141+
:maxdepth: 2
139142

140-
query.ArrayQueryParameter
141-
query.ScalarQueryParameter
142-
query.ScalarQueryParameterType
143-
query.StructQueryParameter
144-
query.UDFResource
143+
query
145144

146145

147146
Retries
@@ -167,6 +166,11 @@ External Configuration
167166
external_config.CSVOptions
168167
external_config.GoogleSheetsOptions
169168

169+
.. toctree::
170+
:maxdepth: 2
171+
172+
format_options
173+
170174

171175
Magics
172176
======

0 commit comments

Comments
 (0)