# ── Python ──────────────────────────────────────────────────
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
*.sage.py
cython_debug/

# Distribution / packaging — root-level build artifacts, anchored with a
# leading "/" so they don't also ignore same-named source/fixture dirs
# (e.g. tests/fixtures/lib, src/.../lib). egg-info stays unanchored because
# it lives under src/; target/ stays unanchored for nested Rust crates.
/build/
/develop-eggs/
/dist/
/downloads/
/eggs/
/.eggs/
/lib/
/lib64/
/parts/
/sdist/
/var/
/wheels/
*.egg
*.egg-info/
.installed.cfg
target/
*.dxt

# Virtual environments
.venv
venv/
venv.bak/
env/
env.bak/
ENV/

# Environment / secrets
.env
.env.local
.env.*.local

# Testing & coverage
.coverage
.coverage.*
coverage.xml
coverage-report-*/
*.cover
htmlcov/
.cache
.hypothesis/
.nox/
.tox/
.pytest_cache/
nosetests.xml
bandit-report.json
trivy-results.sarif

# Type checkers
.mypy_cache/
.dmypy.json
dmypy.json
.pyre/
.pytype/

# Jupyter / IPython
.ipynb_checkpoints
profile_default/
ipython_config.py

# Web frameworks (Django / Flask / Scrapy / Celery)
local_settings.py
local_settings.json
db.sqlite3
instance/
.webassets-cache
.scrapy
celerybeat-schedule

# Python tooling
.python-version
.spyderproject
.spyproject
.ropeproject

# Translations
*.mo
*.pot

# Docs build output
docs/_build/
/site

# ── Node ────────────────────────────────────────────────────
node_modules/

# ── IDEs / editors ──────────────────────────────────────────
.idea/
.vscode/
.windsurf/
.cursor/
*.swp
*.swo
*~

# ── OS / system files ───────────────────────────────────────
.DS_Store
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/

# ── Logs & databases ────────────────────────────────────────
*.log
*.sql
*.db
*.sqlite
*.sqlite3
*.db-journal
*.db-wal
*.db-shm
# Exception: allow small test fixtures (committed for CI)
!tests/fixtures/**/*.db
!tests/fixtures/**/*.epub
!tests/fixtures/**/*.pdf
!tests/fixtures/**/*.cbz

# ── Calibre / CalibreMCP specific ───────────────────────────
.calibre-mcp-data/
calibre/
data/
metadata.db
metadata_db_prefs_backup.json
full-text-search.db
*.calibredb
*.calibre-metadata
samples/*.db
samples/*.json

# ── Project hygiene ─────────────────────────────────────────
# Private dev notes (not for public)
docs-private/

# Old / backup files
*_old.py
*.bak
*.backup

# Stray test/util scripts that belong in tests/ or scripts/
test_*.py
!tests/test_*.py
!tests/**/test_*.py
!scripts/test_*.py
extract_tools.py
minimal_test.py
run_server.py
!scripts/extract_tools.py
!scripts/minimal_test.py
!scripts/run_server.py

# Dev/debug scratch artifacts — never commit
_dashboard/
test_out*.txt
curl_out.json
scratch/
cua-reports/

# Local browser exports (e.g. ToolBench) — do not commit
calibremcp - Trust Report _ ToolBench.htm
calibremcp - Trust Report _ ToolBench_files/

# Build / runtime artifacts — generated, never commit (external audit)
logs/
*.log
*.log.*
extension.wasm
calibre_mcp_integration.zip
webapp/frontend/tsconfig.tsbuildinfo
*.tsbuildinfo
lancedb_test_calibre/
*.bak
*.bak.*
