refactor: Add proper pip install command for optional extras
This commit is contained in:
parent
ca2e63bd84
commit
d1724c710b
6 changed files with 14 additions and 19 deletions
|
|
@ -51,7 +51,7 @@ if os.getenv("ENV", "prod") == "prod":
|
||||||
)
|
)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
logger.info(
|
logger.info(
|
||||||
"Sentry SDK not available. Install with 'pip install cognee[monitoring]' to enable error monitoring."
|
"Sentry SDK not available. Install with 'pip install cognee\"[monitoring]\"' to enable error monitoring."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ def main():
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
except ImportError:
|
except ImportError:
|
||||||
st.error(
|
st.error(
|
||||||
"Pandas is required for the evaluation dashboard. Install with 'pip install cognee[evals]' to use this feature."
|
"Pandas is required for the evaluation dashboard. Install with 'pip install cognee\"[evals]\"' to use this feature."
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ def create_vector_engine(
|
||||||
from .pgvector.PGVectorAdapter import PGVectorAdapter
|
from .pgvector.PGVectorAdapter import PGVectorAdapter
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"PostgreSQL dependencies are not installed. Please install with 'pip install cognee[postgres]' or 'pip install cognee[postgres-binary]' to use PGVector functionality."
|
"PostgreSQL dependencies are not installed. Please install with 'pip install cognee\"[postgres]\"' or 'pip install cognee\"[postgres-binary]\"' to use PGVector functionality."
|
||||||
)
|
)
|
||||||
|
|
||||||
return PGVectorAdapter(
|
return PGVectorAdapter(
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class S3FileStorage(Storage):
|
||||||
import s3fs
|
import s3fs
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"s3fs is required for S3FileStorage. Install it with: pip install cognee[aws]"
|
's3fs is required for S3FileStorage. Install it with: pip install cognee"[aws]"'
|
||||||
)
|
)
|
||||||
|
|
||||||
self.storage_path = storage_path
|
self.storage_path = storage_path
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ async def open_data_file(file_path: str, mode: str = "rb", encoding: str = None,
|
||||||
from cognee.infrastructure.files.storage.S3FileStorage import S3FileStorage
|
from cognee.infrastructure.files.storage.S3FileStorage import S3FileStorage
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"S3 dependencies are not installed. Please install with 'pip install cognee[aws]' to use S3 functionality."
|
"S3 dependencies are not installed. Please install with 'pip install cognee\"[aws]\"' to use S3 functionality."
|
||||||
)
|
)
|
||||||
|
|
||||||
normalized_url = get_data_file_path(file_path)
|
normalized_url = get_data_file_path(file_path)
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,7 @@ logger = get_logger()
|
||||||
|
|
||||||
|
|
||||||
async def cognee_network_visualization(graph_data, destination_file_path: str = None):
|
async def cognee_network_visualization(graph_data, destination_file_path: str = None):
|
||||||
try:
|
import networkx
|
||||||
import networkx
|
|
||||||
except ImportError:
|
|
||||||
raise ImportError(
|
|
||||||
"NetworkX is not installed. Please install with 'pip install cognee[visualization]' to use graph visualization features."
|
|
||||||
)
|
|
||||||
|
|
||||||
nodes_data, edges_data = graph_data
|
nodes_data, edges_data = graph_data
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue