Skip to content
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

add unasync to project dependencies #56

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
16 changes: 1 addition & 15 deletions libs/elasticsearch/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions libs/elasticsearch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,8 @@ optional = true

[tool.poetry.group.test_integration.dependencies]



[tool.poetry.group.codegen.dependencies]
unasync = "^0.6.0"
isort = "^5.13.2"

[tool.ruff]
select = [
Expand Down
2 changes: 1 addition & 1 deletion libs/elasticsearch/scripts/run_unasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def main(check=False):
for dir in source_dirs:
output_dir = f"{dir[0]}_sync_check/" if check else dir[1]
subprocess.check_call(["ruff", "format", "--target-version=py38", output_dir])
subprocess.check_call(["isort", output_dir])
subprocess.check_call(["ruff", "check", "--fix", "--select", "I", output_dir])
pquentin marked this conversation as resolved.
Show resolved Hide resolved
for file in glob("*.py", root_dir=dir[0]):
subprocess.check_call(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
from typing import Any, Dict, List, Optional

from elastic_transport import Transport
from elasticsearch import BadRequestError, ConflictError, Elasticsearch, NotFoundError
from elasticsearch import (
BadRequestError,
ConflictError,
Elasticsearch,
NotFoundError,
)


def read_env() -> Dict:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
from langchain.globals import set_llm_cache
from langchain_core.language_models import BaseChatModel

from langchain_elasticsearch import ElasticsearchCache, ElasticsearchEmbeddingsCache
from langchain_elasticsearch import (
ElasticsearchCache,
ElasticsearchEmbeddingsCache,
)

from ._test_utilities import clear_test_indices, create_es_client, read_env

Expand Down
5 changes: 4 additions & 1 deletion libs/elasticsearch/tests/unit_tests/_sync/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
from langchain_core.load import dumps
from langchain_core.outputs import Generation

from langchain_elasticsearch import ElasticsearchCache, ElasticsearchEmbeddingsCache
from langchain_elasticsearch import (
ElasticsearchCache,
ElasticsearchEmbeddingsCache,
)


def serialize_encode_vector(vector: Any) -> str:
Expand Down
Loading