From 6e33931a6605ef4b2b4b2908c4cf49fcf47a6b74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 09:16:33 -0700 Subject: [PATCH 1/9] chore(deps): bump jinja2 from 3.1.3 to 3.1.4 in /.kokoro (#49) Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4) --- updated-dependencies: - dependency-name: jinja2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .kokoro/requirements.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index c2ce28d..1b2d154 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -273,10 +273,12 @@ jaraco-classes==3.3.1 \ jeepney==0.8.0 \ --hash=sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806 \ --hash=sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755 - # via secretstorage -jinja2==3.1.3 \ - --hash=sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa \ - --hash=sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90 + # via + # keyring + # secretstorage +jinja2==3.1.4 \ + --hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \ + --hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d # via gcp-releasetool keyring==24.3.1 \ --hash=sha256:c3327b6ffafc0e8befbdb597cacdb4928ffe5c1212f7645f186e6d9957a898db \ @@ -479,7 +481,9 @@ rsa==4.9 \ secretstorage==3.3.3 \ --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 - # via -r requirements.in + # via + # -r requirements.in + # keyring six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 From 51fbde317243fff8f5c1f2e3482a7f9062216415 Mon Sep 17 00:00:00 2001 From: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> Date: Mon, 20 May 2024 16:06:25 -0400 Subject: [PATCH 2/9] ci: Add blunderbuss config (#51) * ci: Add blunderbuss config * ignore header --- .github/blunderbuss.yml | 4 ++++ .github/header-checker-lint.yml | 1 + 2 files changed, 5 insertions(+) create mode 100644 .github/blunderbuss.yml diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 0000000..e572fb5 --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,4 @@ +assign_issues: + - googleapis/langchain-bigtable +assign_prs: + - googleapis/langchain-bigtable diff --git a/.github/header-checker-lint.yml b/.github/header-checker-lint.yml index 53c9c5c..5a21e5f 100644 --- a/.github/header-checker-lint.yml +++ b/.github/header-checker-lint.yml @@ -11,6 +11,7 @@ sourceFileExtensions: - "py" - "text" ignoreFiles: + - ".github/blunderbuss.yml" - ".github/release-please.yml" - ".github/release-trigger.yml" - ".github/header-checker-lint.yml" From 184ad848c17663c606dd56694443b4f64bcdf01f Mon Sep 17 00:00:00 2001 From: Wenxin Du <117315983+duwenxin99@users.noreply.github.com> Date: Mon, 20 May 2024 16:31:14 -0400 Subject: [PATCH 3/9] ci: Add code coverage check (#50) * ci: Add code coverage check * add cloud build test arg * fix typo --------- Co-authored-by: Averi Kitsch --- .coveragerc | 8 ++++++++ DEVELOPER.md | 14 +++++++++++++- integration.cloudbuild.yaml | 2 +- pyproject.toml | 3 ++- 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..2c634d5 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +branch = true +omit = + */__init__.py + +[report] +show_missing = true +fail_under = 90 \ No newline at end of file diff --git a/DEVELOPER.md b/DEVELOPER.md index 5348073..11189b1 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -55,7 +55,7 @@ substitutions: _VERSION: "3.8" ``` -Use `gcloud builds triggers import --source=trigger.yaml` create triggers via the command line +Use `gcloud builds triggers import --source=trigger.yaml` to create triggers via the command line #### Project Setup @@ -74,5 +74,17 @@ Use `gcloud builds triggers import --source=trigger.yaml` create triggers via th To run Cloud Build tests on GitHub from external contributors, ie RenovateBot, comment: `/gcbrun`. +#### Code Coverage +Please make sure your code is fully tested. The Cloud Build integration tests are run with the `pytest-cov` code coverage plugin. They fail for PRs with a code coverage less than the threshold specified in `.coveragerc`. If your file is inside the main module and should be ignored by code coverage check, add it to the `omit` section of `.coveragerc`. + +Check for code coverage report in any Cloud Build integration test log. +Here is a breakdown of the report: +- `Stmts`: lines of executable code (statements). +- `Miss`: number of lines not covered by tests. +- `Branch`: branches of executable code (e.g an if-else clause may count as 1 statement but 2 branches; test for both conditions to have both branches covered). +- `BrPart`: number of branches not covered by tests. +- `Cover`: average coverage of files. +- `Missing`: lines that are not covered by tests. + [triggers]: https://console.cloud.google.com/cloud-build/triggers?e=13802955&project=langchain-cloud-sql-testing \ No newline at end of file diff --git a/integration.cloudbuild.yaml b/integration.cloudbuild.yaml index e25bc62..d0549c5 100644 --- a/integration.cloudbuild.yaml +++ b/integration.cloudbuild.yaml @@ -25,8 +25,8 @@ steps: - id: Run integration tests name: python:${_VERSION} + args: ["-m", "pytest", "--cov=langchain_google_bigtable", "--cov-config=.coveragerc", "tests/"] entrypoint: python - args: ["-m", "pytest"] env: - "PROJECT_ID=$PROJECT_ID" - "INSTANCE_ID=test-instance" diff --git a/pyproject.toml b/pyproject.toml index 38705aa..9ee75af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,8 @@ test = [ "isort==5.13.2", "mypy==1.9.0", "pytest-asyncio==0.23.5.post1", - "pytest==7.4.4" + "pytest==7.4.4", + "pytest-cov==5.0.0" ] [build-system] From 90b0f83bd451d23af460e18736641ee8e783b02f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 13:34:46 -0700 Subject: [PATCH 4/9] chore(deps): bump requests from 2.31.0 to 2.32.0 in /.kokoro (#53) updated-dependencies: - dependency-name: requests dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .kokoro/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 1b2d154..7eb2ec2 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -453,9 +453,9 @@ readme-renderer==42.0 \ --hash=sha256:13d039515c1f24de668e2c93f2e877b9dbe6c6c32328b90a40a49d8b2b85f36d \ --hash=sha256:2d55489f83be4992fe4454939d1a051c33edbab778e82761d060c9fc6b308cd1 # via twine -requests==2.31.0 \ - --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ - --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 +requests==2.32.0 \ + --hash=sha256:f2c3881dddb70d056c5bd7600a4fae312b2a300e39be6a118d30b90bd27262b5 \ + --hash=sha256:fa5490319474c82ef1d2c9bc459d3652e3ae4ef4c4ebdd18a21145a47ca4b6b8 # via # gcp-releasetool # google-api-core From 1c248b17ceedbb44cf6d361cdeeeec42b74fbcd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:23:43 -0700 Subject: [PATCH 5/9] chore(deps): bump urllib3 from 2.2.1 to 2.2.2 in /.kokoro (#58) Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.2.1 to 2.2.2. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/2.2.1...2.2.2) --- updated-dependencies: - dependency-name: urllib3 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .kokoro/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 7eb2ec2..ad774a6 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -502,9 +502,9 @@ typing-extensions==4.10.0 \ --hash=sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475 \ --hash=sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb # via -r requirements.in -urllib3==2.2.1 \ - --hash=sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d \ - --hash=sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19 +urllib3==2.2.2 \ + --hash=sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472 \ + --hash=sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168 # via # requests # twine From f3ac73a1e55b7387997334129a2a8e8661e7cc9a Mon Sep 17 00:00:00 2001 From: ron-gal <125445217+ron-gal@users.noreply.github.com> Date: Tue, 25 Jun 2024 00:38:03 +0300 Subject: [PATCH 6/9] fix: Increase delay in test (#60) * Increase delay in test It seems 10 seconds are not enough time to wait for eventual consistency. * Update test_bigtable_loader.py --- tests/test_bigtable_loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_bigtable_loader.py b/tests/test_bigtable_loader.py index 2c6fddf..db8df5d 100644 --- a/tests/test_bigtable_loader.py +++ b/tests/test_bigtable_loader.py @@ -100,7 +100,7 @@ def test_bigtable_loads_of_messages( saver.add_documents(written_docs) # wait for eventual consistency - time.sleep(10) + time.sleep(20) returned_docs = loader.load() @@ -113,7 +113,7 @@ def test_bigtable_loads_of_messages( saver.delete(returned_docs[:-1]) # wait for eventual consistency - time.sleep(10) + time.sleep(20) returned_docs = loader.load() assert len(returned_docs) == 1 From f0a247529d092b2eb5c780b00b4e3651fc092803 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 25 Jun 2024 00:33:06 +0200 Subject: [PATCH 7/9] chore(deps): update python-nonmajor (#55) Co-authored-by: Averi Kitsch --- pyproject.toml | 4 ++-- requirements.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9ee75af..566d76f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,8 +38,8 @@ Changelog = "https://github.com/googleapis/langchain-google-bigtable-python/blob test = [ "black[jupyter]==23.12.1", "isort==5.13.2", - "mypy==1.9.0", - "pytest-asyncio==0.23.5.post1", + "mypy==1.10.0", + "pytest-asyncio==0.23.7", "pytest==7.4.4", "pytest-cov==5.0.0" ] diff --git a/requirements.txt b/requirements.txt index 387003c..1cb8cc2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -langchain-core==0.1.35 -langchain-community==0.0.28 -google-cloud-bigtable==2.23.0 +langchain-core==0.2.3 +langchain-community==0.2.1 +google-cloud-bigtable==2.23.1 From a8849aba16500ea5bb997f12b7cefdc86b3f2d96 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 25 Jun 2024 18:50:40 +0200 Subject: [PATCH 8/9] chore(deps): update dependency langchain-community to v0.2.5 [security] (#57) * chore(deps): update dependency langchain-community to v0.2.5 [security] * Update requirements.txt --------- Co-authored-by: Averi Kitsch --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 1cb8cc2..b3f5626 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -langchain-core==0.2.3 -langchain-community==0.2.1 +langchain-core==0.2.7 +langchain-community==0.2.5 google-cloud-bigtable==2.23.1 From 44c4ff9f1da63d4a9c00e298bbdebcca81d54a50 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:00:36 +0300 Subject: [PATCH 9/9] chore(main): release 0.2.2 (#61) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ src/langchain_google_bigtable/version.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93271b7..51132e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.2.2](https://github.com/googleapis/langchain-google-bigtable-python/compare/v0.2.1...v0.2.2) (2024-06-25) + + +### Bug Fixes + +* Increase delay in test ([#60](https://github.com/googleapis/langchain-google-bigtable-python/issues/60)) ([f3ac73a](https://github.com/googleapis/langchain-google-bigtable-python/commit/f3ac73a1e55b7387997334129a2a8e8661e7cc9a)) + ## [0.2.1](https://github.com/googleapis/langchain-google-bigtable-python/compare/v0.2.0...v0.2.1) (2024-05-01) diff --git a/src/langchain_google_bigtable/version.py b/src/langchain_google_bigtable/version.py index fffa9d9..6265626 100644 --- a/src/langchain_google_bigtable/version.py +++ b/src/langchain_google_bigtable/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.2.1" +__version__ = "0.2.2"