PY := .venv/bin/python

.PHONY: test lint fmt typecheck privacy notebooks all selftest

test:      ; $(PY) -m pytest
# Os DOIS comandos, como no CI: `ruff check` não verifica formatação,
# e rodar só ele deixava o CI vermelho com o local verde.
lint:      ; $(PY) -m ruff check . && $(PY) -m ruff format --check .
fmt:       ; $(PY) -m ruff format .
typecheck: ; $(PY) -m mypy jurisgrow
privacy:   ; $(PY) scripts/privacy_check.py .
notebooks: ; $(PY) scripts/check_notebooks.py
# BUNDLE_DIR e DATA_DIR sao passados pelo operador; nunca versionados.
selftest:  ; cd "$(BUNDLE_DIR)" && "$(CURDIR)/$(PY)" classify.py --selftest
all: lint typecheck test notebooks privacy
