Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

Install local Python SDK in test targets

Edwin Jose8f04b4a9782e
diff --git a/Makefile b/Makefile
index d72714619..b74c73ef6 100644
--- a/Makefile
+++ b/Makefile
@@ -767,6 +767,7 @@ test-ci: ## Start infra, run integration + SDK tests, tear down (uses DockerHub
curl -s http://localhost:3000/ >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "$(PURPLE)Running Python SDK integration tests$(NC)"; \
+ uv pip install -e sdks/python; \
SDK_TESTS_ONLY=true OPENRAG_URL=http://localhost:3000 uv run pytest tests/integration/test_sdk.py -vv -s || TEST_RESULT=1; \
echo "$(PURPLE)Running TypeScript SDK integration tests$(NC)"; \
cd sdks/typescript && \
@@ -880,6 +881,7 @@ test-ci-local: ## Same as test-ci but builds all images locally
curl -s http://localhost:3000/ >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "$(PURPLE)Running Python SDK integration tests$(NC)"; \
+ uv pip install -e sdks/python; \
SDK_TESTS_ONLY=true OPENRAG_URL=http://localhost:3000 uv run pytest tests/integration/test_sdk.py -vv -s || TEST_RESULT=1; \
echo "$(PURPLE)Running TypeScript SDK integration tests$(NC)"; \
cd sdks/typescript && \
@@ -912,6 +914,7 @@ test-sdk: ## Run SDK integration tests (requires running OpenRAG at localhost:30
@echo "$(CYAN)Make sure OpenRAG is running at localhost:3000 (make dev)$(NC)"
@echo ""
@echo "$(PURPLE)Running Python SDK tests...$(NC)"
+ uv pip install -e sdks/python
SDK_TESTS_ONLY=true OPENRAG_URL=http://localhost:3000 uv run pytest tests/integration/test_sdk.py -vv -s
@echo ""
@echo "$(PURPLE)Running TypeScript SDK tests...$(NC)"
diff --git a/pyproject.toml b/pyproject.toml
index 1d42ba88a..261c5439c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -45,7 +45,7 @@ dependencies = [
]
[dependency-groups]
-dev = ["pytest>=8", "pytest-asyncio>=0.21.0", "pytest-mock>=3.12.0", "pytest-cov>=4.0.0", "openrag-sdk"]
+dev = ["pytest>=8", "pytest-asyncio>=0.21.0", "pytest-mock>=3.12.0", "pytest-cov>=4.0.0"]
[project.scripts]
openrag = "tui.main:run_tui"
@@ -53,7 +53,4 @@ openrag = "tui.main:run_tui"
[tool.uv]
package = true
-[tool.uv.sources]
-openrag-sdk = {path = "sdks/python", editable = true}
-
diff --git a/uv.lock b/uv.lock
index b0dc1d2d0..b1a605db4 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1281,7 +1281,6 @@ dependencies = [
[package.dev-dependencies]
dev = [
- { name = "openrag-sdk" },
{ name = "pytest" },
{ name = "pytest-asyncio" },
{ name = "pytest-cov" },
@@ -1315,31 +1314,12 @@ requires-dist = [
[package.metadata.requires-dev]
dev = [
- { name = "openrag-sdk", editable = "sdks/python" },
{ name = "pytest", specifier = ">=8" },
{ name = "pytest-asyncio", specifier = ">=0.21.0" },
{ name = "pytest-cov", specifier = ">=4.0.0" },
{ name = "pytest-mock", specifier = ">=3.12.0" },
]
-[[package]]
-name = "openrag-sdk"
-version = "0.2.2"
-source = { editable = "sdks/python" }
-dependencies = [
- { name = "httpx" },
- { name = "pydantic" },
-]
-
-[package.metadata]
-requires-dist = [
- { name = "httpx", specifier = ">=0.25.0" },
- { name = "pydantic", specifier = ">=2.0.0" },
- { name = "pytest", marker = "extra == 'dev'", specifier = ">=7.0.0" },
- { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.21.0" },
-]
-provides-extras = ["dev"]
-
[[package]]
name = "opensearch-protobufs"
version = "0.19.0"