File size: 1,803 Bytes
ed4d993
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[tool.poetry]
name = "langchain-cli"
version = "0.0.24"
description = "CLI for interacting with LangChain"
authors = ["Erick Friis <[email protected]>"]
readme = "README.md"
repository = "https://github.com/langchain-ai/langchain"
license = "MIT"

[tool.poetry.urls]
"Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/cli"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
typer = { extras = ["all"], version = "^0.9.0" }
gitpython = "^3.1.40"
langserve = { extras = ["all"], version = ">=0.0.51" }
uvicorn = "^0.23.2"
tomlkit = "^0.12.2"
libcst = { version = "^1.3.1", python = "^3.9" }

[tool.poetry.scripts]
langchain = "langchain_cli.cli:app"
langchain-cli = "langchain_cli.cli:app"

[tool.poetry.group.dev.dependencies]
poethepoet = "^0.24.1"
pytest = "^7.4.2"
pytest-watch = "^4.2.0"

[tool.poetry.group.lint.dependencies]
ruff = "^0.1.5"

[tool.poetry.group.test.dependencies]

[tool.poetry.group.typing.dependencies]

[tool.poetry.group.test_integration.dependencies]

[tool.poetry.extras]
# For langserve
serve = []

[tool.ruff.lint]
select = [
  "E",    # pycodestyle
  "F",    # pyflakes
  "I",    # isort
  "T201", # print
]

[tool.poe.tasks]
test = "poetry run pytest tests"
watch = "poetry run ptw"
version = "poetry version --short"
bump = ["_bump_1", "_bump_2"]
lint = ["_lint", "_check_formatting"]
format = ["_format", "_lint_fix"]

_bump_2.shell = """sed -i "" "/^__version__ =/c\\ \n__version__ = \\"$version\\"\n" langchain_cli/cli.py"""
_bump_2.uses = { version = "version" }

_bump_1 = "poetry version patch"
_check_formatting = "poetry run ruff format . --diff"
_lint = "poetry run ruff ."
_format = "poetry run ruff format ."
_lint_fix = "poetry run ruff . --fix"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"