Home / File/ __init__.py — langchain Source File

__init__.py — langchain Source File

Architecture documentation for __init__.py, a python file in the langchain codebase. 10 imports, 0 dependents.

File python LangChainCore Runnables 10 imports 5 functions

Entity Profile

Dependency Diagram

graph LR
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36["__init__.py"]
  f69d6389_263d_68a4_7fbf_f14c0602a9ba["pytest"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> f69d6389_263d_68a4_7fbf_f14c0602a9ba
  1fc60df6_16e5_01a1_8794_6cfc90827562["deepagents"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> 1fc60df6_16e5_01a1_8794_6cfc90827562
  688cbebb_da5f_c2ce_7066_d751183752a3["langchain_tests.integration_tests.base_store"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> 688cbebb_da5f_c2ce_7066_d751183752a3
  45b8c4c7_76f2_be81_d85b_1140f5b6f5f0["langchain_tests.integration_tests.cache"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> 45b8c4c7_76f2_be81_d85b_1140f5b6f5f0
  52ae4e74_c39a_c0c4_50f4_624fbd46733e["langchain_tests.integration_tests.chat_models"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> 52ae4e74_c39a_c0c4_50f4_624fbd46733e
  f781abe1_f143_d342_7101_63c8707e2017["langchain_tests.integration_tests.embeddings"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> f781abe1_f143_d342_7101_63c8707e2017
  768231bd_9ad5_0ac0_8efe_b2899ddb91a8["langchain_tests.integration_tests.retrievers"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> 768231bd_9ad5_0ac0_8efe_b2899ddb91a8
  55130d31_1db2_c165_ca09_60a551d12e6a["langchain_tests.integration_tests.tools"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> 55130d31_1db2_c165_ca09_60a551d12e6a
  0f7c8fad_78b2_07eb_8d9d_ced3ed7b4704["langchain_tests.integration_tests.vectorstores"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> 0f7c8fad_78b2_07eb_8d9d_ced3ed7b4704
  eff094e3_4d59_05c1_33a4_e01d499db08f["langchain_tests.integration_tests.sandboxes"]
  1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 --> eff094e3_4d59_05c1_33a4_e01d499db08f
  style 1af52f2b_c7eb_e6c1_69ad_c96cca22ac36 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"""Integration tests for LangChain components."""

# ruff: noqa: E402
import pytest

# Rewrite assert statements for test suite so that implementations can
# see the full error message from failed asserts.
# https://docs.pytest.org/en/7.1.x/how-to/writing_plugins.html#assertion-rewriting
modules = [
    "base_store",
    "cache",
    "chat_models",
    "vectorstores",
    "embeddings",
    "tools",
    "retrievers",
]

for module in modules:
    pytest.register_assert_rewrite(f"langchain_tests.integration_tests.{module}")

_HAS_DEEPAGENTS = False
try:
    import deepagents  # noqa: F401
except ImportError:
    _HAS_DEEPAGENTS = False
else:
    _HAS_DEEPAGENTS = True
    pytest.register_assert_rewrite("langchain_tests.integration_tests.sandboxes")

from langchain_tests.integration_tests.base_store import (
    BaseStoreAsyncTests,
    BaseStoreSyncTests,
)
from langchain_tests.integration_tests.cache import (
    AsyncCacheTestSuite,
    SyncCacheTestSuite,
)
from langchain_tests.integration_tests.chat_models import ChatModelIntegrationTests
from langchain_tests.integration_tests.embeddings import EmbeddingsIntegrationTests
from langchain_tests.integration_tests.retrievers import RetrieversIntegrationTests
from langchain_tests.integration_tests.tools import ToolsIntegrationTests
from langchain_tests.integration_tests.vectorstores import VectorStoreIntegrationTests

if _HAS_DEEPAGENTS:
    from langchain_tests.integration_tests.sandboxes import (
        SandboxIntegrationTests,
    )

__all__ = [
    "AsyncCacheTestSuite",
    "BaseStoreAsyncTests",
    "BaseStoreSyncTests",
    "ChatModelIntegrationTests",
    "EmbeddingsIntegrationTests",
    "RetrieversIntegrationTests",
    "SyncCacheTestSuite",
    "ToolsIntegrationTests",
    "VectorStoreIntegrationTests",
]

if _HAS_DEEPAGENTS:
    __all__ += ["SandboxIntegrationTests"]

Domain

Subdomains

Dependencies

  • deepagents
  • langchain_tests.integration_tests.base_store
  • langchain_tests.integration_tests.cache
  • langchain_tests.integration_tests.chat_models
  • langchain_tests.integration_tests.embeddings
  • langchain_tests.integration_tests.retrievers
  • langchain_tests.integration_tests.sandboxes
  • langchain_tests.integration_tests.tools
  • langchain_tests.integration_tests.vectorstores
  • pytest

Frequently Asked Questions

What does __init__.py do?
__init__.py is a source file in the langchain codebase, written in python. It belongs to the LangChainCore domain, Runnables subdomain.
What functions are defined in __init__.py?
__init__.py defines 5 function(s): _HAS_DEEPAGENTS, __all__, deepagents, langchain_tests, pytest.
What does __init__.py depend on?
__init__.py imports 10 module(s): deepagents, langchain_tests.integration_tests.base_store, langchain_tests.integration_tests.cache, langchain_tests.integration_tests.chat_models, langchain_tests.integration_tests.embeddings, langchain_tests.integration_tests.retrievers, langchain_tests.integration_tests.sandboxes, langchain_tests.integration_tests.tools, and 2 more.
Where is __init__.py in the architecture?
__init__.py is located at libs/standard-tests/langchain_tests/integration_tests/__init__.py (domain: LangChainCore, subdomain: Runnables, directory: libs/standard-tests/langchain_tests/integration_tests).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free