# 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
# Rendered, secret-bearing Lean config produced by
# scripts/render_lean_credentials.py / `aq render-lean-config` from .env.live.
# The tracked lean.json stays all-empty; this is the copy with real keys filled.
lean.live.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/versions/
# Manual pre-rank-pivot snapshot (rollback point for the Stage 1-5
# rank-pivot roadmap work, development/Problems.md#43) - a local backup,
# never meant to be committed.
ml/_backup_pre_rank_pivot/
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
# Multitask/sequence/gating model artifacts - these were previously tracked
# (an inconsistency with every other generated model artifact above, which
# was already gitignored), so a real trained model's weights could end up
# committed to the public repo. Untracked via `git rm --cached` alongside
# this rule so it's actually impossible, not just something to remember.
ml/multitask_model.json
ml/multitask_feature_schema.json
ml/multitask_training_metrics.json
ml/sequence_model.json
ml/sequence_feature_schema.json
ml/sequence_training_metrics.json
ml/gating_model.json
ml/gating_feature_schema.json
ml/gating_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

# Aether-Vault (`av` CLI) local repo bootstrap - machine-local tool state
# (retraining/vault_client.py's commit target), not project source.
.av/

# scripts/profile_subsystems.py's main.py::_build_model_input() profiling
# side-channel log (development/Problems.md #36) - regenerable diagnostic
# output, not source.
model_input_timing.log
