mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-07 22:11:51 +00:00
infra: migrate to uv (#29566)
This commit is contained in:
@@ -13,20 +13,20 @@ lint_tests: PYTHON_FILES=tests
|
||||
lint_tests: MYPY_CACHE=.mypy_cache_test
|
||||
|
||||
lint lint_diff lint_package lint_tests:
|
||||
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
|
||||
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
|
||||
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
|
||||
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff check $(PYTHON_FILES)
|
||||
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff format $(PYTHON_FILES) --diff
|
||||
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && uv run --group typing --group lint mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
|
||||
|
||||
format format_diff:
|
||||
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
|
||||
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
|
||||
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff format $(PYTHON_FILES)
|
||||
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff check --select I --fix $(PYTHON_FILES)
|
||||
|
||||
test tests: _test _e2e_test
|
||||
|
||||
PYTHON = .venv/bin/python
|
||||
|
||||
_test:
|
||||
poetry run pytest tests
|
||||
uv run --group test pytest tests
|
||||
|
||||
# custom integration testing for cli integration flow
|
||||
# currently ignores vectorstores test because lacks implementation
|
||||
@@ -35,7 +35,7 @@ _e2e_test:
|
||||
mkdir .integration_test
|
||||
cd .integration_test && \
|
||||
python3 -m venv .venv && \
|
||||
$(PYTHON) -m pip install --upgrade poetry && \
|
||||
pip install --upgrade poetry && \
|
||||
$(PYTHON) -m pip install -e .. && \
|
||||
$(PYTHON) -m langchain_cli.cli integration new --name parrot-link --name-class ParrotLink && \
|
||||
$(PYTHON) -m langchain_cli.cli integration new --name parrot-link --name-class ParrotLinkB --src=integration_template/chat_models.py --dst=langchain-parrot-link/langchain_parrot_link/chat_models_b.py && \
|
||||
|
2071
libs/cli/poetry.lock
generated
2071
libs/cli/poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,48 +1,52 @@
|
||||
[tool.poetry]
|
||||
[build-system]
|
||||
requires = ["pdm-backend"]
|
||||
build-backend = "pdm.backend"
|
||||
|
||||
[project]
|
||||
authors = [
|
||||
{name = "Erick Friis", email = "erick@langchain.dev"},
|
||||
]
|
||||
license = {text = "MIT"}
|
||||
requires-python = "<4.0,>=3.9"
|
||||
dependencies = [
|
||||
"typer[all]<1.0.0,>=0.9.0",
|
||||
"gitpython<4,>=3",
|
||||
"langserve[all]>=0.0.51",
|
||||
"uvicorn<1.0,>=0.23",
|
||||
"tomlkit>=0.12",
|
||||
"gritql<1.0.0,>=0.2.0",
|
||||
]
|
||||
name = "langchain-cli"
|
||||
version = "0.0.35"
|
||||
description = "CLI for interacting with LangChain"
|
||||
authors = ["Erick Friis <erick@langchain.dev>"]
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/langchain-ai/langchain"
|
||||
license = "MIT"
|
||||
|
||||
[tool.poetry.urls]
|
||||
[project.urls]
|
||||
"Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/cli"
|
||||
"Release Notes" = "https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-cli%3D%3D0%22&expanded=true"
|
||||
repository = "https://github.com/langchain-ai/langchain"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.9,<4.0"
|
||||
typer = { extras = ["all"], version = "^0.9.0" }
|
||||
gitpython = "^3"
|
||||
langserve = { extras = ["all"], version = ">=0.0.51" }
|
||||
uvicorn = ">=0.23,<1.0"
|
||||
tomlkit = ">=0.12"
|
||||
gritql = "^0.2.0"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
[project.scripts]
|
||||
langchain = "langchain_cli.cli:app"
|
||||
langchain-cli = "langchain_cli.cli:app"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pytest = "^7.4.2"
|
||||
pytest-watch = "^4.2.0"
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"pytest<8.0.0,>=7.4.2",
|
||||
"pytest-watch<5.0.0,>=4.2.0",
|
||||
]
|
||||
lint = [
|
||||
"ruff<1.0,>=0.5",
|
||||
"mypy<2.0.0,>=1.13.0",
|
||||
]
|
||||
test = [
|
||||
"langchain @ file:///${PROJECT_ROOT}/../langchain",
|
||||
]
|
||||
typing = [
|
||||
"langchain @ file:///${PROJECT_ROOT}/../langchain",
|
||||
]
|
||||
test_integration = []
|
||||
|
||||
[tool.poetry.group.lint.dependencies]
|
||||
ruff = "^0.5"
|
||||
mypy = "^1.13.0"
|
||||
|
||||
[tool.poetry.group.test.dependencies]
|
||||
langchain = {path = "../langchain", develop = true}
|
||||
|
||||
[tool.poetry.group.typing.dependencies]
|
||||
langchain = {path = "../langchain", develop = true}
|
||||
|
||||
[tool.poetry.group.test_integration.dependencies]
|
||||
|
||||
[tool.poetry.extras]
|
||||
# For langserve
|
||||
serve = []
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
@@ -57,7 +61,3 @@ exclude = [
|
||||
"langchain_cli/integration_template",
|
||||
"langchain_cli/package_template",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
2014
libs/cli/uv.lock
generated
Normal file
2014
libs/cli/uv.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user