Skip to content

Commit 9138352

Browse files
committed
refactor: dependencies in pyproject.toml and poetry.lock
- Moved `pytest` and `pytest-asyncio` to a new test dependency group in `rag-core-lib`. - Added `coverage` to the test dependencies in `rag-core-lib`. - Created a separate lint dependency group in `rag-core-lib` and included `flake8` and related packages. - Updated markers in `poetry.lock` for better platform compatibility. - Removed `pytest-asyncio` from the `rag-backend` dependencies and adjusted its group to only include `test`.
1 parent 58de48e commit 9138352

7 files changed

Lines changed: 154 additions & 147 deletions

File tree

Tiltfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,8 @@ k8s_resource(
593593
# Frontend test and lint resources (matching GitHub Actions)
594594
local_resource(
595595
'Frontend testing',
596-
cmd='cd services/frontend && npm run test',
597-
deps=['services/frontend/apps', 'services/frontend/libs'],
596+
cmd='cd services/frontend && npm install && npm run test',
597+
deps=['services/frontend/apps', 'services/frontend/libs', 'services/frontend/package.json', 'services/frontend/package-lock.json'],
598598
labels=['test'],
599599
auto_init=False,
600600
trigger_mode=TRIGGER_MODE_MANUAL,
@@ -603,8 +603,8 @@ local_resource(
603603

604604
local_resource(
605605
'Frontend linting',
606-
cmd='cd services/frontend && npm run eslint',
607-
deps=['services/frontend/apps', 'services/frontend/libs'],
606+
cmd='cd services/frontend && npm install && npm run eslint',
607+
deps=['services/frontend/apps', 'services/frontend/libs', 'services/frontend/package.json', 'services/frontend/package-lock.json'],
608608
labels=['linting'],
609609
auto_init=False,
610610
trigger_mode=TRIGGER_MODE_MANUAL,

libs/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ WORKDIR /app/${DIRECTORY}
2222
RUN poetry config virtualenvs.create false
2323
RUN if [ "$TEST" = "1" ]; then \
2424
rm ../poetry.lock; rm ../pyproject.toml; \
25-
poetry install --with dev --no-root; \
25+
poetry install --with dev,test; \
2626
# Install rag-core-lib dependencies if testing libraries that depend on it \
2727
if [ "${DIRECTORY}" = "admin-api-lib" ] || [ "${DIRECTORY}" = "rag-core-api" ]; then \
28-
cd ../rag-core-lib && poetry install --with dev --no-root; \
28+
cd ../rag-core-lib && poetry install --with dev,test; \
2929
fi; \
3030
else \
31-
poetry install; \
31+
poetry install --with dev,lint; \
3232
fi

libs/rag-core-api/poetry.lock

Lines changed: 55 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/rag-core-api/pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@ openai = "^1.77.0"
2727
langgraph = "^0.4.2"
2828
pillow = "^11.2.1"
2929
langchain-ollama = "^0.3.2"
30-
pytest-asyncio = "^0.26.0"
3130
langchain-community = "0.3.23"
3231
fastembed = "^0.6.1"
3332
langdetect = "^1.0.9"
3433
langfuse = "3.0.0"
3534
setuptools = "<80.9"
3635

37-
[tool.poetry.group.dev.dependencies]
38-
debugpy = "^1.8.14"
36+
[tool.poetry.group.test.dependencies]
3937
pytest = "^8.3.5"
4038
coverage = "^7.8.0"
39+
pytest-asyncio = "^0.26.0"
40+
41+
[tool.poetry.group.lint.dependencies]
4142
flake8 = "^7.2.0"
4243
flake8-black = "^0.3.6"
4344
flake8-pyproject = "^1.2.3"
@@ -62,6 +63,9 @@ black = "^25.1.0"
6263
flake8-logging-format = "^2024.24.12"
6364
flake8-docstrings = "^1.7.0"
6465

66+
[tool.poetry.group.dev.dependencies]
67+
debugpy = "^1.8.14"
68+
6569

6670
[tool.flake8]
6771
exclude= [".eggs", "src/rag_core_api/models", ".git", ".hg", ".mypy_cache", ".tox", ".venv", ".devcontainer", "venv", "_build", "buck-out", "build", "dist", "**/__init__.py"]

0 commit comments

Comments
 (0)