mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-27 19:46:55 +00:00
138 lines
4.1 KiB
TOML
138 lines
4.1 KiB
TOML
[build-system]
|
|
requires = ["pdm-backend"]
|
|
build-backend = "pdm.backend"
|
|
|
|
[project]
|
|
authors = []
|
|
license = {text = "MIT"}
|
|
requires-python = "<4.0,>=3.9"
|
|
dependencies = [
|
|
"langsmith<0.4,>=0.1.125",
|
|
"tenacity!=8.4.0,<10.0.0,>=8.1.0",
|
|
"jsonpatch<2.0,>=1.33",
|
|
"PyYAML>=5.3",
|
|
"packaging<25,>=23.2",
|
|
"typing-extensions>=4.7",
|
|
"pydantic<3.0.0,>=2.5.2; python_full_version < \"3.12.4\"",
|
|
"pydantic<3.0.0,>=2.7.4; python_full_version >= \"3.12.4\"",
|
|
]
|
|
name = "langchain-core"
|
|
version = "0.3.56"
|
|
description = "Building applications with LLMs through composability"
|
|
readme = "README.md"
|
|
|
|
[project.urls]
|
|
"Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/core"
|
|
"Release Notes" = "https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-core%3D%3D0%22&expanded=true"
|
|
repository = "https://github.com/langchain-ai/langchain"
|
|
|
|
[dependency-groups]
|
|
lint = [
|
|
"ruff<0.12.0,>=0.11.2",
|
|
]
|
|
typing = [
|
|
"mypy<1.16,>=1.15",
|
|
"types-pyyaml<7.0.0.0,>=6.0.12.2",
|
|
"types-requests<3.0.0.0,>=2.28.11.5",
|
|
"langchain-text-splitters",
|
|
]
|
|
dev = [
|
|
"jupyter<2.0.0,>=1.0.0",
|
|
"setuptools<68.0.0,>=67.6.1",
|
|
"grandalf<1.0,>=0.8",
|
|
]
|
|
test = [
|
|
"pytest<9,>=8",
|
|
"freezegun<2.0.0,>=1.2.2",
|
|
"pytest-mock<4.0.0,>=3.10.0",
|
|
"syrupy<5.0.0,>=4.0.2",
|
|
"pytest-watcher<1.0.0,>=0.3.4",
|
|
"pytest-asyncio<1.0.0,>=0.21.1",
|
|
"grandalf<1.0,>=0.8",
|
|
"responses<1.0.0,>=0.25.0",
|
|
"pytest-socket<1.0.0,>=0.7.0",
|
|
"pytest-xdist<4.0.0,>=3.6.1",
|
|
"blockbuster~=1.5.18",
|
|
"numpy>=1.26.4; python_version<'3.13'",
|
|
"numpy>=2.1.0; python_version>='3.13'",
|
|
"langchain-tests",
|
|
"pytest-benchmark",
|
|
"pytest-codspeed",
|
|
]
|
|
test_integration = []
|
|
|
|
[tool.uv.sources]
|
|
langchain-tests = { path = "../standard-tests" }
|
|
langchain-text-splitters = { path = "../text-splitters" }
|
|
|
|
|
|
[tool.mypy]
|
|
strict = "True"
|
|
strict_bytes = "True"
|
|
enable_error_code = "deprecated"
|
|
report_deprecated_as_note = "True"
|
|
|
|
# TODO: activate for 'strict' checking
|
|
disallow_any_generics = "False"
|
|
warn_return_any = "False"
|
|
strict_equality = "False"
|
|
|
|
|
|
[tool.ruff]
|
|
target-version = "py39"
|
|
|
|
|
|
[tool.ruff.lint]
|
|
select = [ "ALL",]
|
|
ignore = [
|
|
"C90", # McCabe complexity
|
|
"COM812", # Messes with the formatter
|
|
"FA100", # Can't activate since we exclude UP007 for now
|
|
"FIX002", # Line contains TODO
|
|
"ISC001", # Messes with the formatter
|
|
"PERF203", # Rarely useful
|
|
"PLR09", # Too many something (arg, statements, etc)
|
|
"TC001", # Doesn't play well with Pydantic
|
|
"TC002", # Doesn't play well with Pydantic
|
|
"TC003", # Doesn't play well with Pydantic
|
|
"TD002", # Missing author in TODO
|
|
"TD003", # Missing issue link in TODO
|
|
"UP007", # Doesn't play well with Pydantic in Python 3.9
|
|
|
|
# TODO rules
|
|
"A",
|
|
"ANN401",
|
|
"BLE",
|
|
"ERA",
|
|
"PLR2004",
|
|
"RUF",
|
|
"SLF",
|
|
]
|
|
flake8-type-checking.runtime-evaluated-base-classes = ["pydantic.BaseModel","langchain_core.load.serializable.Serializable","langchain_core.runnables.base.RunnableSerializable"]
|
|
flake8-annotations.allow-star-arg-any = true
|
|
flake8-annotations.mypy-init-return = true
|
|
pydocstyle.convention = "google"
|
|
pydocstyle.ignore-var-parameters = true
|
|
|
|
[tool.coverage.run]
|
|
omit = [ "tests/*",]
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
|
|
markers = [ "requires: mark tests as requiring a specific library", "compile: mark placeholder test used to compile integration tests without running them", ]
|
|
asyncio_mode = "auto"
|
|
filterwarnings = [ "ignore::langchain_core._api.beta_decorator.LangChainBetaWarning",]
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
|
|
[tool.ruff.lint.pep8-naming]
|
|
classmethod-decorators = [ "classmethod", "langchain_core.utils.pydantic.pre_init", "pydantic.field_validator", "pydantic.v1.root_validator",]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"langchain_core/utils/mustache.py" = [ "PLW0603",]
|
|
"tests/unit_tests/prompts/test_chat.py" = [ "E501",]
|
|
"tests/unit_tests/runnables/test_runnable.py" = [ "E501",]
|
|
"tests/unit_tests/runnables/test_graph.py" = [ "E501",]
|
|
"tests/unit_tests/test_tools.py" = [ "ARG",]
|
|
"tests/**" = [ "D", "S",]
|
|
"scripts/**" = [ "INP", "S",]
|