Browse Source

chore: rearrange python dependencies in groups (#5603)

Bowen Liang 9 months ago
parent
commit
2a13ef9ae0
2 changed files with 106 additions and 75 deletions
  1. 1 1
      api/poetry.lock
  2. 105 74
      api/pyproject.toml

+ 1 - 1
api/poetry.lock

@@ -9081,4 +9081,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"]
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.10"
-content-hash = "59a9d41baa5454de6c9032c8d9ca81d79e5a7137c654b8765034aebb8ec29793"
+content-hash = "5f6f7d8114ece4f7e865fdf9a1fc38a86238d6bc80333b878d50c95a7885b9f5"

+ 105 - 74
api/pyproject.toml

@@ -97,108 +97,135 @@ FIRECRAWL_API_KEY = "fc-"
 name = "dify-api"
 package-mode = false
 
+############################################################
+# Main dependencies
+############################################################
+
 [tool.poetry.dependencies]
-python = "^3.10"
+anthropic = "~0.23.1"
+authlib = "1.3.1"
+azure-identity = "1.16.1"
+azure-storage-blob = "12.13.0"
 beautifulsoup4 = "4.12.2"
+boto3 = "1.28.17"
+bs4 = "~0.0.1"
+cachetools = "~5.3.0"
+celery = "~5.3.6"
+chardet = "~5.1.0"
+cohere = "~5.2.4"
+cos-python-sdk-v5 = "1.9.30"
+dashscope = { version = "~1.17.0", extras = ["tokenizer"] }
+firecrawl-py = "0.0.5"
 flask = "~3.0.1"
-flask-sqlalchemy = "~3.0.5"
-sqlalchemy = "~2.0.29"
 flask-compress = "~1.14"
+flask-cors = "~4.0.0"
 flask-login = "~0.6.3"
 flask-migrate = "~4.0.5"
 flask-restful = "~0.3.10"
-flask-cors = "~4.0.0"
-gunicorn = "~22.0.0"
+flask-sqlalchemy = "~3.0.5"
 gevent = "~23.9.1"
-openai = "~1.29.0"
-tiktoken = "~0.7.0"
-psycopg2-binary = "~2.9.6"
-pycryptodome = "3.19.1"
-python-dotenv = "1.0.0"
-authlib = "1.3.1"
-boto3 = "1.28.17"
-cachetools = "~5.3.0"
-weaviate-client = "~3.21.0"
-mailchimp-transactional = "~1.0.50"
-scikit-learn = "1.2.2"
-sentry-sdk = { version = "~1.39.2", extras = ["flask"] }
-sympy = "1.12"
-jieba = "0.42.1"
-celery = "~5.3.6"
-redis = { version = "~5.0.3", extras = ["hiredis"] }
-chardet = "~5.1.0"
-python-docx = "~1.1.0"
-pypdfium2 = "~4.17.0"
-resend = "~0.7.0"
-pyjwt = "~2.8.0"
-anthropic = "~0.23.1"
-newspaper3k = "0.2.8"
-wikipedia = "1.4.0"
-readabilipy = "0.2.0"
+gmpy2 = "~2.1.5"
 google-ai-generativelanguage = "0.6.1"
 google-api-core = "2.18.0"
 google-api-python-client = "2.90.0"
 google-auth = "2.29.0"
 google-auth-httplib2 = "0.2.0"
+google-cloud-aiplatform = "1.49.0"
+google-cloud-storage = "2.16.0"
 google-generativeai = "0.5.0"
 googleapis-common-protos = "1.63.0"
-google-cloud-storage = "2.16.0"
-replicate = "~0.22.0"
-websocket-client = "~1.7.0"
-dashscope = { version = "~1.17.0", extras = ["tokenizer"] }
+gunicorn = "~22.0.0"
+httpx = { version = "~0.27.0", extras = ["socks"] }
 huggingface-hub = "~0.16.4"
-transformers = "~4.35.0"
-tokenizers = "~0.15.0"
+jieba = "0.42.1"
+langfuse = "^2.36.1"
+langsmith = "^0.1.77"
+mailchimp-transactional = "~1.0.50"
+markdown = "~3.5.1"
+novita-client = "^0.5.6"
+numpy = "~1.26.4"
+openai = "~1.29.0"
+oss2 = "2.18.5"
 pandas = { version = "~2.2.2", extras = ["performance", "excel"] }
-xinference-client = "0.9.4"
-safetensors = "~0.4.3"
-zhipuai = "1.0.7"
-werkzeug = "~3.0.1"
-pymilvus = "2.3.1"
-qdrant-client = "1.7.3"
-cohere = "~5.2.4"
+psycopg2-binary = "~2.9.6"
+pycryptodome = "3.19.1"
+pydantic = "~2.7.4"
+pydantic-settings = "~2.3.3"
+pydantic_extra_types = "~2.8.1"
+pydub = "~0.25.1"
+pyjwt = "~2.8.0"
+pypdfium2 = "~4.17.0"
+python = "^3.10"
+python-docx = "~1.1.0"
+python-dotenv = "1.0.0"
 pyyaml = "~6.0.1"
-numpy = "~1.26.4"
+readabilipy = "0.2.0"
+redis = { version = "~5.0.3", extras = ["hiredis"] }
+replicate = "~0.22.0"
+resend = "~0.7.0"
+safetensors = "~0.4.3"
+scikit-learn = "1.2.2"
+sentry-sdk = { version = "~1.39.2", extras = ["flask"] }
+sqlalchemy = "~2.0.29"
+tencentcloud-sdk-python-hunyuan = "~3.0.1158"
+tiktoken = "~0.7.0"
+tokenizers = "~0.15.0"
+transformers = "~4.35.0"
 unstructured = { version = "~0.10.27", extras = ["docx", "epub", "md", "msg", "ppt", "pptx"] }
-bs4 = "~0.0.1"
-markdown = "~3.5.1"
-httpx = { version = "~0.27.0", extras = ["socks"] }
+websocket-client = "~1.7.0"
+werkzeug = "~3.0.1"
+xinference-client = "0.9.4"
+yarl = "~1.9.4"
+zhipuai = "1.0.7"
+
+############################################################
+# Tool dependencies required by tool implementations
+############################################################
+
+[tool.poetry.group.tool.dependencies]
+arxiv = "2.1.0"
 matplotlib = "~3.8.2"
-yfinance = "~0.2.40"
-pydub = "~0.25.1"
-gmpy2 = "~2.1.5"
-numexpr = "~2.9.0"
+newspaper3k = "0.2.8"
 duckduckgo-search = "~6.1.5"
-arxiv = "2.1.0"
-yarl = "~1.9.4"
-twilio = "~9.0.4"
+numexpr = "~2.9.0"
+opensearch-py = "2.4.0"
 qrcode = "~7.4.2"
-azure-storage-blob = "12.13.0"
-azure-identity = "1.16.1"
-lxml = "5.1.0"
-xlrd = "~2.0.1"
-pydantic = "~2.7.4"
-pydantic_extra_types = "~2.8.1"
-pydantic-settings = "~2.3.3"
+twilio = "~9.0.4"
+vanna = { version = "0.5.5", extras = ["postgres", "mysql", "clickhouse", "duckdb"] }
+wikipedia = "1.4.0"
+yfinance = "~0.2.40"
+
+############################################################
+# VDB dependencies required by vector store clients
+############################################################
+
+[tool.poetry.group.vdb.dependencies]
+chromadb = "~0.5.1"
+oracledb = "~2.2.1"
 pgvecto-rs = "0.1.4"
-firecrawl-py = "0.0.5"
-oss2 = "2.18.5"
 pgvector = "0.2.5"
+pymilvus = "2.3.1"
 pymysql = "1.1.1"
+tcvectordb = "1.3.2"
 tidb-vector = "0.0.9"
-google-cloud-aiplatform = "1.49.0"
-vanna = { version = "0.5.5", extras = ["postgres", "mysql", "clickhouse", "duckdb"] }
+qdrant-client = "1.7.3"
+weaviate-client = "~3.21.0"
+
+############################################################
+# Transparent dependencies required by main dependencies
+# for pinning versions
+############################################################
+
+[tool.poetry.group.transparent.dependencies]
 kaleido = "0.2.1"
-tencentcloud-sdk-python-hunyuan = "~3.0.1158"
-tcvectordb = "1.3.2"
-chromadb = "~0.5.1"
+lxml = "5.1.0"
+sympy = "1.12"
 tenacity = "~8.3.0"
-cos-python-sdk-v5 = "1.9.30"
-langfuse = "^2.36.1"
-langsmith = "^0.1.77"
-novita-client = "^0.5.6"
-opensearch-py = "2.4.0"
-oracledb = "~2.2.1"
+xlrd = "~2.0.1"
+
+############################################################
+# Dev dependencies for running tests
+############################################################
 
 [tool.poetry.group.dev]
 optional = true
@@ -210,6 +237,10 @@ pytest-benchmark = "~4.0.0"
 pytest-env = "~1.1.3"
 pytest-mock = "~3.14.0"
 
+############################################################
+# Lint dependencies for code style linting
+############################################################
+
 [tool.poetry.group.lint]
 optional = true