Skip to content

chore(python): fix docs publish build #313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:8e3e7e18255c22d1489258d0374c901c01f9c4fd77a12088670cd73d580aa737
# created: 2024-12-17T00:59:58.625514486Z
digest: sha256:04c35dc5f49f0f503a306397d6d043685f8d2bb822ab515818c4208d7fb2db3a
# created: 2025-01-16T15:24:11.364245182Z
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup Python
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
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .kokoro/docker/docs/requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nox
gcp-docuploader
243 changes: 234 additions & 9 deletions .kokoro/docker/docs/requirements.txt

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions .kokoro/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ export PYTHONUNBUFFERED=1

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

# Install nox
python3.10 -m pip install --require-hashes -r .kokoro/requirements.txt
python3.10 -m nox --version

# build docs
nox -s docs

Expand Down
26 changes: 1 addition & 25 deletions db_dtypes/pandas_backports.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
the versions in the later versions of pandas.
"""

import operator
from typing import Any

import numpy
Expand Down Expand Up @@ -63,10 +62,7 @@ def import_default(module_name, force=False, default=None):
return default

name = default.__name__
try:
module = __import__(module_name, {}, {}, [name])
except ModuleNotFoundError:
return default
module = __import__(module_name, {}, {}, [name])

return getattr(module, name, default)

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

def __eq__(self, other):
return self._cmp_method(other, operator.eq)

def __ne__(self, other):
return self._cmp_method(other, operator.ne)

def __lt__(self, other):
return self._cmp_method(other, operator.lt)

def __le__(self, other):
return self._cmp_method(other, operator.le)

def __gt__(self, other):
return self._cmp_method(other, operator.gt)

def __ge__(self, other):
return self._cmp_method(other, operator.ge)

__add__ = __radd__ = __sub__ = lambda self, other: NotImplemented


# TODO: use public API once pandas 1.5 / 2.x is released.
# See: https://github.com/pandas-dev/pandas/pull/45544
Expand Down
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
":preserveSemverRanges",
":disableDependencyDashboard"
],
"ignorePaths": [".pre-commit-config.yaml", ".kokoro/requirements.txt", "setup.py"],
"ignorePaths": [".pre-commit-config.yaml", ".kokoro/requirements.txt", "setup.py", ".github/workflows/unittest.yml"],
"pip_requirements": {
"fileMatch": ["requirements-test.txt", "samples/[\\S/]*constraints.txt", "samples/[\\S/]*constraints-test.txt"]
}
Expand Down
3 changes: 0 additions & 3 deletions tests/unit/test_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
float("nan"),
]

if hasattr(pandas, "NA"):
NULL_VALUE_TEST_CASES.append(pandas.NA)


def test_box_func():
input_array = db_dtypes.DateArray([])
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,7 @@ def test_date_add():
do = pd.DateOffset(days=1)
expect = dates.astype("object") + do
np.testing.assert_array_equal(dates + do, expect)
if pandas_release >= (1, 1):
np.testing.assert_array_equal(do + dates, expect)
np.testing.assert_array_equal(do + dates, expect)

with pytest.raises(TypeError):
dates + times.astype("timedelta64")
Expand Down
Loading