Skip to content

Commit f4a7334

Browse files
committed
Revert unneeded changes
1 parent d7b105d commit f4a7334

File tree

2 files changed

+74
-12
lines changed

2 files changed

+74
-12
lines changed

.github/workflows/python-test.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Python check
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths-ignore:
7+
- "**.md"
8+
- ".azdo/**"
9+
- ".devcontainer/**"
10+
- ".github/**"
11+
pull_request:
12+
branches: [ main ]
13+
paths-ignore:
14+
- "**.md"
15+
- ".azdo/**"
16+
- ".devcontainer/**"
17+
- ".github/**"
18+
workflow_call:
19+
20+
jobs:
21+
test_package:
22+
name: Test ${{ matrix.os }} Python ${{ matrix.python_version }}
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
os: ["ubuntu-20.04", "windows-latest"]
28+
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Install uv
32+
uses: astral-sh/setup-uv@v5
33+
with:
34+
enable-cache: true
35+
version: "0.4.20"
36+
cache-dependency-glob: "requirements**.txt"
37+
python-version: ${{ matrix.python_version }}
38+
- name: Setup node
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: 18
42+
- name: Build frontend
43+
run: |
44+
cd ./app/frontend
45+
npm install
46+
npm run build
47+
- name: Install dependencies
48+
run: |
49+
uv pip install -r requirements-dev.txt
50+
- name: Lint with ruff
51+
run: ruff check .
52+
- name: Check types with mypy
53+
run: |
54+
cd scripts/
55+
mypy . --config-file=../pyproject.toml
56+
cd ../app/backend/
57+
mypy . --config-file=../../pyproject.toml
58+
- name: Check formatting with black
59+
run: black . --check --verbose
60+
- name: Run Python tests
61+
if: runner.os != 'Windows'
62+
run: pytest -s -vv --cov --cov-fail-under=86
63+
- name: Run E2E tests with Playwright
64+
id: e2e
65+
if: runner.os != 'Windows'
66+
run: |
67+
playwright install chromium --with-deps
68+
pytest tests/e2e.py --tracing=retain-on-failure
69+
- name: Upload test artifacts
70+
if: ${{ failure() && steps.e2e.conclusion == 'failure' }}
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: playwright-traces${{ matrix.python_version }}
74+
path: test-results

app/backend/approaches/approach.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,7 @@ async def search(
152152
) -> List[Document]:
153153
search_text = query_text if use_text_search else ""
154154
search_vectors = vectors if use_vector_search else []
155-
import logging
156-
157-
logger = logging.getLogger("scripts")
158155
if use_semantic_ranker:
159-
logger.info("Using semantic ranker")
160-
logger.info("Search text: %s", search_text)
161-
logger.info("Filter: %s", filter)
162-
logger.info("Top: %s", top)
163-
logger.info("Query language: %s", self.query_language)
164-
logger.info("Query speller: %s", self.query_speller)
165-
logger.info("Semantic configuration: %s", "default")
166-
logger.info("Semantic query: %s", query_text)
167156
results = await self.search_client.search(
168157
search_text=search_text,
169158
filter=filter,
@@ -177,7 +166,6 @@ async def search(
177166
semantic_query=query_text,
178167
)
179168
else:
180-
logger.info("Not using semantic ranker")
181169
results = await self.search_client.search(
182170
search_text=search_text,
183171
filter=filter,

0 commit comments

Comments
 (0)