From 2976471b0aa850dc7eec7a72dc3153d5e7dabe68 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Thu, 22 Aug 2024 11:39:41 -0700 Subject: [PATCH 1/7] Add python 3.13 tests, fixes:#518 Change-Id: I9f46b79ad9a111cf47eb25fbab3553a4f2db005d --- .github/workflows/test_pr.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test_pr.yaml b/.github/workflows/test_pr.yaml index 362a53e49..a509ad98c 100644 --- a/.github/workflows/test_pr.yaml +++ b/.github/workflows/test_pr.yaml @@ -15,6 +15,19 @@ on: workflow_dispatch: jobs: + test3_13: + name: Test Py3.13 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.13' + - name: Run tests + run: | + python --version + pip install .[dev] + python -m unittest test3_12: name: Test Py3.12 runs-on: ubuntu-latest From b31aa6a33ec8d25872bdc4fdcd8cddcd4eab2de6 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Thu, 22 Aug 2024 11:44:19 -0700 Subject: [PATCH 2/7] self-test Change-Id: Ib712998fcf1c8a12163a8861d4531cc4840e12a7 --- .github/workflows/test_pr.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pr.yaml b/.github/workflows/test_pr.yaml index a509ad98c..1862b8430 100644 --- a/.github/workflows/test_pr.yaml +++ b/.github/workflows/test_pr.yaml @@ -6,10 +6,11 @@ on: # Relevant PRs pull_request: paths: + - ".github/workflows/test_pr.yml" - "google/**" - "tests/**" - - "samples/**" - "pyproject.toml" + - "samples/*.py" - "setup.py" # Allow manual runs workflow_dispatch: From f63563fcba8bd7148d2773f6e54861c438193cf8 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Thu, 22 Aug 2024 11:48:46 -0700 Subject: [PATCH 3/7] test Change-Id: I58fded9ee4abed26c02659f973ea9cf44d164ab3 --- google/generativeai/operations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/google/generativeai/operations.py b/google/generativeai/operations.py index 52fd8a1b8..cda3802ad 100644 --- a/google/generativeai/operations.py +++ b/google/generativeai/operations.py @@ -36,7 +36,8 @@ def list_operations(*, client=None) -> Iterator[CreateTunedModelOperation]: # not a gapic Operation object (`google.api_core.operation.Operation`) operations = ( CreateTunedModelOperation.from_proto(op, client) - for op in client.list_operations(name="", filter_="") + for op in client.list_operations( + name="", filter_="") ) return operations From 9ce4014153e6ef8e24c6828b567f1cfbdefaadc6 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Thu, 22 Aug 2024 11:50:52 -0700 Subject: [PATCH 4/7] test Change-Id: I35aeccc62c5ba3e72e5a9665646d2311276c5251 --- .github/workflows/test_pr.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test_pr.yaml b/.github/workflows/test_pr.yaml index 1862b8430..5de4b3583 100644 --- a/.github/workflows/test_pr.yaml +++ b/.github/workflows/test_pr.yaml @@ -6,7 +6,6 @@ on: # Relevant PRs pull_request: paths: - - ".github/workflows/test_pr.yml" - "google/**" - "tests/**" - "pyproject.toml" From 1f818488082653b6fa2dd0556d21432f666429ea Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Tue, 8 Oct 2024 16:26:09 -0700 Subject: [PATCH 5/7] Update test_pr.yaml --- .github/workflows/test_pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pr.yaml b/.github/workflows/test_pr.yaml index 5de4b3583..9c71c572f 100644 --- a/.github/workflows/test_pr.yaml +++ b/.github/workflows/test_pr.yaml @@ -11,7 +11,7 @@ on: - "pyproject.toml" - "samples/*.py" - "setup.py" - # Allow manual runs + # Allow manual runs workflow_dispatch: jobs: From 52533a130e6435f3c7f4485f3c27de6e4efb0c56 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Tue, 8 Oct 2024 16:30:52 -0700 Subject: [PATCH 6/7] format Change-Id: I60a9bb9ede84c4bcf10f11f35189c49d8e3da25c --- google/generativeai/operations.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/google/generativeai/operations.py b/google/generativeai/operations.py index cda3802ad..52fd8a1b8 100644 --- a/google/generativeai/operations.py +++ b/google/generativeai/operations.py @@ -36,8 +36,7 @@ def list_operations(*, client=None) -> Iterator[CreateTunedModelOperation]: # not a gapic Operation object (`google.api_core.operation.Operation`) operations = ( CreateTunedModelOperation.from_proto(op, client) - for op in client.list_operations( - name="", filter_="") + for op in client.list_operations(name="", filter_="") ) return operations From 189faa27c2cb03264daac1b5317b39079e40b1b2 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Tue, 8 Oct 2024 16:31:48 -0700 Subject: [PATCH 7/7] Revert "format" This reverts commit 52533a130e6435f3c7f4485f3c27de6e4efb0c56. --- google/generativeai/operations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/google/generativeai/operations.py b/google/generativeai/operations.py index 52fd8a1b8..cda3802ad 100644 --- a/google/generativeai/operations.py +++ b/google/generativeai/operations.py @@ -36,7 +36,8 @@ def list_operations(*, client=None) -> Iterator[CreateTunedModelOperation]: # not a gapic Operation object (`google.api_core.operation.Operation`) operations = ( CreateTunedModelOperation.from_proto(op, client) - for op in client.list_operations(name="", filter_="") + for op in client.list_operations( + name="", filter_="") ) return operations