Some checks failed
Deployment / deploy-docker (push) Has been cancelled
- daemon.py: gc.collect() entfernt, robustes Scheduling (last_run_date statt Minuten-Check), Exchange Registry Pattern eingeführt (STREAMING_EXCHANGES/STANDARD_EXCHANGES) - deutsche_boerse.py: Thread-safe User-Agent Rotation bei Rate-Limits, Logging statt print(), Feiertags-Prüfung, aufgeteilte Parse-Methoden - eix.py: Logging statt print(), spezifische Exception-Typen statt blankem except - read.py gelöscht und durch scripts/inspect_gzip.py ersetzt (Streaming-basiert) - Utility-Scripts in scripts/ verschoben (cleanup_duplicates, restore_and_fix, verify_fix)
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
#!/usr/bin/env python3
|
|
"""Test script to verify the improved sector metadata fetching"""
|
|
|
|
import sys
|
|
sys.path.insert(0, '/Users/melchiorreimers/.gemini/antigravity/scratch/trading_daemon/src')
|
|
|
|
from metadata.fetcher import fetch_ticker_from_openfigi, fetch_sector_from_yfinance, fetch_metadata
|
|
|
|
# Test ISINs from different regions and sectors
|
|
test_isins = [
|
|
'US69553P1003', # PagerDuty (US, Technology)
|
|
'DE000LS1LUS9', # German security
|
|
'US0378331005', # Apple (US, Technology)
|
|
]
|
|
|
|
print("Testing improved sector metadata fetching...\n")
|
|
|
|
for isin in test_isins:
|
|
print(f"Testing ISIN: {isin}")
|
|
|
|
# Test ticker lookup
|
|
ticker = fetch_ticker_from_openfigi(isin)
|
|
print(f" Ticker: {ticker}")
|
|
|
|
# Test sector lookup if ticker found
|
|
if ticker:
|
|
sector = fetch_sector_from_yfinance(ticker)
|
|
print(f" Sector: {sector}")
|
|
|
|
print()
|
|
|
|
print("\nFull metadata test for US69553P1003:")
|
|
metadata = fetch_metadata('US69553P1003')
|
|
for key, value in metadata.items():
|
|
print(f" {key}: {value}")
|