Move production dependencies to prod python packages group

This will reduce khoj dependencies to install for self-hosting users

- Move auth production dependencies to prod python packages group
  - Only enable authentication API router if not in anonymous mode
  - Improve error with requirements to enable authentication when not in
    anonymous mode
This commit is contained in:
Debanjum Singh Solanky
2024-02-14 15:20:27 +05:30
parent d7dbb715ef
commit cf4a524988
6 changed files with 47 additions and 25 deletions

View File

@@ -69,17 +69,13 @@ dependencies = [
"httpx == 0.25.0",
"pgvector == 0.2.4",
"psycopg2-binary == 2.9.9",
"google-auth == 2.23.3",
"python-multipart == 0.0.6",
"gunicorn == 21.2.0",
"lxml == 4.9.3",
"tzdata == 2023.3",
"rapidocr-onnxruntime == 1.3.8",
"stripe == 7.3.0",
"openai-whisper >= 20231117",
"django-phonenumber-field == 7.3.0",
"phonenumbers == 8.13.27",
"twilio == 8.11"
]
dynamic = ["version"]
@@ -93,6 +89,11 @@ Releases = "https://github.com/khoj-ai/khoj/releases"
khoj = "khoj.main:run"
[project.optional-dependencies]
prod = [
"google-auth == 2.23.3",
"stripe == 7.3.0",
"twilio == 8.11",
]
test = [
"pytest >= 7.1.2",
"freezegun >= 1.2.0",
@@ -103,6 +104,7 @@ test = [
]
dev = [
"khoj-assistant[test]",
"khoj-assistant[prod]",
"mypy >= 1.0.1",
"black >= 23.1.0",
"pre-commit >= 3.0.4",