Skip to content

Commit

Permalink
Added pytest to test dependencies in indexer and retriever
Browse files Browse the repository at this point in the history
  • Loading branch information
KaranrajM committed Aug 5, 2024
1 parent 79676c8 commit dbfe0e3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/trigger-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ jobs:
- name: Test flow with pytest
working-directory: ./flow
run: poetry run pytest
- name: Install dependencies indexer
working-directory: ./indexer
run: poetry install --with test
- name: Test indexer with pytest
working-directory: ./indexer
run: poetry run pytest
- name: Install dependencies retriever
working-directory: ./retriever
run: poetry install --with test
- name: Test retriever with pytest
working-directory: ./retriever
run: poetry run pytest
2 changes: 1 addition & 1 deletion indexer/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions indexer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ lib = {path = "../jb-lib", develop = true}
[tool.poetry.group.test.dependencies]
pytest-mock = "*"
pytest-asyncio = "^0.23.7"
pytest = "^8.2.2"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 0 additions & 2 deletions retriever/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from langchain_openai import AzureOpenAIEmbeddings, OpenAIEmbeddings
from lib.data_models import RAG, Flow
from lib.kafka_utils import KafkaConsumer, KafkaProducer
from openai import OpenAI
from r2r import R2R, VectorSearchSettings

load_dotenv()
Expand All @@ -32,7 +31,6 @@

logger = logging.getLogger("retriever")

client = OpenAI()
db_name = os.getenv("POSTGRES_DATABASE_NAME")
db_user = os.getenv("POSTGRES_DATABASE_USERNAME")
db_password = os.getenv("POSTGRES_DATABASE_PASSWORD")
Expand Down
2 changes: 1 addition & 1 deletion retriever/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions retriever/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ lib = {path = "../jb-lib", develop = true}
[tool.poetry.group.test.dependencies]
pytest-mock = "*"
pytest-asyncio = "^0.23.7"
pytest = "^8.2.2"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit dbfe0e3

Please sign in to comment.