mirror of
https://github.com/hwchase17/langchain
synced 2024-11-13 19:10:52 +00:00
fdb7f951c8
1. Move dependencies for running notebooks into monorepo poetry test deps; 2. Add script to update cassettes for a single notebook; 3. Add cassettes for some how-to guides. --- To update cassettes for a single notebook, run `docs/scripts/update_cassettes.sh`. For example: ``` ./docs/scripts/update_cassettes.sh docs/docs/how_to/binding.ipynb ``` Requires: 1. monorepo dev and test dependencies installed; 2. env vars required by notebook are set. Note: How-to guides are not currently run in [scheduled job](https://github.com/langchain-ai/langchain/actions/workflows/run_notebooks.yml). Will add cassettes for more how-to guides in subsequent PRs before adding them to scheduled job.
91 lines
3.4 KiB
TOML
91 lines
3.4 KiB
TOML
[tool.poetry]
|
|
name = "langchain-monorepo"
|
|
version = "0.0.1"
|
|
description = "LangChain mono-repo"
|
|
authors = []
|
|
license = "MIT"
|
|
readme = "README.md"
|
|
repository = "https://www.github.com/langchain-ai/langchain"
|
|
|
|
|
|
[tool.poetry.dependencies]
|
|
python = ">=3.9,<4.0"
|
|
|
|
[tool.poetry.group.docs.dependencies]
|
|
autodoc_pydantic = "^2"
|
|
sphinx = ">=7"
|
|
sphinx-autobuild = ">=2024"
|
|
pydata-sphinx-theme = ">=0.15"
|
|
toml = "^0.10.2"
|
|
|
|
[tool.poetry.group.lint.dependencies]
|
|
ruff = "^0.5.0"
|
|
langchain-core = { path = "libs/core/", develop = true }
|
|
langchain-text-splitters = { path = "libs/text-splitters", develop = true }
|
|
langchain-community = { path = "libs/community/", develop = true }
|
|
langchain = { path = "libs/langchain/", develop = true }
|
|
langchain-openai = { path = "libs/partners/openai", develop = true }
|
|
|
|
[tool.poetry.group.codespell.dependencies]
|
|
codespell = "^2.2.0"
|
|
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
langchain-core = { path = "libs/core/", develop = true }
|
|
langchain-text-splitters = { path = "libs/text-splitters", develop = true }
|
|
langchain-community = { path = "libs/community/", develop = true }
|
|
langchain = { path = "libs/langchain/", develop = true }
|
|
langchain-openai = { path = "libs/partners/openai", develop = true }
|
|
ipykernel = "^6.29.2"
|
|
|
|
# Support Python 3.8 and 3.12+.
|
|
# Can be removed once the numpy version is fixed in langchain-community.
|
|
numpy = [
|
|
{ version = "^1.24.0", python = "<3.12" },
|
|
{ version = "^1.26.0", python = ">=3.12" },
|
|
]
|
|
|
|
[tool.poetry.group.test.dependencies]
|
|
langchain-experimental = { git = "https://github.com/langchain-ai/langchain-experimental.git", subdirectory = "libs/experimental" }
|
|
langchain-anthropic = { path = "libs/partners/anthropic", develop = true }
|
|
langchain-chroma = { path = "libs/partners/chroma", develop = true }
|
|
langchain-mistralai = { path = "libs/partners/mistralai", develop = true }
|
|
langgraph = { git = "https://github.com/langchain-ai/langgraph.git", subdirectory = "libs/langgraph" }
|
|
jupyter = "^1.1.1"
|
|
click = "^8.1.7"
|
|
faiss-cpu = "^1.7.4"
|
|
pypdf = "^5.0.0"
|
|
vcrpy = "^6.0.1"
|
|
|
|
[tool.poetry.group.test_integration.dependencies]
|
|
|
|
[tool.poetry.group.typing.dependencies]
|
|
|
|
[tool.codespell]
|
|
skip = '.git,*.pdf,*.svg,*.pdf,*.yaml,*.ipynb,poetry.lock,*.min.js,*.css,package-lock.json,example_data,_dist,examples,templates,*.trig'
|
|
# Ignore latin etc
|
|
ignore-regex = '.*(Stati Uniti|Tense=Pres).*'
|
|
# whats is a typo but used frequently in queries so kept as is
|
|
# aapply - async apply
|
|
# unsecure - typo but part of API, decided to not bother for now
|
|
ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure,damon,crate,aadd,symbl,precesses,accademia,nin,cann'
|
|
|
|
[tool.ruff]
|
|
extend-include = ["*.ipynb"]
|
|
extend-exclude = [
|
|
"docs/docs/expression_language/why.ipynb", # TODO: look into why linter errors
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"**/{cookbook,docs}/*" = [
|
|
"E402", # allow imports to appear anywhere in docs
|
|
"F401", # allow "imported but unused" example code
|
|
"F811", # allow re-importing the same module, so that cells can stay independent
|
|
"F841", # allow assignments to variables that are never read -- it's example code
|
|
]
|
|
|
|
# These files were failing the listed rules at the time ruff was adopted for notebooks.
|
|
# Don't require them to change at once, though we should look into them eventually.
|
|
"cookbook/gymnasium_agent_simulation.ipynb" = ["F821"]
|
|
"docs/docs/integrations/document_loaders/tensorflow_datasets.ipynb" = ["F821"]
|