Import 9 alphaear finance skills
- alphaear-deepear-lite: DeepEar Lite API integration - alphaear-logic-visualizer: Draw.io XML finance diagrams - alphaear-news: Real-time finance news (10+ sources) - alphaear-predictor: Kronos time-series forecasting - alphaear-reporter: Professional financial reports - alphaear-search: Web search + local RAG - alphaear-sentiment: FinBERT/LLM sentiment analysis - alphaear-signal-tracker: Signal evolution tracking - alphaear-stock: A-Share/HK/US stock data Updates: - All scripts updated to use universal .env path - Added JINA_API_KEY, LLM_*, DEEPSEEK_API_KEY to .env.example - Updated load_dotenv() to use ~/.config/opencode/.env
This commit is contained in:
31
skills/alphaear-search/tests/test_search.py
Normal file
31
skills/alphaear-search/tests/test_search.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
|
||||
# Add skill root to path
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
try:
|
||||
from scripts.search_tools import SearchTools
|
||||
from scripts.database_manager import DatabaseManager
|
||||
from scripts.hybrid_search import InMemoryRAG
|
||||
except ImportError as e:
|
||||
print(f"Import Error: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
class TestSearch(unittest.TestCase):
|
||||
def test_init(self):
|
||||
print("Testing SearchTools Iteration...")
|
||||
db = DatabaseManager(":memory:")
|
||||
tools = SearchTools(db)
|
||||
self.assertIsNotNone(tools)
|
||||
print("SearchTools Initialized.")
|
||||
|
||||
def test_rag(self):
|
||||
print("Testing InMemoryRAG...")
|
||||
rag = InMemoryRAG([])
|
||||
self.assertIsNotNone(rag)
|
||||
print("InMemoryRAG Initialized.")
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user