mirror of
https://github.com/run-llama/template-workflow-document-qa.git
synced 2026-07-01 21:44:59 -04:00
Add py tests/lints
This commit is contained in:
+16
-1
@@ -19,7 +19,22 @@ requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[dependency-groups]
|
||||
dev = []
|
||||
dev = [
|
||||
"hatch>=1.14.1",
|
||||
"pytest>=8.4.2",
|
||||
"ruff>=0.13.0",
|
||||
"ty>=0.0.1a20",
|
||||
]
|
||||
|
||||
[tool.hatch.envs.default.scripts]
|
||||
"format" = "ruff format ."
|
||||
"format-check" = "ruff format --check ."
|
||||
"lint" = "ruff check --fix ."
|
||||
"lint-check" = ["ruff check ."]
|
||||
typecheck = "ty check src"
|
||||
test = "pytest"
|
||||
"all-check" = ["format-check", "lint-check", "test"]
|
||||
"all-fix" = ["format", "lint", "test"]
|
||||
|
||||
[tool.llamadeploy]
|
||||
env-files = [".env"]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import logging
|
||||
import os
|
||||
import uuid
|
||||
|
||||
import httpx
|
||||
from llama_cloud.types import RetrievalMode
|
||||
@@ -23,7 +22,6 @@ from llama_index.embeddings.openai import OpenAIEmbedding
|
||||
from llama_index.core.memory import ChatMemoryBuffer
|
||||
|
||||
from .clients import (
|
||||
INDEX_NAME,
|
||||
LLAMA_CLOUD_API_KEY,
|
||||
LLAMA_CLOUD_BASE_URL,
|
||||
get_custom_client,
|
||||
@@ -335,5 +333,6 @@ class ChatWorkflow(Workflow):
|
||||
result={"success": False, "error": f"Error processing query: {str(e)}"}
|
||||
)
|
||||
|
||||
|
||||
upload = DocumentUploadWorkflow(timeout=None)
|
||||
chat = ChatWorkflow(timeout=None)
|
||||
chat = ChatWorkflow(timeout=None)
|
||||
|
||||
@@ -19,7 +19,22 @@ requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[dependency-groups]
|
||||
dev = []
|
||||
dev = [
|
||||
"hatch>=1.14.1",
|
||||
"pytest>=8.4.2",
|
||||
"ruff>=0.13.0",
|
||||
"ty>=0.0.1a20",
|
||||
]
|
||||
|
||||
[tool.hatch.envs.default.scripts]
|
||||
"format" = "ruff format ."
|
||||
"format-check" = "ruff format --check ."
|
||||
"lint" = "ruff check --fix ."
|
||||
"lint-check" = ["ruff check ."]
|
||||
typecheck = "ty check src"
|
||||
test = "pytest"
|
||||
"all-check" = ["format-check", "lint-check", "test"]
|
||||
"all-fix" = ["format", "lint", "test"]
|
||||
|
||||
[tool.llamadeploy]
|
||||
env-files = [".env"]
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
PROJECT_ID = "asdf"
|
||||
ORGANIZATION_ID = "asdf"
|
||||
ORGANIZATION_ID = "asdf"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import logging
|
||||
import os
|
||||
import uuid
|
||||
|
||||
import httpx
|
||||
from llama_cloud.types import RetrievalMode
|
||||
@@ -23,7 +22,6 @@ from llama_index.embeddings.openai import OpenAIEmbedding
|
||||
from llama_index.core.memory import ChatMemoryBuffer
|
||||
|
||||
from .clients import (
|
||||
INDEX_NAME,
|
||||
LLAMA_CLOUD_API_KEY,
|
||||
LLAMA_CLOUD_BASE_URL,
|
||||
get_custom_client,
|
||||
@@ -335,5 +333,6 @@ class ChatWorkflow(Workflow):
|
||||
result={"success": False, "error": f"Error processing query: {str(e)}"}
|
||||
)
|
||||
|
||||
|
||||
upload = DocumentUploadWorkflow(timeout=None)
|
||||
chat = ChatWorkflow(timeout=None)
|
||||
chat = ChatWorkflow(timeout=None)
|
||||
|
||||
Reference in New Issue
Block a user