Migrate the pypi package to khoj project name. Update references

- Deprecate khoj-assistant pypi package. Use more accurate and
  succinct pypi project name, khoj
- Update references to sye khoj pypi package in docs and code instead
  of the legacy khoj-assistant pypi package
- Update pypi workflow to publish to both khoj, khoj-assistant for now
- Update stale python 3.9 support mentioned in our pyproject. Can't
  support python 3.9 as depend on latest django which support >=3.10
This commit is contained in:
Debanjum Singh Solanky
2024-07-16 21:45:41 +05:30
parent 23f61d49e0
commit 583fa3c188
11 changed files with 35 additions and 35 deletions

View File

@@ -283,9 +283,9 @@ Auto invokes setup steps on calling main entrypoint."
(if (/= (apply #'call-process khoj-server-python-command
nil t nil
"-m" "pip" "install" "--upgrade"
'("khoj-assistant"))
'("khoj"))
0)
(message "khoj.el: Failed to install Khoj server. Please install it manually using pip install `khoj-assistant'.\n%s" (buffer-string))
(message "khoj.el: Failed to install Khoj server. Please install it manually using pip install `khoj'.\n%s" (buffer-string))
(message "khoj.el: Installed and upgraded Khoj server version: %s" (khoj--server-get-version)))))
(defun khoj--server-start ()

View File

@@ -206,7 +206,7 @@ def set_state(args):
state.host = args.host
state.port = args.port
state.anonymous_mode = args.anonymous_mode
state.khoj_version = version("khoj-assistant")
state.khoj_version = version("khoj")
state.chat_on_gpu = args.chat_on_gpu

View File

@@ -41,7 +41,7 @@ if not state.anonymous_mode:
from google.auth.transport import requests as google_requests
from google.oauth2 import id_token
except ImportError:
missing_requirements += ["Install the Khoj production package with `pip install khoj-assistant[prod]`"]
missing_requirements += ["Install the Khoj production package with `pip install khoj[prod]`"]
if not os.environ.get("RESEND_API_KEY") and (
not os.environ.get("GOOGLE_CLIENT_ID") or not os.environ.get("GOOGLE_CLIENT_SECRET")
):

View File

@@ -59,7 +59,7 @@ def cli(args=None):
# Set default values for arguments
args.chat_on_gpu = not args.disable_chat_on_gpu
args.version_no = version("khoj-assistant")
args.version_no = version("khoj")
if args.version:
# Show version of khoj installed and exit
print(args.version_no)

View File

@@ -259,7 +259,7 @@ def log_telemetry(
# Populate telemetry data to log
request_body = {
"telemetry_type": telemetry_type,
"server_version": version("khoj-assistant"),
"server_version": version("khoj"),
"os": platform.system(),
"timestamp": datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
}