Integrated the graphml visualizer as part of lightrag and made it a component that can be installed using [tools] option
This commit is contained in:
12
setup.py
12
setup.py
@@ -62,6 +62,16 @@ def read_api_requirements():
|
||||
return api_deps
|
||||
|
||||
|
||||
def read_extra_requirements():
|
||||
api_deps = []
|
||||
try:
|
||||
with open("./lightrag/extra/VisualizationTool/requirements.txt") as f:
|
||||
api_deps = [line.strip() for line in f if line.strip()]
|
||||
except FileNotFoundError:
|
||||
print("Warning: API requirements.txt not found.")
|
||||
return api_deps
|
||||
|
||||
|
||||
metadata = retrieve_metadata()
|
||||
long_description = read_long_description()
|
||||
requirements = read_requirements()
|
||||
@@ -97,10 +107,12 @@ setuptools.setup(
|
||||
},
|
||||
extras_require={
|
||||
"api": read_api_requirements(), # API requirements as optional
|
||||
"tools": read_extra_requirements(), # API requirements as optional
|
||||
},
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"lightrag-server=lightrag.api.lightrag_server:main [api]",
|
||||
"lightrag-viewer=lightrag.tools.lightrag_visualizer:main [tools]",
|
||||
],
|
||||
},
|
||||
)
|
||||
|
Reference in New Issue
Block a user