Skip to content

Commit

Permalink
Merge branch 'main' into renovate/all
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea authored Dec 13, 2023
2 parents c5dcf96 + 42d8129 commit e67aaca
Show file tree
Hide file tree
Showing 31 changed files with 583 additions and 344 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7
# created: 2023-08-02T10:53:29.114535628Z
digest: sha256:230f7fe8a0d2ed81a519cfc15c6bb11c5b46b9fb449b8b1219b3771bcb520ad2
# created: 2023-12-09T15:16:25.430769578Z
4 changes: 4 additions & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ branchProtectionRules:
- 'unit (3.8)'
- 'unit (3.9)'
- 'unit (3.10)'
- 'unit (3.11)'
- 'unit (3.12)'
- 'cover'
- 'Kokoro'
- 'Samples - Lint'
- 'Samples - Python 3.7'
- 'Samples - Python 3.8'
- 'Samples - Python 3.9'
- 'Samples - Python 3.10'
- 'Samples - Python 3.11'
- 'Samples - Python 3.12'
permissionRules:
- team: actools-python
permission: admin
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install nox
Expand All @@ -24,11 +24,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install nox
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install nox
Expand All @@ -37,9 +37,9 @@ jobs:
- unit
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install coverage
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ docs.metadata

# Virtual environment
env/
venv/

# Test logs
coverage.xml
Expand Down
533 changes: 276 additions & 257 deletions .kokoro/requirements.txt

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions .kokoro/samples/python3.12/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Specify which tests to run
env_vars: {
key: "RUN_TESTS_SESSION"
value: "py-3.12"
}

# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests-312"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-bigquery-pandas/.kokoro/test-samples.sh"
}

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
}

# Download secrets for samples
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-bigquery-pandas/.kokoro/trampoline_v2.sh"
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.12/continuous.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
11 changes: 11 additions & 0 deletions .kokoro/samples/python3.12/periodic-head.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-bigquery-pandas/.kokoro/test-samples-against-head.sh"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.12/periodic.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.12/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
Expand Down
16 changes: 12 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

requirements_file: docs/requirements-docs.txt
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
image: latest
os: ubuntu-22.04
tools:
python: "3.11"

python:
pip_install: true
version: 3.8
install:
- requirements: docs/requirements-docs.txt
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## [0.20.0](https://github.com/googleapis/python-bigquery-pandas/compare/v0.19.2...v0.20.0) (2023-12-10)


### Features

* Add 'columns' as an alias for 'col_order' ([#701](https://github.com/googleapis/python-bigquery-pandas/issues/701)) ([e52e8f8](https://github.com/googleapis/python-bigquery-pandas/commit/e52e8f85e3f115ee1c9f3dc6733217b04d264f26))
* Add support for Python 3.12 ([#702](https://github.com/googleapis/python-bigquery-pandas/issues/702)) ([edb93cc](https://github.com/googleapis/python-bigquery-pandas/commit/edb93cc1aee5e7ea931a1d620617be28b4c9a702))
* Migrating off of circle/ci ([#638](https://github.com/googleapis/python-bigquery-pandas/issues/638)) ([08fe090](https://github.com/googleapis/python-bigquery-pandas/commit/08fe0904375077e43afc03c5529b427cfcf9aa37))
* Removed pkg_resources for native namespace support ([#707](https://github.com/googleapis/python-bigquery-pandas/issues/707)) ([eeb1959](https://github.com/googleapis/python-bigquery-pandas/commit/eeb19593a75d55e88a2c51ae8eb258c0156d5ba6))


### Bug Fixes

* Edit units for time in tests ([#655](https://github.com/googleapis/python-bigquery-pandas/issues/655)) ([d4ebb0c](https://github.com/googleapis/python-bigquery-pandas/commit/d4ebb0cb530fde5a28663a4bec8f7f663e2f0c55))
* Table schema change error ([#692](https://github.com/googleapis/python-bigquery-pandas/issues/692)) ([3dc8ebe](https://github.com/googleapis/python-bigquery-pandas/commit/3dc8ebed4809ad626dcf18124c38930c87750ac8))


### Documentation

* Migrate .readthedocs.yml to configuration file v2 ([#689](https://github.com/googleapis/python-bigquery-pandas/issues/689)) ([d921219](https://github.com/googleapis/python-bigquery-pandas/commit/d921219690b1b577346f5dc41c0e8d8e5ed2115c))

## [0.19.2](https://github.com/googleapis/python-bigquery-pandas/compare/v0.19.1...v0.19.2) (2023-05-10)


Expand Down
10 changes: 6 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.7, 3.8, 3.9, 3.10 and 3.11 on both UNIX and Windows.
3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 on both UNIX and Windows.

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.

- To run a single unit test::

$ nox -s unit-3.11 -- -k <name of test>
$ nox -s unit-3.12 -- -k <name of test>


.. note::
Expand Down Expand Up @@ -143,12 +143,12 @@ Running System Tests
$ nox -s system

# Run a single system test
$ nox -s system-3.11 -- -k <name of test>
$ nox -s system-3.12 -- -k <name of test>


.. note::

System tests are only configured to run under Python 3.7, 3.8, 3.9, 3.10 and 3.11.
System tests are only configured to run under Python 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12.
For expediency, we do not run them in older versions of Python 3.

This alone will not run the tests. You'll need to change some local
Expand Down Expand Up @@ -226,12 +226,14 @@ We support:
- `Python 3.9`_
- `Python 3.10`_
- `Python 3.11`_
- `Python 3.12`_

.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
.. _Python 3.9: https://docs.python.org/3.9/
.. _Python 3.10: https://docs.python.org/3.10/
.. _Python 3.11: https://docs.python.org/3.11/
.. _Python 3.12: https://docs.python.org/3.12/


Supported versions can be found in our ``noxfile.py`` `config`_.
Expand Down
15 changes: 12 additions & 3 deletions docs/howto/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Before you begin, you must create a Google Cloud Platform project. Use the
the service for free.

pandas-gbq `authenticates with the Google BigQuery service
<https://cloud.google.com/bigquery/docs/authentication/>`_ via OAuth 2.0. Use
<https://cloud.google.com/bigquery/docs/authentication>`_ via OAuth 2.0. Use
the ``credentials`` argument to explicitly pass in Google
:class:`~google.auth.credentials.Credentials`.

Expand Down Expand Up @@ -132,6 +132,13 @@ To use service account credentials, set the ``credentials`` parameter to the res
)
df = pandas_gbq.read_gbq(sql, project_id="YOUR-PROJECT-ID", credentials=credentials)
Alternatively, you can set ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable to the
full path to the JSON file.

.. code-block:: shell
$ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
Use the :func:`~google.oauth2.service_account.Credentials.with_scopes` method
to use authorize with specific OAuth2 scopes, which may be required in
queries to federated data sources such as Google Sheets.
Expand All @@ -148,8 +155,10 @@ queries to federated data sources such as Google Sheets.
df = pandas_gbq.read_gbq(..., credentials=credentials)
See the `Getting started with authentication on Google Cloud Platform
<https://cloud.google.com/docs/authentication/getting-started>`_ guide for
more information on service accounts.
<https://cloud.google.com/docs/authentication/getting-started>`_ guide and
`Google Auth Library User Guide
<https://google-auth.readthedocs.io/en/latest/user-guide.html>`_ for more information
on service accounts.

.. _authentication-user:

Expand Down
2 changes: 1 addition & 1 deletion docs/reading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ destination DataFrame as well as a preferred column order as follows:
'SELECT * FROM `test_dataset.test_table`',
project_id=projectid,
index_col='index_column_name',
col_order=['col1', 'col2', 'col3'])
columns=['col1', 'col2'])
Querying with legacy SQL syntax
-------------------------------
Expand Down
9 changes: 4 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@

import nox

BLACK_VERSION = "black==22.3.0"
BLACK_VERSION = "black==23.7.0"
ISORT_VERSION = "isort==5.10.1"
LINT_PATHS = ["docs", "pandas_gbq", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"


UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
"asyncmock",
Expand All @@ -57,7 +57,7 @@
UNIT_TEST_PYTHON_VERSIONS[-1],
]

SYSTEM_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
SYSTEM_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
"mock",
"pytest",
Expand Down Expand Up @@ -200,7 +200,6 @@ def unit(session):


def install_systemtest_dependencies(session, *constraints):

# Use pre-release gRPC for system tests.
# Exclude version 1.52.0rc1 which has a known issue.
# See https://github.com/grpc/grpc/issues/32163
Expand Down Expand Up @@ -396,7 +395,7 @@ def docs(session):
)


@nox.session(python="3.9")
@nox.session(python="3.10")
def docfx(session):
"""Build the docfx yaml files for this library."""

Expand Down
4 changes: 2 additions & 2 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
}
extras = ["tqdm"]
templated_files = common.py_library(
unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11"],
system_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11"],
unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
system_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"],
cov_level=96,
unit_test_external_dependencies=["freezegun"],
unit_test_extras=extras,
Expand Down
Loading

0 comments on commit e67aaca

Please sign in to comment.