Spaces:
Sleeping
Sleeping
Tobias Pasquale
commited on
Commit
·
3d9d99a
1
Parent(s):
1aedf5d
style: apply black code formatting
Browse files- Fixed import statement spacing in ingestion_pipeline.py
- Reformatted long print statements and assertions in test_end_to_end_phase2b.py
- Applied black formatting to ensure CI/CD pipeline compatibility
- All formatting changes are cosmetic with no functional impact
src/ingestion/ingestion_pipeline.py
CHANGED
|
@@ -95,8 +95,9 @@ class IngestionPipeline:
|
|
| 95 |
Dictionary with processing results and statistics
|
| 96 |
"""
|
| 97 |
import time
|
|
|
|
| 98 |
start_time = time.time()
|
| 99 |
-
|
| 100 |
directory = Path(directory_path)
|
| 101 |
if not directory.exists():
|
| 102 |
raise FileNotFoundError(f"Directory not found: {directory_path}")
|
|
|
|
| 95 |
Dictionary with processing results and statistics
|
| 96 |
"""
|
| 97 |
import time
|
| 98 |
+
|
| 99 |
start_time = time.time()
|
| 100 |
+
|
| 101 |
directory = Path(directory_path)
|
| 102 |
if not directory.exists():
|
| 103 |
raise FileNotFoundError(f"Directory not found: {directory_path}")
|
tests/test_integration/test_end_to_end_phase2b.py
CHANGED
|
@@ -132,7 +132,9 @@ class TestPhase2BEndToEnd:
|
|
| 132 |
|
| 133 |
# Relevance validation - relaxed threshold for testing
|
| 134 |
top_result = search_results[0]
|
| 135 |
-
print(
|
|
|
|
|
|
|
| 136 |
assert top_result["similarity_score"] >= 0.0, (
|
| 137 |
f"Top result for '{query}' has invalid similarity: "
|
| 138 |
f"{top_result['similarity_score']}"
|
|
@@ -415,8 +417,12 @@ class TestPhase2BEndToEnd:
|
|
| 415 |
|
| 416 |
# Validate content quality
|
| 417 |
assert result_item["content"] is not None, "Content should not be None"
|
| 418 |
-
assert isinstance(
|
| 419 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 420 |
assert result_item["similarity_score"] >= 0.0
|
| 421 |
assert isinstance(result_item["metadata"], dict)
|
| 422 |
|
|
|
|
| 132 |
|
| 133 |
# Relevance validation - relaxed threshold for testing
|
| 134 |
top_result = search_results[0]
|
| 135 |
+
print(
|
| 136 |
+
f"Query: '{query}' - Top similarity: {top_result['similarity_score']}"
|
| 137 |
+
)
|
| 138 |
assert top_result["similarity_score"] >= 0.0, (
|
| 139 |
f"Top result for '{query}' has invalid similarity: "
|
| 140 |
f"{top_result['similarity_score']}"
|
|
|
|
| 417 |
|
| 418 |
# Validate content quality
|
| 419 |
assert result_item["content"] is not None, "Content should not be None"
|
| 420 |
+
assert isinstance(
|
| 421 |
+
result_item["content"], str
|
| 422 |
+
), "Content should be a string"
|
| 423 |
+
assert (
|
| 424 |
+
len(result_item["content"].strip()) > 0
|
| 425 |
+
), "Content should not be empty"
|
| 426 |
assert result_item["similarity_score"] >= 0.0
|
| 427 |
assert isinstance(result_item["metadata"], dict)
|
| 428 |
|