Translate the whole project to English and fix outdated comments and help

Comments, docstrings, logs, CLI help, map UI, legends, PDF sheet, scripts,
compose files and AGENTS.md are now English. Data keys stay unchanged
(relief_oriente, densite_sol, visualisations/, API JSON keys, link params).
Wrong comments and help defaults found along the way are corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Antoine
2026-09-27 23:16:45 +02:00
parent cc1c22d2b8
commit fb892ea9f2
52 changed files with 4356 additions and 4323 deletions

View File

@ -1,8 +1,8 @@
"""Tests du journal d'événements de progression (file de génération)."""
"""Tests for the progress event log (generation queue)."""
def test_report_and_read_events(tmp_path):
"""Les événements s'écrivent en JSONL et se relisent dans l'ordre."""
"""Events are written as JSONL and read back in order."""
from lidar_pipeline.progress import read_events, report_event, reset_events
reset_events(tmp_path)
report_event(tmp_path, "LHD_FXX_1054_6882_PTS_LAMB93_IGN69", "download", "start")
@ -15,7 +15,7 @@ def test_report_and_read_events(tmp_path):
def test_reset_clears_previous_run(tmp_path):
"""reset_events tronque le journal : un nouveau run repart de zéro."""
"""reset_events truncates the log: a new run starts from scratch."""
from lidar_pipeline.progress import read_events, report_event, reset_events
reset_events(tmp_path)
report_event(tmp_path, "X", "tile", "ok")
@ -24,7 +24,7 @@ def test_reset_clears_previous_run(tmp_path):
def test_read_events_missing_or_partial(tmp_path):
"""Dossier sans journal → liste vide ; ligne partielle → ignorée."""
"""Directory without a log → empty list; partial line → skipped."""
from lidar_pipeline.progress import events_path, read_events
assert read_events(tmp_path) == []
events_path(tmp_path).write_text(
@ -35,37 +35,37 @@ def test_read_events_missing_or_partial(tmp_path):
def test_short_name():
"""Le nom court extrait col-row du nom de dalle IGN."""
"""The short name extracts col-row from the IGN tile name."""
from lidar_pipeline.progress import tile_short_name
assert tile_short_name("LHD_FXX_1054_6882_PTS_LAMB93_IGN69") == "1054-6882"
assert tile_short_name("LHD_FXX_1054_6882_PTS_LAMB93_IGN69.copc.laz") == "1054-6882"
assert tile_short_name("autre.tif") == "autre.tif"
assert tile_short_name("other.tif") == "other.tif"
assert tile_short_name("") == ""
def test_aggregate_full_run(tmp_path):
"""Run complet : étapes ordonnées avec libellés français, tuile terminée."""
"""Full run: ordered steps with their labels, tile done."""
from lidar_pipeline.progress import aggregate_tiles, read_events, report_event, reset_events
reset_events(tmp_path)
b = "LHD_FXX_1054_6882_PTS_LAMB93_IGN69"
report_event(tmp_path, b, "download", "skip", "déjà dans input/")
report_event(tmp_path, b, "download", "skip", "already in input/")
report_event(tmp_path, b, "classif", "start")
report_event(tmp_path, b, "classif", "ok")
report_event(tmp_path, b, "dtm", "ok", res=0.5)
report_event(tmp_path, b, "viz", "start", "aspect", res=0.5)
report_event(tmp_path, b, "viz", "ok", "aspect", res=0.5)
report_event(tmp_path, b, "tile", "ok", "123s")
tiles = aggregate_tiles(read_events(tmp_path), viz_labels={"aspect": "Exposition"})
tiles = aggregate_tiles(read_events(tmp_path), viz_labels={"aspect": "Aspect"})
assert len(tiles) == 1
t = tiles[0]
assert t["short"] == "1054-6882" and t["state"] == "done"
assert [s["label"] for s in t["steps"]] == [
"Téléchargement", "Classification", "DTM 0,5 m", "Exposition"]
"Download", "Classification", "DTM 0.5 m", "Aspect"]
assert [s["state"] for s in t["steps"]] == ["skip", "ok", "ok", "ok"]
def test_aggregate_running_step(tmp_path):
"""Une étape démarrée non terminée laisse la tuile « running »."""
"""A started but unfinished step leaves the tile "running"."""
from lidar_pipeline.progress import aggregate_tiles, read_events, report_event, reset_events
reset_events(tmp_path)
b = "LHD_FXX_1054_6882_PTS_LAMB93_IGN69"
@ -79,7 +79,7 @@ def test_aggregate_running_step(tmp_path):
def test_aggregate_failure_marks_tile_failed():
"""Une viz en échec marque la tuile failed même sans événement tuile."""
"""A failed viz marks the tile failed even without a tile event."""
from lidar_pipeline.progress import aggregate_tiles
b = "LHD_FXX_1054_6882_PTS_LAMB93_IGN69"
tiles = aggregate_tiles([
@ -94,32 +94,32 @@ def test_aggregate_failure_marks_tile_failed():
def test_aggregate_multi_resolution_and_bad_input():
"""Deux résolutions → deux étapes DTM/viz distinctes ; entrées invalides ignorées."""
"""Two resolutions → distinct DTM/viz steps; invalid entries skipped."""
from lidar_pipeline.progress import aggregate_tiles
b = "LHD_FXX_1054_6882_PTS_LAMB93_IGN69"
tiles = aggregate_tiles([
"pas du tout du json",
"not json at all",
None,
{"tile": b, "phase": "inconnu", "state": "ok"},
{"tile": b, "phase": "unknown", "state": "ok"},
{"tile": b, "phase": "dtm", "state": "ok", "res": 0.5},
{"tile": b, "phase": "dtm", "state": "ok", "res": 0.2},
{"tile": b, "phase": "viz", "state": "ok", "detail": "aspect", "res": 0.2},
{"tile": b, "phase": "tile", "state": "ok"},
], viz_labels={"aspect": "Exposition"})
], viz_labels={"aspect": "Aspect"})
assert len(tiles) == 1
labels = [s["label"] for s in tiles[0]["steps"]]
assert labels == ["DTM 0,5 m", "DTM 0,2 m", "Exposition 0,2 m"]
# La résolution secondaire (0,2 m) est suffixée, la primaire (0,5 m) non
assert labels == ["DTM 0.5 m", "DTM 0.2 m", "Aspect 0.2 m"]
# The secondary resolution (0.2 m) gets a suffix, the primary one (0.5 m) does not
def test_aggregate_multiple_tiles_ordered():
"""Une entrée par tuile, dans l'ordre de première apparition."""
"""One entry per tile, in order of first appearance."""
from lidar_pipeline.progress import aggregate_tiles
a = "LHD_FXX_1054_6882_PTS_LAMB93_IGN69"
b = "LHD_FXX_1055_6882_PTS_LAMB93_IGN69"
tiles = aggregate_tiles([
{"tile": a, "phase": "download", "state": "ok"},
{"tile": b, "phase": "download", "state": "start", "detail": "catalogue IGN"},
{"tile": b, "phase": "download", "state": "start", "detail": "IGN catalogue"},
{"tile": a, "phase": "tile", "state": "ok"},
])
assert [t["short"] for t in tiles] == ["1054-6882", "1055-6882"]