# Python cache and virtual environments
__pycache__/
*.py[cod]
*$py.class
.pytest_cache/
.mypy_cache/
.ruff_cache/
.venv/
venv/
env/
*.egg-info/
/dist/
/build/

# Local secrets and broker/API credentials
.env
.env.*
!.env.compose.example
!.env.live.example
ib_config.py
*_config.local.py
config.local.json
lean.local.json

*.key
*.pem

# OS/editor noise
.DS_Store
Thumbs.db
.idea/
.vscode/
.claude/
docker-compose.override.yml
postgres-data/
redis-data/
grafana-data/
pgdata/

# Lean market data: too large for a public GitHub repo
data/**
!data/**/
!data/**/.keep
!data/**/.gitkeep

# Exception: small, hand-authored reference/config JSON files that this
# codebase documents as "checked in" and reads at runtime/test time (not
# bulk market data) - see tests/test_futures_risk.py, tests/test_ib_backfill.py,
# tests/test_train_cross_sectional_features.py, and development/Problems.md#10.
# The blanket data/** rule above silently excluded these from every fresh
# clone (including CI), which is why the tests reading them failed there.
!data/reference/*.json

# Lean object store / local runtime output
storage/
objectstore/

# Backtest results and generated reports
backtests/**
!backtests/
!backtests/.gitkeep

# Generated ML datasets and binary artifacts
ml/datasets/
ml/expert_datasets/
ml/expert_models/
ml/model.pt
ml/scaler.pkl
ml/*.pkl
ml/*.pt
ml/*.pth
ml/*.onnx

# Generated ML/runtime JSON artifacts
ml/dataset_inventory.json
ml/dataset_manifest.json
ml/expert_dataset_manifest.json
ml/feature_schema.json
ml/model_weights.json
ml/scaler_stats.json
ml/training_metrics.json
ml/expert_training_metrics.json

# Generated visualization/runtime feeds
visualization/state.json
visualization/scene.json
visualization/topology_state.json
visualization/grafana/

# Logs and temporary files
.coverage
coverage.xml
htmlcov/
*.log
*.tmp
*.bak
# Obsidian vault for project graphs and AI handoffs
Aether-quant-Obsidian-Vault/

# Webui (React/Vite) build artifacts and dependencies
webui/node_modules/
webui/dist/

# Matplotlib font cache, redirected here by main.py so it persists across
# Lean CLI's ephemeral per-backtest Docker containers instead of rebuilding
# every run (see Problems.md)
.matplotlib_cache/

# scripts/profile_inference.py's pstats dump - regenerable output, not source
scripts/profile_inference_output*.txt
scripts/profile_subsystems_output*.txt

# cpp_inference_ext/'s compiled build artifacts - regenerable via
# `pip install -e cpp_inference_ext/`, never source. The .pyd itself is
# also gitignored (never a hard dependency - the whole point is that
# most checkouts run without it, falling back to NumPy).
cpp_inference_ext/build/
cpp_inference_ext/*.egg-info/
cpp_inference_ext/*.pyd
cpp_inference_ext/*.so
cpp_inference_ext/install_log*.txt
