Phase 1 : socle Python, schéma SQLite + FTS5, modèles pydantic
- pyproject/uv sur Python 3.12, dépendances épinglées - migrations versionnées (PRAGMA user_version) ; 001_initial pose textes, sources, evenements, decisions_cc, insights, veille_log, veille_changements - index FTS5 à contenu externe, tokenizer unicode61 remove_diacritics 2 : « chlordecone » retrouve « chlordécone », highlight() disponible - vue v_textes : devant_cc combine le statut et les affaires CC en instance, ce qui réconcilie le §7 (Riposte reste adoptee_non_promulguee) et le §8.7 (la facette saisie_cc doit remonter ≥ 7 textes) - modèles pydantic refusant les incohérences de statut : promulguée sans numéro, navette avec numéro officiel, slug malformé - Makefile, .env.example, journalisation structlog Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
3ce7d17db9
commit
31d3935bce
@@ -0,0 +1,84 @@
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Veille législative Guadeloupe — commandes du projet
|
||||
#
|
||||
# make install installe le pipeline Python et l'application web
|
||||
# make db-init crée ou migre la base SQLite
|
||||
# make seed remplit la base depuis data/input/ (lecture seule)
|
||||
# make update-dry collecte réelle sans écriture, rapport des différences
|
||||
# make update collecte réelle et mise à jour de la base
|
||||
# make test pytest avec couverture du pipeline
|
||||
# make dev serveur de développement SvelteKit
|
||||
# make build build de production
|
||||
# make verifier contrôles de conformité (§3bis et §8 du cahier des charges)
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
PY := .venv/bin/python
|
||||
PYTEST := .venv/bin/pytest
|
||||
RUFF := .venv/bin/ruff
|
||||
WEB := web
|
||||
|
||||
.DEFAULT_GOAL := aide
|
||||
.PHONY: aide install install-py install-web db-init seed reseed update update-dry \
|
||||
test couverture lint format dev build check verifier propre
|
||||
|
||||
aide:
|
||||
@grep -E '^# make' Makefile | sed 's/^# / /'
|
||||
|
||||
# ── Installation ─────────────────────────────────────────────────────────────
|
||||
install: install-py install-web
|
||||
|
||||
install-py:
|
||||
uv venv --python 3.12
|
||||
uv pip install -e ".[dev]"
|
||||
|
||||
install-web:
|
||||
cd $(WEB) && npm ci || (cd $(WEB) && npm install)
|
||||
|
||||
# ── Pipeline ─────────────────────────────────────────────────────────────────
|
||||
db-init:
|
||||
$(PY) -m pipeline.db
|
||||
|
||||
seed:
|
||||
$(PY) -m pipeline.seed_from_research
|
||||
|
||||
reseed:
|
||||
$(PY) -m pipeline.seed_from_research --repartir-de-zero
|
||||
|
||||
update:
|
||||
$(PY) -m pipeline.update
|
||||
|
||||
update-dry:
|
||||
$(PY) -m pipeline.update --dry-run
|
||||
|
||||
# ── Qualité ──────────────────────────────────────────────────────────────────
|
||||
test:
|
||||
$(PYTEST) --cov=pipeline --cov-report=term-missing
|
||||
|
||||
couverture:
|
||||
$(PYTEST) --cov=pipeline --cov-report=html
|
||||
@echo "Rapport : htmlcov/index.html"
|
||||
|
||||
lint:
|
||||
$(RUFF) check pipeline tests
|
||||
|
||||
format:
|
||||
$(RUFF) format pipeline tests
|
||||
$(RUFF) check --fix pipeline tests
|
||||
|
||||
# ── Application web ──────────────────────────────────────────────────────────
|
||||
dev:
|
||||
cd $(WEB) && npm run dev
|
||||
|
||||
build:
|
||||
cd $(WEB) && npm run build
|
||||
|
||||
check:
|
||||
cd $(WEB) && npm run check
|
||||
|
||||
# ── Conformité ───────────────────────────────────────────────────────────────
|
||||
verifier:
|
||||
@bash scripts/verifier-conformite.sh
|
||||
|
||||
propre:
|
||||
rm -rf .pytest_cache htmlcov .coverage $(WEB)/.svelte-kit $(WEB)/build
|
||||
find . -name __pycache__ -type d -prune -exec rm -rf {} +
|
||||
Reference in New Issue
Block a user