-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathpyproject.toml
More file actions
185 lines (161 loc) · 5.82 KB
/
pyproject.toml
File metadata and controls
185 lines (161 loc) · 5.82 KB
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
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
[project]
name = "hugegraph-ai"
version = "1.7.0"
description = "A repository for AI-related projects for Apache HugeGraph."
authors = [
{ name = "Apache HugeGraph Contributors", email = "dev@hugegraph.apache.org" },
]
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10" # Adjusted to the highest requirement among submodules (hugegraph-llm)
maintainers = [
{ name = "Apache HugeGraph Contributors", email = "dev@hugegraph.apache.org" },
]
dependencies = [
# Common dependencies can be listed here if any,
# but it's generally better to keep them within extras for clarity
]
[project.optional-dependencies]
llm = ["hugegraph-llm"]
ml = ["hugegraph-ml"]
python-client = ["hugegraph-python-client"]
vermeer = ["vermeer-python-client"]
dev = [
"pytest~=8.0.0",
"pytest-cov~=5.0.0",
"pylint~=3.0.0",
"ruff>=0.11.0",
"mypy>=1.16.1",
"pre-commit>=3.5.0",
]
nk-llm = ["hugegraph-llm", "hugegraph-python-client", "nuitka"]
all = ["hugegraph-python-client", "hugegraph-llm", "hugegraph-ml", "vermeer-python-client"]
[project.urls]
homepage = "https://hugegraph.apache.org/"
repository = "https://github.com/apache/incubator-hugegraph-ai"
documentation = "https://hugegraph.apache.org/docs/quickstart/hugegraph-ai/"
bug_tracker = "https://github.com/apache/incubator-hugegraph-ai/issues"
changelog = "https://github.com/apache/incubator-hugegraph-ai/releases"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# NOTE: If you experience slow download speeds, uncomment the lines below to use mirror source
# [[tool.uv.index]]
# url = "https://pypi.tuna.tsinghua.edu.cn/simple" # Example mirror for users in China
# default = true
#
# Alternatively, configure globally: uv config --global index.url https://pypi.tuna.tsinghua.edu.cn/simple
# To reset to default: uv config --global index.url https://pypi.org/simple
[tool.hatch.metadata] # Keep this if the hatch is still used by submodules, otherwise remove
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = [
"hugegraph-llm",
"hugegraph-python-client"
]
[tool.hatch.build.targets.sdist]
include = ["*/src", "README.md", "LICENSE", "NOTICE"]
[tool.uv.sources]
hugegraph-llm = { workspace = true }
hugegraph-python-client = { workspace = true }
hugegraph-ml = { path = "hugegraph-ml", editable = true }
vermeer-python-client = { path = "vermeer-python-client", editable = true }
[tool.uv.workspace]
members = [
"hugegraph-llm",
"hugegraph-python-client"
]
[tool.uv]
constraint-dependencies = [
# Common dependencies
"decorator~=5.1.1",
"requests~=2.32.0", # TODO: use httpx instead of urllib3 directly
"setuptools~=70.0.0", # TODO: remove it when we use hatchling well
"urllib3~=2.2.2",
"rich~=13.9.4",
# Data processing dependencies
"numpy~=1.24.4",
"pandas~=2.2.3", # TODO: replace by polars(rust) in the future
"pydantic~=2.10.6",
"scipy~=1.15.3", # word segment need
"python-igraph~=0.11.9", # textrank need
# LLM dependencies
"openai~=1.61.0",
"ollama~=0.4.8",
"retry~=0.9.2",
"tiktoken~=0.7.0",
"nltk~=3.9.1",
"gradio~=5.20.0",
"jieba~=0.42.1",
"python-docx~=1.1.2",
"langchain-text-splitters~=0.2.2",
"faiss-cpu~=1.8.0",
"python-dotenv~=1.0.1",
"pyarrow~=17.0.0",
"openpyxl~=3.1.5",
"pydantic-settings~=2.6.1",
"apscheduler~=3.10.4",
"litellm~=1.61.13",
# ML dependencies
"dgl~=2.1.0",
"ogb~=1.3.6",
"catboost~=1.2.3",
"category-encoders~=2.6.3",
"torch==2.2.0",
"tqdm~=4.66.5",
"packaging~=24.1",
"torchdata~=0.7.0",
"PyYAML~=6.0.2",
# Other dependencies
"python-dateutil~=2.9.0",
]
# for code format
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
# Select a broad set of rules for comprehensive checks.
# E: pycodestyle Errors, F: Pyflakes, W: pycodestyle Warnings, I: isort
# C: flake8-comprehensions, N: pep8-naming
# UP: pyupgrade, B: flake8-bugbear, SIM: flake8-simplify, T20: flake8-print
select = ["E", "F", "W", "I", "C", "N", "UP", "B", "SIM", "T20", "RUF"]
# Ignore specific rules
ignore = [
"PYI041", # redundant-numeric-union: keep clear 'int | float' for type hinting
"N812", # lowercase-imported-as-non-lowercase
"N806", # non-lowercase-variable-in-function
"N803", # invalid-argument-name
"N802", # invalid-function-name (API compatibility)
"C901", # complexity (non-critical for now)
"RUF001", # ambiguous-unicode-character-string
"RUF003", # ambiguous-unicode-character-comment
]
# No need to ignore E501 (line-too-long), `ruff format` will handle it automatically.
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["T20"]
"hugegraph-ml/src/hugegraph_ml/examples/**/*.py" = ["T20"]
"hugegraph-python-client/src/pyhugegraph/structure/*.py" = ["N802"]
[tool.ruff.lint.isort]
known-first-party = ["hugegraph_llm", "hugegraph_python_client", "hugegraph_ml", "vermeer_python_client"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true