2024-09-03 18:19:51 +00:00
|
|
|
[build-system]
|
2024-09-13 21:38:45 +00:00
|
|
|
requires = ["poetry-core>=1.0.0"]
|
2024-09-03 18:19:51 +00:00
|
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
|
2024-05-28 15:24:20 +00:00
|
|
|
[tool.poetry]
|
|
|
|
name = "langchain-milvus"
|
2024-09-03 18:19:51 +00:00
|
|
|
version = "0.1.5"
|
2024-05-28 15:24:20 +00:00
|
|
|
description = "An integration package connecting Milvus and LangChain"
|
|
|
|
authors = []
|
|
|
|
readme = "README.md"
|
|
|
|
repository = "https://github.com/langchain-ai/langchain"
|
|
|
|
license = "MIT"
|
|
|
|
|
2024-09-03 18:19:51 +00:00
|
|
|
[tool.ruff]
|
2024-09-13 21:38:45 +00:00
|
|
|
select = ["E", "F", "I", "T201"]
|
2024-09-03 18:19:51 +00:00
|
|
|
|
|
|
|
[tool.mypy]
|
|
|
|
disallow_untyped_defs = "True"
|
|
|
|
[[tool.mypy.overrides]]
|
2024-09-13 21:38:45 +00:00
|
|
|
module = ["pymilvus"]
|
2024-09-03 18:19:51 +00:00
|
|
|
ignore_missing_imports = "True"
|
|
|
|
|
2024-05-28 15:24:20 +00:00
|
|
|
[tool.poetry.urls]
|
|
|
|
"Source Code" = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/milvus"
|
2024-07-22 20:59:13 +00:00
|
|
|
"Release Notes" = "https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-milvus%3D%3D0%22&expanded=true"
|
2024-05-28 15:24:20 +00:00
|
|
|
|
|
|
|
[tool.poetry.dependencies]
|
2024-09-13 21:38:45 +00:00
|
|
|
python = ">=3.9,<4.0"
|
|
|
|
langchain-core = "^0.3.0.dev"
|
2024-05-28 15:24:20 +00:00
|
|
|
pymilvus = "^2.4.3"
|
infra: update mypy 1.10, ruff 0.5 (#23721)
```python
"""python scripts/update_mypy_ruff.py"""
import glob
import tomllib
from pathlib import Path
import toml
import subprocess
import re
ROOT_DIR = Path(__file__).parents[1]
def main():
for path in glob.glob(str(ROOT_DIR / "libs/**/pyproject.toml"), recursive=True):
print(path)
with open(path, "rb") as f:
pyproject = tomllib.load(f)
try:
pyproject["tool"]["poetry"]["group"]["typing"]["dependencies"]["mypy"] = (
"^1.10"
)
pyproject["tool"]["poetry"]["group"]["lint"]["dependencies"]["ruff"] = (
"^0.5"
)
except KeyError:
continue
with open(path, "w") as f:
toml.dump(pyproject, f)
cwd = "/".join(path.split("/")[:-1])
completed = subprocess.run(
"poetry lock --no-update; poetry install --with typing; poetry run mypy . --no-color",
cwd=cwd,
shell=True,
capture_output=True,
text=True,
)
logs = completed.stdout.split("\n")
to_ignore = {}
for l in logs:
if re.match("^(.*)\:(\d+)\: error:.*\[(.*)\]", l):
path, line_no, error_type = re.match(
"^(.*)\:(\d+)\: error:.*\[(.*)\]", l
).groups()
if (path, line_no) in to_ignore:
to_ignore[(path, line_no)].append(error_type)
else:
to_ignore[(path, line_no)] = [error_type]
print(len(to_ignore))
for (error_path, line_no), error_types in to_ignore.items():
all_errors = ", ".join(error_types)
full_path = f"{cwd}/{error_path}"
try:
with open(full_path, "r") as f:
file_lines = f.readlines()
except FileNotFoundError:
continue
file_lines[int(line_no) - 1] = (
file_lines[int(line_no) - 1][:-1] + f" # type: ignore[{all_errors}]\n"
)
with open(full_path, "w") as f:
f.write("".join(file_lines))
subprocess.run(
"poetry run ruff format .; poetry run ruff --select I --fix .",
cwd=cwd,
shell=True,
capture_output=True,
text=True,
)
if __name__ == "__main__":
main()
```
2024-07-03 17:33:27 +00:00
|
|
|
[[tool.poetry.dependencies.scipy]]
|
|
|
|
version = "^1.7"
|
|
|
|
python = "<3.12"
|
|
|
|
|
|
|
|
[[tool.poetry.dependencies.scipy]]
|
|
|
|
version = "^1.9"
|
|
|
|
python = ">=3.12"
|
2024-05-28 15:24:20 +00:00
|
|
|
|
2024-09-03 18:19:51 +00:00
|
|
|
[tool.coverage.run]
|
2024-09-13 21:38:45 +00:00
|
|
|
omit = ["tests/*"]
|
2024-09-03 18:19:51 +00:00
|
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
|
2024-09-13 21:38:45 +00:00
|
|
|
markers = [
|
|
|
|
"requires: mark tests as requiring a specific library",
|
|
|
|
"asyncio: mark tests as requiring asyncio",
|
|
|
|
"compile: mark placeholder test used to compile integration tests without running them",
|
|
|
|
]
|
2024-09-03 18:19:51 +00:00
|
|
|
asyncio_mode = "auto"
|
|
|
|
|
2024-05-28 15:24:20 +00:00
|
|
|
[tool.poetry.group.test]
|
|
|
|
optional = true
|
|
|
|
|
2024-09-03 18:19:51 +00:00
|
|
|
[tool.poetry.group.codespell]
|
|
|
|
optional = true
|
|
|
|
|
|
|
|
[tool.poetry.group.test_integration]
|
|
|
|
optional = true
|
|
|
|
|
|
|
|
[tool.poetry.group.lint]
|
|
|
|
optional = true
|
|
|
|
|
|
|
|
[tool.poetry.group.dev]
|
|
|
|
optional = true
|
|
|
|
|
2024-05-28 15:24:20 +00:00
|
|
|
[tool.poetry.group.test.dependencies]
|
|
|
|
pytest = "^7.3.0"
|
|
|
|
freezegun = "^1.2.2"
|
2024-05-28 17:21:37 +00:00
|
|
|
pytest-mock = "^3.10.0"
|
2024-05-28 15:24:20 +00:00
|
|
|
syrupy = "^4.0.2"
|
|
|
|
pytest-watcher = "^0.3.4"
|
|
|
|
pytest-asyncio = "^0.21.1"
|
2024-09-06 16:52:36 +00:00
|
|
|
milvus_model = "^0.2.0"
|
2024-05-28 15:24:20 +00:00
|
|
|
|
|
|
|
[tool.poetry.group.codespell.dependencies]
|
|
|
|
codespell = "^2.2.0"
|
|
|
|
|
|
|
|
[tool.poetry.group.test_integration.dependencies]
|
2024-09-06 16:52:36 +00:00
|
|
|
milvus_model = "^0.2.0"
|
2024-05-28 15:24:20 +00:00
|
|
|
|
|
|
|
[tool.poetry.group.lint.dependencies]
|
|
|
|
ruff = "^0.1.5"
|
|
|
|
|
|
|
|
[tool.poetry.group.typing.dependencies]
|
|
|
|
mypy = "^0.991"
|
|
|
|
types-requests = "^2"
|
2024-08-23 14:41:39 +00:00
|
|
|
simsimd = "^5.0.0"
|
2024-05-28 15:24:20 +00:00
|
|
|
|
2024-09-03 18:19:51 +00:00
|
|
|
[tool.poetry.group.test.dependencies.langchain-core]
|
|
|
|
path = "../../core"
|
|
|
|
develop = true
|
2024-05-28 15:24:20 +00:00
|
|
|
|
2024-09-03 18:19:51 +00:00
|
|
|
[tool.poetry.group.typing.dependencies.langchain-core]
|
|
|
|
path = "../../core"
|
|
|
|
develop = true
|
2024-05-28 15:24:20 +00:00
|
|
|
|
2024-09-03 18:19:51 +00:00
|
|
|
[tool.poetry.group.dev.dependencies.langchain-core]
|
|
|
|
path = "../../core"
|
|
|
|
develop = true
|