cleanup: remove stale .mindmodel, old venvs, orphaned code, and transient artifacts
Removes: - .mindmodel/ directory and related CI workflows (mindmodel-schedule.yml, mindmodel-validation.yml) - scripts/mindmodel/ and scripts/validate_mindmodel.py - src/types/ and src/validators/ (orphaned type modules, only used by mindmodel) - tests/ci/, tests/scripts/mindmodel/, tests/types/, tests/validators/ (mindmodel-only tests) - thoughts/ledgers/ and thoughts/shared/ (stale transient directories) - .venv_axis and .venv_plotly (orphaned virtual environments, ~1.1 GB) - outputs/blog-charts/ (stale generated HTML files) - data/*.json sidecars (empty cache artifacts) - __pycache__ and *.pyc files across repo Updates: - .gitignore: remove thoughts/shared/analyses/ entry Space reclaimed: ~1.1 GB+
This commit is contained in:
@@ -346,7 +346,12 @@ def load_party_mp_vectors(db_path: str) -> Dict[str, List[np.ndarray]]:
|
||||
|
||||
|
||||
def load_scree_data(db_path: str) -> List[float]:
|
||||
"""Load scree plot data (explained variance) for current_parliament."""
|
||||
"""Load scree plot data (explained variance) for current_parliament.
|
||||
|
||||
First tries to read the cached metadata row from svd_vectors.
|
||||
Falls back to on-the-fly computation via compute_svd_spectrum for
|
||||
backward compatibility with databases that haven't stored it yet.
|
||||
"""
|
||||
try:
|
||||
con = duckdb.connect(database=db_path, read_only=True)
|
||||
row = con.execute(
|
||||
@@ -364,7 +369,11 @@ def load_scree_data(db_path: str) -> List[float]:
|
||||
import json
|
||||
|
||||
return json.loads(row[0])
|
||||
return []
|
||||
|
||||
# Fallback: compute dynamically for backward compatibility
|
||||
from analysis.political_axis import compute_svd_spectrum
|
||||
|
||||
return compute_svd_spectrum(db_path)
|
||||
except Exception:
|
||||
logger.exception("Failed to load scree data")
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user