Copilot commented on code in PR #248:
URL: 
https://github.com/apache/incubator-hugegraph-ai/pull/248#discussion_r2099868145


##########
hugegraph-llm/pyproject.toml:
##########
@@ -23,66 +28,48 @@ authors = [
     { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
 ]
 readme = "README.md"
-license = "Apache-2.0"
+license = {text = "Apache-2.0"}
 requires-python = ">=3.10,<3.12"
 maintainers = [
     { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
 ]
+dependencies = [
+    "openai~=1.61.0",
+    "ollama~=0.2.1",
+    "qianfan~=0.3.18",
+    "retry~=0.9.2",
+    "tiktoken>=0.7.0",
+    "nltk~=3.9.1",
+    "gradio>5.0.0",
+    "jieba>=0.42.1",
+    "numpy~=1.24.4",
+    "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",
+    "pandas<2.2.2",

Review Comment:
   The version specifier '<2.2.2' excludes 2.2.2 itself, while the original 
requirement was '~=2.2.2'. Consider using 'pandas~=2.2.2' to include versions 
>=2.2.2,<2.3.0.
   ```suggestion
       "pandas~=2.2.2",
   ```



##########
hugegraph-llm/pyproject.toml:
##########
@@ -23,66 +28,48 @@ authors = [
     { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
 ]
 readme = "README.md"
-license = "Apache-2.0"
+license = {text = "Apache-2.0"}
 requires-python = ">=3.10,<3.12"
 maintainers = [
     { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
 ]
+dependencies = [
+    "openai~=1.61.0",
+    "ollama~=0.2.1",
+    "qianfan~=0.3.18",
+    "retry~=0.9.2",
+    "tiktoken>=0.7.0",
+    "nltk~=3.9.1",
+    "gradio>5.0.0",

Review Comment:
   [nitpick] The 'gradio>5.0.0' specifier allows potentially breaking versions 
above 6.0.0. To avoid unintended issues, consider pinning to the previous minor 
range, e.g., 'gradio~=5.29.1'.
   ```suggestion
       "gradio~=5.29.1",
   ```



##########
hugegraph-llm/pyproject.toml:
##########
@@ -23,66 +28,48 @@ authors = [
     { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
 ]
 readme = "README.md"
-license = "Apache-2.0"
+license = {text = "Apache-2.0"}
 requires-python = ">=3.10,<3.12"
 maintainers = [
     { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
 ]
+dependencies = [
+    "openai~=1.61.0",
+    "ollama~=0.2.1",
+    "qianfan~=0.3.18",
+    "retry~=0.9.2",
+    "tiktoken>=0.7.0",
+    "nltk~=3.9.1",
+    "gradio>5.0.0",
+    "jieba>=0.42.1",
+    "numpy~=1.24.4",
+    "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",
+    "pandas<2.2.2",
+    "openpyxl~=3.1.5",
+    "pydantic-settings~=2.6.1",
+    "decorator~=5.1.1",
+    "requests~=2.32.0",
+    "urllib3~=2.2.2",
+    "rich~=13.9.4",

Review Comment:
   [nitpick] These common dependencies (decorator, requests, urllib3, rich) are 
duplicated from the 'hugegraph-python-client' package and may drift over time. 
Consider removing them and relying on the path dependency to inherit client 
transitive dependencies.
   ```suggestion
   
   ```



##########
.github/workflows/pylint.yml:
##########
@@ -36,7 +36,7 @@ jobs:
           .venv
           ~/.cache/uv
           ~/.cache/pip
-        key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ 
hashFiles('**/requirements.txt', '**/pyproject.toml') }}
+        key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ 
hashFiles('**/pyproject.toml') }}

Review Comment:
   [nitpick] The cache key hashes all 'pyproject.toml' files, which may cause 
cache misses when unrelated subprojects change. Narrow the pattern to the 
relevant file path or include a lock file to scope the cache correctly.
   ```suggestion
           key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ 
hashFiles('hugegraph-llm/pyproject.toml', 'hugegraph-ml/pyproject.toml', 
'hugegraph-python-client/pyproject.toml') }}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to