# ─── Secrets & credentials (NEVER commit) ────────────────────────────────
.env
.env.*
!.env.production.template
!.env.example
*.pem
# IEA-693: GoDaddy G2 public intermediate cert MUST be tracked so the
# atc-revisions scraper can build its TLS chain — Grid-India's server
# does not send the intermediate in its handshake. Public cert, no
# secret material; explicitly allowlisted past the *.pem rule.
!src/transmission_map/data/grid_india_chain.pem
*.key
id_rsa*
credentials*
secrets*

# ─── Python ──────────────────────────────────────────────────────────────
.venv/
venv/
__pycache__/
.pytest_cache/
.mypy_cache/
.ruff_cache/
*.pyc
*.pyo
*.pyd
*.egg-info/
dist/
build/
.coverage
htmlcov/

# ─── Node / frontend (in case someone vendors front-end here) ────────────
node_modules/

# ─── OS / editor junk ────────────────────────────────────────────────────
.DS_Store
Thumbs.db
.idea/
.vscode/
*.swp
*~

# ─── Local agent / tool state ────────────────────────────────────────────
.claude/
.playwright-cli/
.aider*
.cursor/

# ─── Project data dirs (bulk + derived; keep keepfiles + READMEs) ────────
data/raw/**
data/intermediate/**
data/exports/**
data/dumps/**
data/audits/*.csv
tmp/**
logs/
*.log
backups/
*.bak
*.backup
*.dump
*.sql.gz

# Allowlist within data/
!data/raw/.gitkeep
!data/raw/README.md
# IGG-T01 (IEA-2078): vendored external substation sources — repo builds standalone
!data/raw/external/
!data/raw/external/**
!data/raw/maharashtra/
!data/raw/maharashtra/msetcl/
!data/raw/maharashtra/msetcl/.gitkeep
!data/raw/maharashtra/msetcl/README.md
!data/raw/osm/
!data/raw/osm/.gitkeep
!data/raw/osm/README.md
!data/intermediate/.gitkeep
!data/exports/.gitkeep
!tmp/.gitkeep

# ─── Big binaries that shouldn't live in git ─────────────────────────────
*.pmtiles
*.mbtiles
*.parquet
*.geojsonl
*.gpkg
# IEA-1723: committed reproducibility fixture for notebooks/iex_forecast_benchmarks.ipynb
# (the source corpus is the license-restricted arun-virta export, not in-repo, so a
# clean clone cannot regenerate it — the fixture itself must be tracked).
!notebooks/fixtures/iex_forecast_benchmark_folds.parquet
# IEA-1766: committed block net-load corpus (2025-09-19..2026-06-21) so the
# block-level net-load re-test reproduces without DB access.
!notebooks/fixtures/iea_1766_netload_blocks.parquet
# IEA-1768: committed news snapshot (news_syndication_items, ~1 month) so the
# news spike-risk kill-or-confirm reproduces without DB access.
!notebooks/fixtures/iea_1768_news_items.parquet
# IGG-T11 (IEA-2088): vendored demand-grid parquet is a first-class conflation
# input (hash-verified in sources_manifest.yaml) — the repo must build standalone.
!data/raw/external/**/*.parquet
# A5: the LGD village index IS the admin gate — scripts/backfill_lgd_district_codes.py
# and tests/test_lgd_admin.py both resolve district codes against it, and it cannot
# be regenerated from a clean clone (the source frame lives only in the local-only
# coverage engine). 5.3 MB, zstd, numeric columns only. See PROVENANCE.md.
!data/reference/lgd/lgd_village_index.parquet
# F2: the ERA5 resource lattice IS the siting score's only resource input, and
# regenerating it costs ~50 min of rate-limited Open-Meteo calls whose values
# would drift with the archive. 12 KB, 190 rows. Vendored so the score is
# reproducible offline and reviewable in a diff.
!data/reference/resource/india_resource_grid.parquet
*.shp
*.shx
*.dbf
*.prj
*.cpg
*.tif
*.tiff
*.h5

# ─── Local DB / state ────────────────────────────────────────────────────
*.sqlite
*.sqlite3
*.db
postgres-data/

# IEA-773 — rendered at deploy time by scripts/setup_ops_basic_auth.sh
# We keep the placeholder under nginx/ops-htpasswd checked in (deny-all
# until first deploy); the local rendered version on the droplet is
# host-only and never committed.
nginx/ops-htpasswd.rendered
.worktrees/

# WS3 heavy champion-replay cache (regen: scripts/ws3_correlation_atlas.py --mode residuals)
analysis/ws3/champion_residuals.csv

# Full RPC SEM research export is reproducible and too large uncompressed.
# Track the compact manuscript bundle and the packaged ZIP, not the work dir.
output/research/rpc-sem-research-*/
infra/merit-backfill/.instance
infra/merit-backfill/*.pem
infra/merit-backfill/shards/
data/raw/merit/

# Immutable RPC settlement artifacts (content-addressed download cache, ~GBs).
# Re-fetchable from the source URL recorded in rpc_sem_artifacts.
data/rpc-sem/
