From 7cd4287ae70861e4949487db578ab1916d853029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Swe=C3=B1a=20=28Swast=29?= Date: Thu, 23 May 2024 14:51:59 -0500 Subject: [PATCH 1/7] docs: use a short-link to BigQuery DataFrames (#773) --- docs/index.rst | 4 ++-- pandas_gbq/gbq.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 73673e0f..14fcde28 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,8 +23,8 @@ Note: The canonical version of this documentation can always be found on the `BigQuery sandbox `__ to try the service for free. - Also, consider using `BigQuery DataFrames - `__ + Also, consider using BigQuery DataFrames + (`bit.ly/bigframes-intro `__) to process large results with pandas compatible APIs with transparent SQL pushdown to BigQuery engine. This provides an opportunity to save on costs and improve performance. diff --git a/pandas_gbq/gbq.py b/pandas_gbq/gbq.py index a9dca3ce..6ae172f9 100644 --- a/pandas_gbq/gbq.py +++ b/pandas_gbq/gbq.py @@ -493,8 +493,7 @@ def _download_results( num_gib = num_bytes / pandas_gbq.constants.BYTES_IN_GIB warnings.warn( f"Recommendation: Your results are {num_gib:.1f} GiB. " - "Consider using BigQuery DataFrames " - "(https://cloud.google.com/bigquery/docs/bigquery-dataframes-introduction) " + "Consider using BigQuery DataFrames (https://bit.ly/bigframes-intro)" "to process large results with pandas compatible APIs with transparent SQL " "pushdown to BigQuery engine. This provides an opportunity to save on costs " "and improve performance. " From 631532cc3f3728e529da1c555756bfa0e3e20e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Swe=C3=B1a=20=28Swast=29?= Date: Fri, 24 May 2024 10:52:17 -0500 Subject: [PATCH 2/7] chore: sort imports (#770) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-pandas/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) 🦕 --- docs/conf.py | 2 +- docs/intro.rst | 4 ++-- docs/reading.rst | 4 ++-- docs/samples | 1 - docs/writing.rst | 2 +- noxfile.py | 1 + owlbot.py | 10 ++++++---- pandas_gbq/__init__.py | 4 ++-- pandas_gbq/features.py | 2 +- pandas_gbq/gbq.py | 11 ++++------- pandas_gbq/load.py | 2 +- pandas_gbq/query.py | 1 - pandas_gbq/schema.py | 1 - samples/snippets/conftest.py | 1 - samples/snippets/noxfile.py | 1 - samples/snippets/read_gbq_test.py | 3 +-- samples/snippets/to_gbq_simple.py | 1 - setup.py | 1 - tests/system/conftest.py | 3 +-- tests/system/test_auth.py | 1 - tests/system/test_gbq.py | 8 +++----- tests/system/test_read_gbq.py | 3 +-- tests/system/test_read_gbq_with_bqstorage.py | 1 - tests/system/test_to_gbq.py | 3 +-- tests/unit/test_context.py | 3 ++- tests/unit/test_gbq.py | 1 - tests/unit/test_load.py | 3 +-- tests/unit/test_query.py | 2 +- tests/unit/test_timestamp.py | 1 - tests/unit/test_to_gbq.py | 2 +- 30 files changed, 33 insertions(+), 50 deletions(-) delete mode 120000 docs/samples diff --git a/docs/conf.py b/docs/conf.py index 3a9d090e..fe502297 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,9 +24,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os import shlex +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/docs/intro.rst b/docs/intro.rst index c6774b15..ab93b4fe 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -27,7 +27,7 @@ Reading data from BigQuery Use the :func:`pandas_gbq.read_gbq` function to run a BigQuery query and download the results as a :class:`pandas.DataFrame` object. -.. literalinclude:: samples/snippets/read_gbq_simple.py +.. literalinclude:: ../samples/snippets/read_gbq_simple.py :language: python :dedent: 4 :start-after: [START bigquery_pandas_gbq_read_gbq_simple] @@ -57,7 +57,7 @@ Writing data to BigQuery Use the :func:`pandas_gbq.to_gbq` function to write a :class:`pandas.DataFrame` object to a BigQuery table. -.. literalinclude:: samples/snippets/to_gbq_simple.py +.. literalinclude:: ../samples/snippets/to_gbq_simple.py :language: python :dedent: 4 :start-after: [START bigquery_pandas_gbq_to_gbq_simple] diff --git a/docs/reading.rst b/docs/reading.rst index 6361280a..bc7b74e1 100644 --- a/docs/reading.rst +++ b/docs/reading.rst @@ -6,7 +6,7 @@ Reading Tables Use the :func:`pandas_gbq.read_gbq` function to run a BigQuery query and download the results as a :class:`pandas.DataFrame` object. -.. literalinclude:: samples/snippets/read_gbq_simple.py +.. literalinclude:: ../samples/snippets/read_gbq_simple.py :language: python :dedent: 4 :start-after: [START bigquery_pandas_gbq_read_gbq_simple] @@ -37,7 +37,7 @@ The ``dialect`` argument can be used to indicate whether to use BigQuery's ``'legacy'`` SQL or BigQuery's ``'standard'`` SQL. The default value is ``'standard'``. -.. literalinclude:: samples/snippets/read_gbq_legacy.py +.. literalinclude:: ../samples/snippets/read_gbq_legacy.py :language: python :dedent: 4 :start-after: [START bigquery_pandas_gbq_read_gbq_legacy] diff --git a/docs/samples b/docs/samples deleted file mode 120000 index e804737e..00000000 --- a/docs/samples +++ /dev/null @@ -1 +0,0 @@ -../samples \ No newline at end of file diff --git a/docs/writing.rst b/docs/writing.rst index 6c1be272..80c06a58 100644 --- a/docs/writing.rst +++ b/docs/writing.rst @@ -6,7 +6,7 @@ Writing Tables Use the :func:`pandas_gbq.to_gbq` function to write a :class:`pandas.DataFrame` object to a BigQuery table. -.. literalinclude:: samples/snippets/to_gbq_simple.py +.. literalinclude:: ../samples/snippets/to_gbq_simple.py :language: python :dedent: 4 :start-after: [START bigquery_pandas_gbq_to_gbq_simple] diff --git a/noxfile.py b/noxfile.py index f7b290f4..2faa9bf9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -17,6 +17,7 @@ # Generated by synthtool. DO NOT EDIT! from __future__ import absolute_import + import os import pathlib import re diff --git a/owlbot.py b/owlbot.py index ec75c144..af534869 100644 --- a/owlbot.py +++ b/owlbot.py @@ -55,7 +55,7 @@ # creating clients, not the end user. "docs/multiprocessing.rst", "noxfile.py", - "README.rst", + "README.rst", # exclude .kokoro/build.sh which is customized due to support for conda ".kokoro/build.sh", ], @@ -66,7 +66,9 @@ # ---------------------------------------------------------------------------- s.replace( - [".github/header-checker-lint.yml"], '"Google LLC"', '"pandas-gbq Authors"', + [".github/header-checker-lint.yml"], + '"Google LLC"', + '"pandas-gbq Authors"', ) # ---------------------------------------------------------------------------- @@ -79,6 +81,6 @@ # Final cleanup # ---------------------------------------------------------------------------- -s.shell.run(["nox", "-s", "blacken"], hide_output=False) +s.shell.run(["nox", "-s", "format"], hide_output=False) for noxfile in REPO_ROOT.glob("samples/**/noxfile.py"): - s.shell.run(["nox", "-s", "blacken"], cwd=noxfile.parent, hide_output=False) + s.shell.run(["nox", "-s", "format"], cwd=noxfile.parent, hide_output=False) diff --git a/pandas_gbq/__init__.py b/pandas_gbq/__init__.py index df2b603d..6d92bfa2 100644 --- a/pandas_gbq/__init__.py +++ b/pandas_gbq/__init__.py @@ -2,10 +2,10 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -from .gbq import to_gbq, read_gbq, Context, context # noqa - from pandas_gbq import version as pandas_gbq_version +from .gbq import Context, context, read_gbq, to_gbq # noqa + __version__ = pandas_gbq_version.__version__ __all__ = [ diff --git a/pandas_gbq/features.py b/pandas_gbq/features.py index b6ab25ac..2871d5ea 100644 --- a/pandas_gbq/features.py +++ b/pandas_gbq/features.py @@ -54,8 +54,8 @@ def bigquery_has_query_and_wait(self): @property def pandas_installed_version(self): - import pandas import packaging.version + import pandas if self._pandas_installed_version is not None: return self._pandas_installed_version diff --git a/pandas_gbq/gbq.py b/pandas_gbq/gbq.py index 6ae172f9..36aef79e 100644 --- a/pandas_gbq/gbq.py +++ b/pandas_gbq/gbq.py @@ -268,8 +268,8 @@ def __init__( client_secret=None, ): global context - from google.api_core.exceptions import GoogleAPIError - from google.api_core.exceptions import ClientError + from google.api_core.exceptions import ClientError, GoogleAPIError + from pandas_gbq import auth self.http_error = (ClientError, GoogleAPIError) @@ -1244,8 +1244,7 @@ def __init__( def _table_ref(self, table_id): """Return a BigQuery client library table reference""" - from google.cloud.bigquery import DatasetReference - from google.cloud.bigquery import TableReference + from google.cloud.bigquery import DatasetReference, TableReference return TableReference( DatasetReference(self.project_id, self.dataset_id), table_id @@ -1286,9 +1285,7 @@ def create(self, table_id, schema): Use the generate_bq_schema to generate your table schema from a dataframe. """ - from google.cloud.bigquery import DatasetReference - from google.cloud.bigquery import Table - from google.cloud.bigquery import TableReference + from google.cloud.bigquery import DatasetReference, Table, TableReference if self.exists(table_id): raise TableCreationError("Table {0} already exists".format(table_id)) diff --git a/pandas_gbq/load.py b/pandas_gbq/load.py index 8243c7f3..cf495e00 100644 --- a/pandas_gbq/load.py +++ b/pandas_gbq/load.py @@ -9,9 +9,9 @@ from typing import Any, Callable, Dict, List, Optional import db_dtypes +from google.cloud import bigquery import pandas import pyarrow.lib -from google.cloud import bigquery from pandas_gbq import exceptions import pandas_gbq.schema diff --git a/pandas_gbq/query.py b/pandas_gbq/query.py index 0b7036f7..83575a9c 100644 --- a/pandas_gbq/query.py +++ b/pandas_gbq/query.py @@ -14,7 +14,6 @@ import pandas_gbq.exceptions - logger = logging.getLogger(__name__) diff --git a/pandas_gbq/schema.py b/pandas_gbq/schema.py index d3357719..b60fdeda 100644 --- a/pandas_gbq/schema.py +++ b/pandas_gbq/schema.py @@ -6,7 +6,6 @@ import copy - # API may return data types as legacy SQL, so maintain a mapping of aliases # from standard SQL to legacy data types. _TYPE_ALIASES = { diff --git a/samples/snippets/conftest.py b/samples/snippets/conftest.py index 0d0ae091..0216c1da 100644 --- a/samples/snippets/conftest.py +++ b/samples/snippets/conftest.py @@ -6,7 +6,6 @@ import pytest import test_utils.prefixer - prefixer = test_utils.prefixer.Prefixer("python-bigquery-pandas", "samples/snippets") diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index 3b713594..c36d5f2d 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -22,7 +22,6 @@ import nox - # WARNING - WARNING - WARNING - WARNING - WARNING # WARNING - WARNING - WARNING - WARNING - WARNING # DO NOT EDIT THIS FILE EVER! diff --git a/samples/snippets/read_gbq_test.py b/samples/snippets/read_gbq_test.py index 8f4992d7..4fc8cb7b 100644 --- a/samples/snippets/read_gbq_test.py +++ b/samples/snippets/read_gbq_test.py @@ -4,8 +4,7 @@ """System tests for read_gbq code samples.""" -from . import read_gbq_legacy -from . import read_gbq_simple +from . import read_gbq_legacy, read_gbq_simple def test_read_gbq_legacy(project_id): diff --git a/samples/snippets/to_gbq_simple.py b/samples/snippets/to_gbq_simple.py index 37f4cdcd..7330e2e0 100644 --- a/samples/snippets/to_gbq_simple.py +++ b/samples/snippets/to_gbq_simple.py @@ -14,7 +14,6 @@ def main(project_id, table_id): # TODO: Set project_id to your Google Cloud Platform project ID. # project_id = "my-project" - # TODO: Set table_id to the full destination table ID (including the # dataset ID). # table_id = 'my_dataset.my_table' diff --git a/setup.py b/setup.py index 6f30eacd..461cbfde 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,6 @@ import setuptools - # Package metadata. name = "pandas-gbq" diff --git a/tests/system/conftest.py b/tests/system/conftest.py index 9690446d..8c45167f 100644 --- a/tests/system/conftest.py +++ b/tests/system/conftest.py @@ -2,15 +2,14 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -import os import functools +import os import pathlib from google.cloud import bigquery import pytest import test_utils.prefixer - prefixer = test_utils.prefixer.Prefixer("python-bigquery-pandas", "tests/system") REPO_DIR = pathlib.Path(__file__).parent.parent.parent diff --git a/tests/system/test_auth.py b/tests/system/test_auth.py index ecedd973..564625a9 100644 --- a/tests/system/test_auth.py +++ b/tests/system/test_auth.py @@ -11,7 +11,6 @@ from pandas_gbq import auth - IS_RUNNING_ON_CI = "KOKORO_BUILD_ID" in os.environ diff --git a/tests/system/test_gbq.py b/tests/system/test_gbq.py index 9bbefceb..b62f3590 100644 --- a/tests/system/test_gbq.py +++ b/tests/system/test_gbq.py @@ -5,22 +5,20 @@ # -*- coding: utf-8 -*- import datetime -import packaging.version import sys import numpy as np +import packaging.version import pandas +from pandas import DataFrame import pandas.api.types import pandas.testing as tm -from pandas import DataFrame - -import pytz import pytest +import pytz from pandas_gbq import gbq import pandas_gbq.schema - TABLE_ID = "new_test" PANDAS_VERSION = packaging.version.parse(pandas.__version__) diff --git a/tests/system/test_read_gbq.py b/tests/system/test_read_gbq.py index fada140b..4ae96a36 100644 --- a/tests/system/test_read_gbq.py +++ b/tests/system/test_read_gbq.py @@ -5,18 +5,17 @@ import collections import datetime import decimal -import packaging.version import random import db_dtypes from google.cloud import bigquery +import packaging.version import pandas import pandas.testing import pytest from pandas_gbq.features import FEATURES - QueryTestCase = collections.namedtuple( "QueryTestCase", ["query", "expected", "use_bqstorage_apis"], diff --git a/tests/system/test_read_gbq_with_bqstorage.py b/tests/system/test_read_gbq_with_bqstorage.py index cfb31ea8..70dfecf4 100644 --- a/tests/system/test_read_gbq_with_bqstorage.py +++ b/tests/system/test_read_gbq_with_bqstorage.py @@ -9,7 +9,6 @@ import pytest - pytest.importorskip("google.cloud.bigquery", minversion="1.24.0") diff --git a/tests/system/test_to_gbq.py b/tests/system/test_to_gbq.py index a03113d7..2e7245d5 100644 --- a/tests/system/test_to_gbq.py +++ b/tests/system/test_to_gbq.py @@ -2,9 +2,9 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. +import collections import datetime import decimal -import collections import random import db_dtypes @@ -12,7 +12,6 @@ import pandas.testing import pytest - pytest.importorskip("google.cloud.bigquery", minversion="1.24.0") diff --git a/tests/unit/test_context.py b/tests/unit/test_context.py index 6b6ce6a0..45115302 100644 --- a/tests/unit/test_context.py +++ b/tests/unit/test_context.py @@ -28,9 +28,10 @@ def default_bigquery_client(mock_bigquery_client): @pytest.fixture(autouse=True) def mock_get_credentials(monkeypatch): - from pandas_gbq import auth import google.auth.credentials + from pandas_gbq import auth + mock_credentials = mock.MagicMock(google.auth.credentials.Credentials) mock_get_credentials = mock.Mock() mock_get_credentials.return_value = (mock_credentials, "my-project") diff --git a/tests/unit/test_gbq.py b/tests/unit/test_gbq.py index cef916f2..92a09a3f 100644 --- a/tests/unit/test_gbq.py +++ b/tests/unit/test_gbq.py @@ -25,7 +25,6 @@ import pandas_gbq.features from pandas_gbq.features import FEATURES - pytestmark = pytest.mark.filterwarnings("ignore:credentials from Google Cloud SDK") diff --git a/tests/unit/test_load.py b/tests/unit/test_load.py index b34b1378..5f38d244 100644 --- a/tests/unit/test_load.py +++ b/tests/unit/test_load.py @@ -15,8 +15,7 @@ import pandas.testing import pytest -from pandas_gbq import exceptions -from pandas_gbq import load +from pandas_gbq import exceptions, load def load_method(bqclient, api_method): diff --git a/tests/unit/test_query.py b/tests/unit/test_query.py index 5b631634..2437fa02 100644 --- a/tests/unit/test_query.py +++ b/tests/unit/test_query.py @@ -4,8 +4,8 @@ from __future__ import annotations -import datetime import concurrent.futures +import datetime from unittest import mock import freezegun diff --git a/tests/unit/test_timestamp.py b/tests/unit/test_timestamp.py index b35c1307..682619fe 100644 --- a/tests/unit/test_timestamp.py +++ b/tests/unit/test_timestamp.py @@ -6,7 +6,6 @@ import pandas import pandas.testing - import pytest diff --git a/tests/unit/test_to_gbq.py b/tests/unit/test_to_gbq.py index 15176a1b..23b7c9bd 100644 --- a/tests/unit/test_to_gbq.py +++ b/tests/unit/test_to_gbq.py @@ -2,8 +2,8 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -import google.cloud.bigquery import google.api_core.exceptions +import google.cloud.bigquery from pandas import DataFrame import pytest From 53a46833a320963d5c15427f6eb631e0199fb332 Mon Sep 17 00:00:00 2001 From: Lingqing Gan Date: Wed, 29 May 2024 11:32:03 -0700 Subject: [PATCH 3/7] fix: handle None when converting numerics to parquet (#768) * fix: handle None when converting numerics to parquet * lint and fix unit test * add check for pandas.NA --- pandas_gbq/load.py | 11 ++++++++++- tests/unit/test_load.py | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/pandas_gbq/load.py b/pandas_gbq/load.py index cf495e00..45e474b2 100644 --- a/pandas_gbq/load.py +++ b/pandas_gbq/load.py @@ -99,7 +99,16 @@ def cast_dataframe_for_parquet( errors="ignore", ) elif column_type in {"NUMERIC", "DECIMAL", "BIGNUMERIC", "BIGDECIMAL"}: - cast_column = dataframe[column_name].map(decimal.Decimal) + # decimal.Decimal does not support `None` or `pandas.NA` input, add + # support here. + # https://github.com/googleapis/python-bigquery-pandas/issues/719 + def convert(x): + if pandas.isna(x): # true for `None` and `pandas.NA` + return decimal.Decimal("NaN") + else: + return decimal.Decimal(x) + + cast_column = dataframe[column_name].map(convert) else: cast_column = None diff --git a/tests/unit/test_load.py b/tests/unit/test_load.py index 5f38d244..45c73533 100644 --- a/tests/unit/test_load.py +++ b/tests/unit/test_load.py @@ -369,3 +369,22 @@ def test_cast_dataframe_for_parquet_w_null_fields(): schema = {"fields": None} result = load.cast_dataframe_for_parquet(dataframe, schema) pandas.testing.assert_frame_equal(result, expected) + + +# Verifies null numerics are properly handled +# https://github.com/googleapis/python-bigquery-pandas/issues/719 +def test_cast_dataframe_for_parquet_w_null_numerics(): + from decimal import Decimal + + nans = pandas.Series([Decimal("3.14"), Decimal("nan"), None, pandas.NA]) + dataframe = pandas.DataFrame({"A": nans}) + + schema = {"fields": [{"name": "A", "type": "BIGNUMERIC"}]} + result = load.cast_dataframe_for_parquet(dataframe, schema) + + # pandas.testing.assert_frame_equal() doesn't distinguish Decimal("NaN") + # vs. None, verify Decimal("NaN") directly. + # https://github.com/pandas-dev/pandas/issues/18463 + assert result["A"][1].is_nan() + assert result["A"][2].is_nan() + assert result["A"][3].is_nan() From 44b8a8e7a7372d285dc31e69eeb14357df1c8f17 Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Wed, 29 May 2024 15:40:40 -0400 Subject: [PATCH 4/7] fix: clean up nox sessions to uniformly displays package versions for debug purposes (#777) * specify a particular version of bigquery to debug * fix: updates noxfile to cleanup debugging code * Update noxfile.py --- noxfile.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/noxfile.py b/noxfile.py index 2faa9bf9..a8fb6c47 100644 --- a/noxfile.py +++ b/noxfile.py @@ -527,16 +527,10 @@ def prerelease_deps(session): "requests", ] session.install(*other_deps) - session.run("python", "-m", "pip", "freeze") # Print out package versions. session.run("python", "-m", "pip", "freeze") - session.run( - "python", "-c", "import google.protobuf; print(google.protobuf.__version__)" - ) - session.run("python", "-c", "import grpc; print(grpc.__version__)") - session.run("py.test", "tests/unit") system_test_path = os.path.join("tests", "system.py") From 33dac712314e83daa57adedc8f2886546737db03 Mon Sep 17 00:00:00 2001 From: Kira Date: Tue, 4 Jun 2024 10:59:04 -0400 Subject: [PATCH 5/7] chore: pip check on conda forge dependencies (#723) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: pip check on conda forge dependencies * reformatted with black * Update noxfile.py * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Chalmer Lowe Co-authored-by: Owl Bot --- noxfile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/noxfile.py b/noxfile.py index a8fb6c47..3d0ce244 100644 --- a/noxfile.py +++ b/noxfile.py @@ -22,6 +22,7 @@ import pathlib import re import shutil +import subprocess import warnings import nox @@ -614,6 +615,12 @@ def conda_test(session): # for troubleshooting purposes. session.run("mamba", "list") + # Using subprocess.run() instead of session.run() because + # session.run() does not correctly handle the pip check command. + subprocess.run( + ["pip", "check"], check=True + ) # Raise an exception if pip check fails + # Tests are limited to unit tests only, at this time. session.run( "py.test", From 8a03d44fbe125ae1202f43b7c6e54c98eca94d4d Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Fri, 7 Jun 2024 13:52:20 -0400 Subject: [PATCH 6/7] fix: set minimum allowable version of sqlite when performing a conda install (#780) Fix: sets minimum allowable version of `sqlite` when performing a `conda` install. Conda installs were killing the install of packages in the presubmit `conda_test-3.12` test. See this [check for context](https://source.cloud.google.com/results/invocations/beabfa58-9228-40fb-a60b-48df1944b159). --- noxfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/noxfile.py b/noxfile.py index 3d0ce244..9581c251 100644 --- a/noxfile.py +++ b/noxfile.py @@ -607,6 +607,7 @@ def conda_test(session): "pydata-google-auth", "tqdm", "protobuf", + "sqlite>3.31.1", # v3.31.1 caused test failures ] install_conda_unittest_dependencies(session, standard_deps, conda_forge_packages) From 60a988716a4ecd8d3d42a8d42a87de91c24b4bcf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 10:23:50 -0400 Subject: [PATCH 7/7] chore(main): release 0.23.1 (#774) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 13 +++++++++++++ pandas_gbq/version.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8743a7df..418201bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [0.23.1](https://github.com/googleapis/python-bigquery-pandas/compare/v0.23.0...v0.23.1) (2024-06-07) + + +### Bug Fixes + +* Handle None when converting numerics to parquet ([#768](https://github.com/googleapis/python-bigquery-pandas/issues/768)) ([53a4683](https://github.com/googleapis/python-bigquery-pandas/commit/53a46833a320963d5c15427f6eb631e0199fb332)) +* Set minimum allowable version of sqlite when performing a conda install ([#780](https://github.com/googleapis/python-bigquery-pandas/issues/780)) ([8a03d44](https://github.com/googleapis/python-bigquery-pandas/commit/8a03d44fbe125ae1202f43b7c6e54c98eca94d4d)) + + +### Documentation + +* Use a short-link to BigQuery DataFrames ([#773](https://github.com/googleapis/python-bigquery-pandas/issues/773)) ([7cd4287](https://github.com/googleapis/python-bigquery-pandas/commit/7cd4287ae70861e4949487db578ab1916d853029)) + ## [0.23.0](https://github.com/googleapis/python-bigquery-pandas/compare/v0.22.0...v0.23.0) (2024-05-20) diff --git a/pandas_gbq/version.py b/pandas_gbq/version.py index 661af4a1..2de80e86 100644 --- a/pandas_gbq/version.py +++ b/pandas_gbq/version.py @@ -2,4 +2,4 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -__version__ = "0.23.0" +__version__ = "0.23.1"