-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
211 lines (173 loc) · 5.76 KB
/
pyproject.toml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
[project]
name = "graph-retriever-workspace"
version = "0.1.0"
description = "uv workspace for Graph RAG projects"
readme = "README.md"
requires-python = ">=3.10"
dependencies = []
license = "Apache-2.0"
license-files = ["LICENSE"]
classifiers = ["Private :: Do Not Upload"]
[project.urls]
"Homepage" = "https://github.com/datastax/graph-rag"
"Bug Reports" = "https://github.com/datastax/graph-rag/issues"
"Documentation" = "https://datastax.github.com/graph-rag"
[tool.pytest.ini_options]
asyncio_mode = "auto"
pythonpath = ["."]
testpaths = ["tests"]
[tool.ruff.lint]
preview = true
select = ["E", "F", "I", "T201", "D", "W", "UP", "DOC", "D213"]
ignore = ["D100", "D104", "D107"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pydoclint]
ignore-one-line-docstrings = true
[tool.ruff.lint.per-file-ignores]
"**/{tests,tools,scripts}/*" = ["D", "DOC"]
"*.ipynb" = ["D", "DOC"]
[tool.ruff.format]
docstring-code-format = true
[tool.uv.sources]
graph-retriever = { workspace = true }
langchain-graph-retriever = { workspace = true }
graph-rag-example-helpers = { workspace = true }
[tool.uv.workspace]
members = ["packages/*"]
[dependency-groups]
dev = [
"pytest>=8.3.4",
"pytest-cov>=4.0.0",
"pytest-asyncio>=0.25.2",
"poethepoet>=0.32.1",
"nbstripout>=0.8.1",
"nbmake>=1.5.5",
]
docs = [
"graph-rag-example-helpers",
"griffe-inherited-docstrings>=1.1.1",
"griffe-pydantic>=1.1.0",
"griffe>=1.5.5",
"ipykernel>=6.29.5",
"langchain-astradb>=0.5.3",
"langchain-graph-retriever",
"langchain-openai>=0.3.1",
"matplotlib>=3.10.0",
"mkdocs-jupyter>=0.25.1",
"mkdocs-material[imaging]>=9.6.2",
"mkdocs>=1.6.1",
"mkdocstrings[python]>=0.28.0",
"pip>=25.0",
"mkdocs-table-reader-plugin>=3.1.0",
"ruff>=0.9.4",
"mkdocs-macros-plugin>=1.3.7",
]
[tool.coverage.report]
skip_empty = true
[tool.coverage.run]
branch = true
source = [
"packages/graph-retriever/src/graph_retriever",
"packages/langchain-graph-retriever/src/langchain_graph_retriever",
]
[tool.poe]
# comment this out to debug poe tasks
verbosity = -1
[tool.poe.env]
RUFF = "ruff@0.9.4"
DEPTRY = "deptry@0.22.0"
[tool.poe.tasks.sync]
help = "Install dependencies from all packages and all extras"
cmd = "uv sync --group=docs --all-packages --all-extras"
[tool.poe.tasks.lock-check]
help = "Runs `uv lock --locked` to check uv.lock file consistency (fix with `lock-fix`)"
cmd = "uv lock --locked"
[tool.poe.tasks.lock-fix]
help = "Runs `uv lock` to fix uv.lock file consistency"
cmd = "uv lock"
[tool.poe.tasks.fmt-check]
help = "Runs `ruff format --check` to check for formatting issues (fix with `fmt-fix`)"
cmd = "uvx ${RUFF} format --check ."
[tool.poe.tasks.fmt-fix]
help = "Runs `ruff format` to fix formatting issues"
cmd = "uvx ${RUFF} format ."
[tool.poe.tasks.lint-check]
help = "Runs `ruff check` to check for lint issues (fix with `lint-fix`)"
cmd = "uvx ${RUFF} check ."
[tool.poe.tasks.lint-fix]
help = "Runs `ruff check --fix` to fix lint issues"
cmd = "uvx ${RUFF} check --fix ."
[tool.poe.tasks.type-check]
help = "Runs `mypy` to check for static type issues"
cwd = "packages/langchain-graph-retriever"
sequence = [
{cmd = "uv run mypy .", cwd = "packages/graph-retriever"},
{cmd = "uv run mypy .", cwd = "packages/langchain-graph-retriever"},
{cmd = "uv run mypy .", cwd = "packages/graph-rag-example-helpers"},
]
[tool.poe.tasks.dep-check]
help = "Runs `deptry` to check for dependency issues"
sequence = [
{cmd = "uvx ${DEPTRY} src tests", cwd = "packages/graph-retriever"},
{cmd = "uvx ${DEPTRY} src tests", cwd = "packages/langchain-graph-retriever"},
{cmd = "uvx ${DEPTRY} src tests", cwd = "packages/graph-rag-example-helpers"},
]
[tool.poe.tasks.nbstripout]
help = "Runs `nbstripout` to remove output"
shell = "find . -name '*.ipynb' | awk 'system(\"git check-ignore --quiet \" $0)' | xargs nbstripout"
[tool.poe.tasks.nbstripout-check]
help = "Runs `nbstripout` to remove output"
shell = "find . -name '*.ipynb' | awk 'system(\"git check-ignore --quiet \" $0)' | xargs nbstripout --verify"
[tool.poe.tasks.lint]
help = "Runs all formatting, lints, and checks (fixing where possible)"
sequence = [ "lock-fix", "fmt-fix", "lint-fix", "type-check", "dep-check", "docs-build" ]
[tool.poe.tasks.test-gr]
help = "Runs graph-retriever tests (against in-memory stores)"
cwd = "packages/graph-retriever"
cmd = "uv run pytest -vs ."
[tool.poe.tasks.test-lgr]
help = "Runs langchain-graph-retriever tests (against in-memory stores)"
cwd = "packages/langchain-graph-retriever"
cmd = "uv run pytest -vs --runextras ."
[tool.poe.tasks.test]
help = "Runs all tests (against in-memory stores)"
sequence = [ "test-gr", "test-lgr"]
[tool.poe.tasks.test-nb]
help = "Runs tests on notebooks"
shell = "find . -name '*.ipynb' | awk 'system(\"git check-ignore --quiet \" $0)' | xargs | uv run pytest docs --nbmake"
[tool.poe.tasks.test-all]
help = "Runs all tests (against all stores)"
sequence = [
"test-gr",
{ cmd = "uv run pytest -vs . --stores=all", cwd = "packages/langchain-graph-retriever" },
"test-nb",
]
[tool.poe.tasks.build]
help = "Builds all the packages"
sequence = [
"sync",
{cmd = "uv build --all-packages"},
]
[tool.poe.tasks.docs-serve]
help = "Starts a live preview of the docs site"
sequence = [
"sync",
{cmd = "uv run mkdocs serve -o"},
]
[tool.poe.tasks.docs-build]
help = "Build the docs"
sequence = [
"sync",
{cmd = "uv run mkdocs build --strict"},
]
[tool.poe.tasks.coverage]
help = "Runs tests and reports coverage."
sequence = [
{cmd = "uv run coverage run -m pytest packages/graph-retriever" },
{cmd = "uv run coverage run -a -m pytest packages/langchain-graph-retriever --stores=all" },
{cmd = "uv run coverage report" },
]
[tool.poe.tasks.help]
help = "Shows this help"
cmd = "uv run poe --help"