32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
|
|
#!/usr/bin/env python3
|
||
|
|
import sys
|
||
|
|
sys.path.insert(0, "/Users/apayne/burn-clone/STEP35-compounding-intelligence-140/scripts")
|
||
|
|
import yaml
|
||
|
|
from pathlib import Path
|
||
|
|
|
||
|
|
KNOWLEDGE_DIR = Path("/Users/apayne/burn-clone/STEP35-compounding-intelligence-140/knowledge")
|
||
|
|
config_path = KNOWLEDGE_DIR / "global" / "citations.yaml"
|
||
|
|
|
||
|
|
with open(config_path) as f:
|
||
|
|
data = yaml.safe_load(f)
|
||
|
|
|
||
|
|
papers = data.get("papers", [])
|
||
|
|
print(f"Loaded {len(papers)} key papers:")
|
||
|
|
for p in papers:
|
||
|
|
print(f" - {p['s2_id']}: {p['title']}")
|
||
|
|
|
||
|
|
# Test that citation_tracker module loads
|
||
|
|
import importlib.util
|
||
|
|
spec = importlib.util.spec_from_file_location("citation_tracker",
|
||
|
|
"/Users/apayne/burn-clone/STEP35-compounding-intelligence-140/scripts/citation_tracker.py")
|
||
|
|
mod = importlib.util.module_from_spec(spec)
|
||
|
|
spec.loader.exec_module(mod)
|
||
|
|
print("Module loaded successfully")
|
||
|
|
|
||
|
|
# Test fetch functions (with mock/real API)
|
||
|
|
result = mod.fetch_paper("CorpusId:215715652") # Attention Is All You Need
|
||
|
|
if result:
|
||
|
|
print(f"Paper fetched: {result.get('title')} — {result.get('citationCount')} citations")
|
||
|
|
else:
|
||
|
|
print("Paper fetch failed (may be network issue)")
|