Skip to content

Commit b6c1428

Browse files
chore(python): fix docs publish build (#313)
* chore(python): fix docs publish build Source-Link: googleapis/synthtool@bd9ede2 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:04c35dc5f49f0f503a306397d6d043685f8d2bb822ab515818c4208d7fb2db3a * remove unit3.7 * remove uncovered tests after dropping python 3.7 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Chelsea Lin <[email protected]>
1 parent e132ed6 commit b6c1428

File tree

10 files changed

+243
-49
lines changed

10 files changed

+243
-49
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 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.
@@ -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:8e3e7e18255c22d1489258d0374c901c01f9c4fd77a12088670cd73d580aa737
17-
# created: 2024-12-17T00:59:58.625514486Z
16+
digest: sha256:04c35dc5f49f0f503a306397d6d043685f8d2bb822ab515818c4208d7fb2db3a
17+
# created: 2025-01-16T15:24:11.364245182Z

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

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
11+
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4

.kokoro/docker/docs/requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
nox
2+
gcp-docuploader

.kokoro/docker/docs/requirements.txt

Lines changed: 234 additions & 9 deletions
Large diffs are not rendered by default.

.kokoro/publish-docs.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ export PYTHONUNBUFFERED=1
2020

2121
export PATH="${HOME}/.local/bin:${PATH}"
2222

23-
# Install nox
24-
python3.10 -m pip install --require-hashes -r .kokoro/requirements.txt
25-
python3.10 -m nox --version
26-
2723
# build docs
2824
nox -s docs
2925

db_dtypes/pandas_backports.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
the versions in the later versions of pandas.
2020
"""
2121

22-
import operator
2322
from typing import Any
2423

2524
import numpy
@@ -63,10 +62,7 @@ def import_default(module_name, force=False, default=None):
6362
return default
6463

6564
name = default.__name__
66-
try:
67-
module = __import__(module_name, {}, {}, [name])
68-
except ModuleNotFoundError:
69-
return default
65+
module = __import__(module_name, {}, {}, [name])
7066

7167
return getattr(module, name, default)
7268

@@ -80,26 +76,6 @@ class OpsMixin:
8076
def _cmp_method(self, other, op): # pragma: NO COVER
8177
return NotImplemented
8278

83-
def __eq__(self, other):
84-
return self._cmp_method(other, operator.eq)
85-
86-
def __ne__(self, other):
87-
return self._cmp_method(other, operator.ne)
88-
89-
def __lt__(self, other):
90-
return self._cmp_method(other, operator.lt)
91-
92-
def __le__(self, other):
93-
return self._cmp_method(other, operator.le)
94-
95-
def __gt__(self, other):
96-
return self._cmp_method(other, operator.gt)
97-
98-
def __ge__(self, other):
99-
return self._cmp_method(other, operator.ge)
100-
101-
__add__ = __radd__ = __sub__ = lambda self, other: NotImplemented
102-
10379

10480
# TODO: use public API once pandas 1.5 / 2.x is released.
10581
# See: https://github.com/pandas-dev/pandas/pull/45544

renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
":preserveSemverRanges",
66
":disableDependencyDashboard"
77
],
8-
"ignorePaths": [".pre-commit-config.yaml", ".kokoro/requirements.txt", "setup.py"],
8+
"ignorePaths": [".pre-commit-config.yaml", ".kokoro/requirements.txt", "setup.py", ".github/workflows/unittest.yml"],
99
"pip_requirements": {
1010
"fileMatch": ["requirements-test.txt", "samples/[\\S/]*constraints.txt", "samples/[\\S/]*constraints-test.txt"]
1111
}

tests/unit/test_date.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@
4848
float("nan"),
4949
]
5050

51-
if hasattr(pandas, "NA"):
52-
NULL_VALUE_TEST_CASES.append(pandas.NA)
53-
5451

5552
def test_box_func():
5653
input_array = db_dtypes.DateArray([])

tests/unit/test_dtypes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,7 @@ def test_date_add():
584584
do = pd.DateOffset(days=1)
585585
expect = dates.astype("object") + do
586586
np.testing.assert_array_equal(dates + do, expect)
587-
if pandas_release >= (1, 1):
588-
np.testing.assert_array_equal(do + dates, expect)
587+
np.testing.assert_array_equal(do + dates, expect)
589588

590589
with pytest.raises(TypeError):
591590
dates + times.astype("timedelta64")

0 commit comments

Comments
 (0)