chore: 移除不再使用的 ChanMacro、system、tests。
这些目录已废弃,从仓库中清理。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
"""
|
||||
scoring/base.py — Abstract base class for all scoring modules.
|
||||
"""
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import date as Date
|
||||
from typing import Optional
|
||||
import sqlite3
|
||||
|
||||
from models import FactorScore
|
||||
from config import config
|
||||
|
||||
|
||||
class BaseScorer(ABC):
|
||||
"""Abstract base for all factor scorers."""
|
||||
|
||||
def __init__(self, db_path: Optional[str] = None):
|
||||
self.db_path = db_path or config.db_path
|
||||
|
||||
def get_connection(self) -> sqlite3.Connection:
|
||||
conn = sqlite3.connect(self.db_path)
|
||||
conn.row_factory = sqlite3.Row
|
||||
return conn
|
||||
|
||||
@abstractmethod
|
||||
def compute(self, target_date: Date) -> FactorScore:
|
||||
"""Compute factor score for a given date from database records."""
|
||||
...
|
||||
Reference in New Issue
Block a user