You've already forked donnees_meteo
Refactoring
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user