feat: cierra issues 0050 y 0052 + commands automáticos

- 0050: jupyter_exec reescrito sin Y.js (REST + KernelClient). Bug raíz adicional: HEAD /api/contents da 405 → cambiado a GET. 9 tests (5 unit + 4 e2e).
- 0052: footprint_aurgi cerrado. Bug fix en setup_geo_stack_docker_pipeline (verify aborta si compose up falla; nombre de contenedor incorrecto).
- Nueva primitiva docker_container_running_py_infra (7 tests).
- /full-git-push y /full-git-pull pasan a modo automático: auto-commit + push sin preguntar, aborta solo si detecta secrets.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 23:34:03 +02:00
parent 1e8ade0ed4
commit 5194de3c04
14 changed files with 684 additions and 342 deletions
@@ -1,7 +1,7 @@
"""Tests para setup_geo_stack_docker_pipeline.
El geo stack ya está corriendo en localhost:8002 (Valhalla), por lo que
verify=True retorna flags reales del stack activo.
Si los contenedores del geo stack están corriendo, verifica que el pipeline
devuelve flags coherentes. Si no, salta (stub: requiere infra externa).
"""
from __future__ import annotations
@@ -9,30 +9,39 @@ from __future__ import annotations
import os
import sys
import pytest
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "..", ".."))
from python.functions.infra.docker_container_running import docker_container_running
from python.functions.pipelines.setup_geo_stack_docker_pipeline import (
setup_geo_stack_docker_pipeline,
)
GEO_STACK_CONTAINERS = ("better_maps_valhalla", "better_maps_postgis", "better_maps_martin")
def test_setup_geo_stack_docker_pipeline():
"""Verifica el geo stack activo en localhost (docker ya arrancado)."""
# Llamamos con verify=True pero sin relanzar docker compose
# (pasamos wait_seconds=0 para no esperar, el stack ya está up)
def test_setup_geo_stack_docker_pipeline_shape():
"""El pipeline siempre devuelve un dict con los 4 flags bool, aun sin docker."""
result = setup_geo_stack_docker_pipeline(
compose_path="apps/footprint_geo_stack/docker-compose.yml",
wait_seconds=0,
verify=True,
)
assert isinstance(result, dict)
assert set(result.keys()) == {"docker_up", "valhalla_ok", "postgis_ok", "martin_ok"}
# docker_up puede ser False si el compose no existe en CI, pero verify sí corre
# Lo importante: los flags son bool
for key in ("docker_up", "valhalla_ok", "postgis_ok", "martin_ok"):
for key in result:
assert isinstance(result[key], bool), f"{key} debe ser bool"
# Valhalla está activo en localhost:8002
assert result["valhalla_ok"] is True, "Valhalla debe responder en localhost:8002"
def test_setup_geo_stack_docker_pipeline_live_stack():
"""Si los 3 contenedores están vivos, el pipeline debe reportar valhalla_ok=True."""
if not all(docker_container_running(c) for c in GEO_STACK_CONTAINERS):
pytest.skip(f"geo stack no está activo (contenedores esperados: {GEO_STACK_CONTAINERS})")
result = setup_geo_stack_docker_pipeline(
compose_path="apps/footprint_geo_stack/docker-compose.yml",
wait_seconds=0,
verify=True,
)
assert result["valhalla_ok"] is True, "Valhalla container vivo pero el flag dice False"