From cd3bce111eabe06e97b6e292da792c6a316d510a Mon Sep 17 00:00:00 2001 From: Konstantin Krestnikov Date: Tue, 8 Oct 2024 17:03:12 +0300 Subject: [PATCH] Fixing CI --- .github/scripts/check_diff.py | 27 ++++++++++++++++--- .../utilities/yandex_search.py | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/scripts/check_diff.py b/.github/scripts/check_diff.py index 1d988378445d8..13a6b28d7ff96 100644 --- a/.github/scripts/check_diff.py +++ b/.github/scripts/check_diff.py @@ -11,6 +11,8 @@ LANGCHAIN_DIRS = [ + # "libs/core", + # "libs/text-splitters", "libs/langchain", "libs/community", ] @@ -104,8 +106,8 @@ def add_dependents(dirs_to_eval: Set[str], dependents: dict) -> List[str]: def _get_configs_for_single_dir(job: str, dir_: str) -> List[Dict[str, str]]: - min_python = "3.9" - max_python = "3.12" + if job == "test-pydantic": + return _get_pydantic_test_configs(dir_) if dir_ == "libs/core": py_versions = ["3.9", "3.10", "3.11", "3.12"] @@ -255,11 +257,28 @@ def _get_configs_for_multi_dirs( found = True if found: dirs_to_run["extended-test"].add(dir_) + elif file.startswith("libs/standard-tests"): + # TODO: update to include all packages that rely on standard-tests (all partner packages) + # note: won't run on external repo partners + dirs_to_run["lint"].add("libs/standard-tests") + dirs_to_run["test"].add("libs/partners/mistralai") + dirs_to_run["test"].add("libs/partners/openai") + dirs_to_run["test"].add("libs/partners/anthropic") + dirs_to_run["test"].add("libs/partners/fireworks") + dirs_to_run["test"].add("libs/partners/groq") + elif file.startswith("libs/cli"): # todo: add cli makefile pass - elif file.startswith("libs/streamlit_agent"): - pass + elif file.startswith("libs/partners"): + partner_dir = file.split("/")[2] + if os.path.isdir(f"libs/partners/{partner_dir}") and [ + filename + for filename in os.listdir(f"libs/partners/{partner_dir}") + if not filename.startswith(".") + ] != ["README.md"]: + dirs_to_run["test"].add(f"libs/partners/{partner_dir}") + # Skip if the directory was deleted or is just a tombstone readme elif file.startswith("libs/"): raise ValueError( f"Unknown lib: {file}. check_diff.py likely needs " diff --git a/libs/community/langchain_community/utilities/yandex_search.py b/libs/community/langchain_community/utilities/yandex_search.py index 68a460176c0c0..f06ad160fc8a1 100644 --- a/libs/community/langchain_community/utilities/yandex_search.py +++ b/libs/community/langchain_community/utilities/yandex_search.py @@ -3,7 +3,7 @@ import re from typing import Any, Dict, List, Literal -from langchain_core.pydantic_v1 import BaseModel, Extra, SecretStr, root_validator +from langchain_core.pydantic_v1 import BaseModel, SecretStr, root_validator from langchain_core.utils import get_from_dict_or_env