1

Refactoring

This commit is contained in:
2025-11-18 09:01:34 +01:00
parent b3d657deb9
commit 85da4e4931
25 changed files with 2407 additions and 2155 deletions

View File

@@ -27,11 +27,7 @@ def main() -> None:
print(f"Après resampling 60s : {len(df_min)} lignes")
hemisphere = "north"
try:
location = StationLocation.from_env(optional=True)
except RuntimeError as exc:
print(f"⚠ Coordonnées GPS invalides : {exc}")
location = None
location = StationLocation.from_env(optional=True)
if location is not None:
hemisphere = "south" if location.latitude < 0 else "north"

View File

@@ -69,11 +69,7 @@ def iter_modules(selected: Iterable[str] | None) -> list[str]:
def run_module(module: str) -> bool:
cmd = [sys.executable, "-m", module]
print(f"\n=== {module} ===")
try:
result = subprocess.run(cmd, check=False)
except FileNotFoundError as exc: # pragma: no cover
print(f"⚠ Impossible de lancer {module} : {exc}")
return False
result = subprocess.run(cmd, check=False)
if result.returncode == 0:
print(f"{module} terminé avec succès.")

View File

@@ -34,10 +34,7 @@ def main() -> None:
print("✔ Ping OK")
print("→ Requête de test sur le bucket…")
try:
tables = test_basic_query(client, settings.bucket)
except InfluxDBError as exc:
raise SystemExit(f"Erreur lors de la requête Flux : {exc}") from exc
tables = test_basic_query(client, settings.bucket)
# On fait un retour synthétique
nb_tables = len(tables)