# Byte-compiled / optimized
__pycache__/
*.py[cod]
*$py.class
*.so

# Distribution / packaging
.Python
build/
dist/
sdist/
wheels/
*.egg-info/
*.egg
MANIFEST

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

# Testing and coverage
.pytest_cache/
.coverage
.coverage.*
coverage.xml
htmlcov/
.tox/
.nox/

# Type checking and linting caches
.mypy_cache/
.ruff_cache/
.dmypy.json
dmypy.json

# Documentation build
site/

# ----------------------------------------------------------------------
# Secrets
#
# The framework needs no credentials to run, so nothing here should ever
# exist. These rules are preventive: a local .env added later for a
# downstream integration must not be committed by accident.
# ----------------------------------------------------------------------
.env
.env.*
!.env.example
*.pem
*.key
credentials.json
secrets.yaml
secrets.yml

# Editors and local tooling
.idea/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# ----------------------------------------------------------------------
# Project artefacts
#
# Trained models and reports are reproducible from configuration and are
# frequently large, so they are not tracked. The sample corpus under
# data/sample/ is the deliberate exception: it is small and the examples
# depend on it.
# ----------------------------------------------------------------------
artifacts/

# Output of scripts/verify_e2e.py. Regenerable, and large — a single
# mid-sized wiki produces hundreds of megabytes of extracted corpus and
# mined pairs, which is not something to carry in git history.
verify-output/
verify-*.txt

# Evaluation output is regenerated by every run. The directory itself is
# kept so a fresh clone has somewhere to write.
reports/*
!reports/.gitkeep

# Working corpora are large and often licensed, so they stay local. This
# includes the real training and evaluation corpora — data/corpora/ holds
# the downloaded judgment PDFs and MILPaC workbooks, and data/dumps/ the
# Wikipedia dumps — none of which belong in git history for reasons of
# size and licence both. It is also the boundary that keeps anything that
# is not openly licensed out of the repository by default; a corpus lands
# here, is declared, and is never committed. The committed exceptions are
# the small sample corpus the examples and docs depend on, and the
# directory's own documentation.
data/*
!data/sample/
!data/README.md

# Trained model artefacts. These are build outputs, reproducible from a
# config file, and large. Note this also covers `vectors.npy` and
# `tokenizer.model` inside an experiment directory.
*.model
*.npy
*.npz

# Adapted checkpoints. The default is to ignore them, for the reason
# above. Two are deliberate exceptions, each ~2.4 MB (trivial):
#   - models/indic-v1/ — the original two-language (hi/ta) LoRA. It is
#     *not* reproducible from anything here (it predates `qfme adapt`,
#     and its base checkpoint is an external name whose contents can
#     change), the early published numbers were measured on it, and the
#     integration tests load it as a fixture. An artefact that carries
#     claims and cannot be rebuilt has to be kept.
#   - models/prod-a70s30-fr/ — the current production adapter, retrained
#     on commercially-clean data (BPCC-Mined CC0 sentence side + Tatoeba
#     CC BY en↔fr, over the CC BY-SA Wikipedia article side). On the
#     held-out FLORES-200 global baseline (15 world languages, scored on
#     CUDA) it lifts all-pairs recall above both the base model and v2 and
#     recovers French, at no Indic cost within sampling noise. Canonical
#     serving artefact; ships like a release binary and pins the published
#     global numbers to exact, provenance-clean weights.
#
# models/prod-a70s30/ is intentionally NOT tracked: its sentence side was
# Samanantar (CC BY-NC) + opus-100 (unknown licence), so redistributing
# those weights would carry a NonCommercial restriction. It survives only
# as the Indic-measurement reference — its numbers are documented in
# README.md and the handbook; the binary is not distributed. prod-a70s30-fr
# supersedes it as the serving artefact.
models/*
!models/indic-v1/
!models/prod-a70s30-fr/
!models/embed-legal-en/
!models/embed-statute-en/
!models/embed-gov-indic/
# rerank-statute-en ships a full 470 MB cross-encoder; track only the card,
# never the weights (HF-only). Un-ignore the dir, re-ignore its contents,
# then un-ignore the README.
!models/rerank-statute-en/
models/rerank-statute-en/*
!models/rerank-statute-en/README.md
!models/README.md

# Local data-prep scratch. The `scratch_*` scripts and directories are
# throwaway discovery and corpus-preparation helpers (BPCC, Tatoeba,
# OPUS-100, FLORES, ParaCrawl) that depend on large local corpora under
# data/ and are not part of the framework. flores-global-devtest.jsonl is a
# regenerable evaluation slice. None of these belong in git history.
scratch_*
flores-global-devtest.jsonl

# The project handbook and book are internal. They live in the private
# Quanfire-AI/quanfire-internal repo under factory/knowledge-base/.
knowledge-base/
# Internal factory record lives in the PRIVATE Quanfire-AI/quanfire-internal
# repo. Nothing under internal/ belongs in this public repository.
internal/
