refactor: Remove old example scripts and migration references
- Delete old example scripts (mail_reader_leann.py, google_history_reader_leann.py, etc.) - Remove migration hints and backward compatibility - Update tests to use new unified examples directly - Clean up all references to old script names - Users now only see the new unified interface
This commit is contained in:
@@ -19,7 +19,7 @@ Basic functionality tests that verify:
|
||||
- Uses parametrized tests to test both backends
|
||||
|
||||
### `test_document_rag.py`
|
||||
Tests the document RAG example functionality (formerly main_cli_example):
|
||||
Tests the document RAG example functionality:
|
||||
- Tests with facebook/contriever embeddings
|
||||
- Tests with OpenAI embeddings (if API key is available)
|
||||
- Tests error handling with invalid parameters
|
||||
|
||||
@@ -20,7 +20,7 @@ def test_package_imports():
|
||||
def test_cli_help():
|
||||
"""Test that CLI example shows help."""
|
||||
result = subprocess.run(
|
||||
[sys.executable, "examples/main_cli_example.py", "--help"], capture_output=True, text=True
|
||||
[sys.executable, "examples/document_rag.py", "--help"], capture_output=True, text=True
|
||||
)
|
||||
|
||||
assert result.returncode == 0
|
||||
|
||||
@@ -118,15 +118,3 @@ def test_document_rag_error_handling(test_data_dir):
|
||||
# Should fail with invalid LLM type
|
||||
assert result.returncode != 0
|
||||
assert "invalid choice" in result.stderr or "invalid_llm_type" in result.stderr
|
||||
|
||||
|
||||
def test_main_cli_backward_compatibility():
|
||||
"""Test that main_cli_example.py shows migration message."""
|
||||
cmd = [sys.executable, "examples/main_cli_example.py", "--help"]
|
||||
|
||||
result = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
|
||||
|
||||
# Should exit with error code and show migration message
|
||||
assert result.returncode != 0
|
||||
assert "This script has been replaced" in result.stdout
|
||||
assert "document_rag.py" in result.stdout
|
||||
|
||||
Reference in New Issue
Block a user