Skip to content

Commit

Permalink
Merge branch 'main' into renovate/python-nonmajor
Browse files Browse the repository at this point in the history
  • Loading branch information
averikitsch authored Sep 19, 2024
2 parents bccb84d + d0a8801 commit d261bdc
Show file tree
Hide file tree
Showing 21 changed files with 1,085 additions and 83 deletions.
1 change: 0 additions & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ branchProtectionRules:
requiredStatusCheckContexts:
- "cla/google"
- "lint"
- "integration-test-pr-py38 (langchain-alloydb-testing)"
- "integration-test-pr-py39 (langchain-alloydb-testing)"
- "integration-test-pr-py310 (langchain-alloydb-testing)"
- "integration-test-pr-py311 (langchain-alloydb-testing)"
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /
export PYTHONUNBUFFERED=1

# Move into the package, build the distribution and upload.
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1")
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-2")
cd github/langchain-google-alloydb-pg-python
python3 -m build --wheel
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*
2 changes: 1 addition & 1 deletion .kokoro/release/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google-cloud-pypi-token-keystore-1"
keyname: "google-cloud-pypi-token-keystore-2"
}
}
}
Expand Down
36 changes: 31 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## [0.7.0](https://github.com/googleapis/langchain-google-alloydb-pg-python/compare/v0.6.0...v0.7.0) (2024-09-17)


### ⚠ BREAKING CHANGES

* support async and sync versions of indexing methods
* remove _aexecute(), _execute(), _afetch(), and _fetch() methods

### Features

* Add from_engine_args method ([f06834d](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/f06834d67b3219d0981dbad191f0c6d89dc8aa03))
* Add multi-modal support vector store ([#207](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/207)) ([8d259ba](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/8d259ba0c98476b312e7a7201fa86f9316919ab6))
* Add support for custom schema names ([#210](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/210)) ([f148a7e](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/f148a7e7ebd58afc18ee32f42bfe980a5fde9907))
* Add support for sync from_engine ([f06834d](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/f06834d67b3219d0981dbad191f0c6d89dc8aa03))
* Allow non-uuid data types for vectorstore primary key ([#226](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/226)) ([e6dc991](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/e6dc9918afa42086cc975056bb23862d4bb7017e))
* Made add_embeddings method public ([#228](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/228)) ([433b92f](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/433b92f4a2c62ccc2244c95feba9e1e0ec9620ea))
* Refactor to support both async and sync usage ([f06834d](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/f06834d67b3219d0981dbad191f0c6d89dc8aa03))


### Bug Fixes

* Fix documentation comments for library methods. ([#219](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/219)) ([5b923b2](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/5b923b299fba54e3be36363f070fec7264444aea))
* Replacing cosine_similarity and maximal_marginal_relevance methods ([#218](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/218)) ([d827ccc](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/d827ccce0ba3b032e636b26e9ea5c5a5d3e151f6))
* Support async and sync versions of indexing methods ([f06834d](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/f06834d67b3219d0981dbad191f0c6d89dc8aa03))


### Documentation

* Added example for chat message history with omni ([#191](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/191)) ([2e6809f](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/2e6809f0ae0063307d49529e784e65a4929e9c85))
* Add Migration samples for migrating from vector store to AlloyDB ([#230](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/230)) ([9fd9308](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/9fd93081aa8307d9190f7f30ef6746e0e9aeedbe))

## [0.6.0](https://github.com/googleapis/langchain-google-alloydb-pg-python/compare/v0.5.0...v0.6.0) (2024-09-03)


Expand Down Expand Up @@ -27,11 +58,6 @@
* Rename index guide ([#201](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/201)) ([2436c5b](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/2436c5b2120d69938644e20181559aa62b95fc84))
* Update index tuning samples to include advanced indexes ([#197](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/197)) ([da52bc4](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/da52bc421da1ca8cad78184566426b22941b09af))


### Miscellaneous Chores

* Release 0.6.0 ([#217](https://github.com/googleapis/langchain-google-alloydb-pg-python/issues/217)) ([3d96251](https://github.com/googleapis/langchain-google-alloydb-pg-python/commit/3d9625131e3412e6d2958856224ef251baa625bd))

## [0.5.0](https://github.com/googleapis/langchain-google-alloydb-pg-python/compare/v0.4.1...v0.5.0) (2024-07-23)


Expand Down
12 changes: 6 additions & 6 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This allows your code to dynamically reflect any changes you make to the library
Notes:

* Tests run against public and private IP addresses. Tests for private IP can not be run locally due to VPC restrictions. There is no current way to prevent these tests from running. These tests will time out.
* Tests use both IAM and built-in authentication.
* Tests use both IAM and built-in authentication.
* Learn how to set up a built-in databases user at [Manage AlloyDB user roles](https://cloud.google.com/alloydb/docs/database-users/about).
* Local tests will run against your `gcloud` credentials. Use `gcloud` to login with your personal account or a service account. This account will be used to run IAM tests. Learn how to set up access to the database at [Manage IAM authentication](https://cloud.google.com/alloydb/docs/manage-iam-authn). The "IAM_ACCOUNT" environment variable is also used to test authentication to override the local account. A personal account or a service account can be used for this test.
* You may need to grant access to the public schema for your new database user: `GRANT ALL ON SCHEMA public TO [email protected];`
Expand All @@ -54,11 +54,11 @@ These tests are registered as required tests in `.github/sync-repo-settings.yaml

#### Trigger Setup

Cloud Build triggers (for Python versions 3.8 to 3.11) were created with the following specs:
Cloud Build triggers (for Python versions 3.9 to 3.11) were created with the following specs:

```YAML
name: integration-test-pr-py38
description: Run integration tests on PR for Python 3.8
name: integration-test-pr-py39
description: Run integration tests on PR for Python 3.9
filename: integration.cloudbuild.yaml
github:
name: langchain-google-alloydb-pg-python
Expand All @@ -76,7 +76,7 @@ substitutions:
_DATABASE_ID: <ADD_VALUE>
_INSTANCE_ID: <ADD_VALUE>
_REGION: us-central1
_VERSION: "3.8"
_VERSION: "3.9"
```

Use `gcloud builds triggers import --source=trigger.yaml` to create triggers via the command line
Expand Down Expand Up @@ -104,7 +104,7 @@ To run Cloud Build tests on GitHub from external contributors, ie RenovateBot, c
#### 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.
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.
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies.
Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^

Python >= 3.8
Python >= 3.9

Mac/Linux
^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion integration.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ availableSecrets:
env: "IAM_ACCOUNT"

substitutions:
_VERSION: "3.8"
_VERSION: "3.9"
_INSTANCE_CONNECTION_NAME: projects/${PROJECT_ID}/locations/${_REGION}/clusters/${_CLUSTER_ID}/instances/${_INSTANCE_ID}
_DATABASE_PORT: "5432"
_IP_ADDRESS: "127.0.0.1"
Expand Down
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]
description = "LangChain integrations for Google Cloud AlloyDB for PostgreSQL"
readme = "README.rst"
license = {file = "LICENSE"}
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [
{name = "Google LLC", email = "[email protected]"}
]
Expand All @@ -21,7 +21,6 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -44,18 +43,22 @@ test = [
"mypy==1.11.2",
"pytest-asyncio==0.24.0",
"pytest==8.3.3",
"pytest-cov==5.0.0"
"pytest-cov==5.0.0",
"Pillow==10.4.0"
]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.black]
target-version = ['py39']

[tool.isort]
profile = "black"

[tool.mypy]
python_version = "3.8"
python_version = "3.9"
warn_unused_configs = true
disallow_incomplete_defs = true

Expand Down
6 changes: 2 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
google-cloud-alloydb-connector[asyncpg]==1.4.0
langchain-core==0.2.39; python_version <= "3.8"
langchain-core==0.3.0; python_version > "3.8"
numpy==1.24.4; python_version <= "3.8"
numpy==1.26.4; python_version > "3.8"
langchain-core==0.3.0
numpy==1.26.4
pgvector==0.3.3
SQLAlchemy[asyncio]==2.0.35
Loading

0 comments on commit d261bdc

Please sign in to comment.