Spaces:
Sleeping
test(7.D): cleanup test_public_api après suppression des modules legacy
Browse filesPhase 7.D — mise à jour des tests d'API publique pour refléter
la suppression du runner legacy.
Classes de tests retirées
-------------------------
- ``TestPipelineRunnerApi`` : vérifiait l'existence de
``PipelineStep``, ``PipelineSpec``, ``StepResult``,
``PipelineResult``, ``PipelineRunner`` dans le runner legacy.
- ``TestPipelineBenchmarkApi`` : vérifiait
``StepAggregate``, ``PipelineBenchmarkResult``,
``default_initial_inputs``, ``run_pipeline_benchmark``.
- ``TestPipelineComparisonApi`` : vérifiait
``PipelineComparisonResult``, ``compare_pipelines``.
- ``TestPipelineSpecLoaderApi`` : vérifiait
``PipelineSpecLoadError``, ``load_pipeline_spec_from_*``,
``load_comparison_specs_from_*``.
Section 6 du fichier remplacée par un commentaire qui pointe vers
l'API canonique (``PipelineExecutor`` + ``domain.pipeline_spec``).
Test ``TestApiStableDocConsistency.test_doc_mentions_each_module``
mis à jour : retrait des 4 modules legacy de la liste
attendue. La doc ``docs/reference/api-stable.md`` sera
nettoyée dans un commit suivant.
https://claude.ai/code/session_011XQZNitg1rCgia8ZD1a2hP
|
@@ -235,64 +235,13 @@ class TestRunnerApi:
|
|
| 235 |
|
| 236 |
|
| 237 |
# ──────────────────────────────────────────────────────────────────────────
|
| 238 |
-
# 6. picarones.pipeline.
|
| 239 |
# ──────────────────────────────────────────────────────────────────────────
|
| 240 |
-
#
|
| 241 |
-
#
|
| 242 |
-
#
|
| 243 |
-
# ``pipeline
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
class TestPipelineRunnerApi:
|
| 247 |
-
@pytest.mark.parametrize("name", [
|
| 248 |
-
"PipelineStep", "PipelineSpec",
|
| 249 |
-
"StepResult", "PipelineResult", "PipelineRunner",
|
| 250 |
-
])
|
| 251 |
-
def test_class_exists(self, name):
|
| 252 |
-
_assert_class("picarones.pipeline.legacy_runner", name)
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
class TestPipelineBenchmarkApi:
|
| 256 |
-
@pytest.mark.parametrize("name", [
|
| 257 |
-
"StepAggregate", "PipelineBenchmarkResult",
|
| 258 |
-
])
|
| 259 |
-
def test_class_exists(self, name):
|
| 260 |
-
_assert_class("picarones.measurements.pipeline_benchmark", name)
|
| 261 |
-
|
| 262 |
-
@pytest.mark.parametrize("name", [
|
| 263 |
-
"default_initial_inputs", "run_pipeline_benchmark",
|
| 264 |
-
])
|
| 265 |
-
def test_function_exists(self, name):
|
| 266 |
-
_assert_function("picarones.measurements.pipeline_benchmark", name)
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
class TestPipelineComparisonApi:
|
| 270 |
-
def test_pipeline_comparison_result(self):
|
| 271 |
-
_assert_class(
|
| 272 |
-
"picarones.measurements.pipeline_comparison", "PipelineComparisonResult",
|
| 273 |
-
)
|
| 274 |
-
|
| 275 |
-
def test_compare_pipelines(self):
|
| 276 |
-
_assert_function(
|
| 277 |
-
"picarones.measurements.pipeline_comparison", "compare_pipelines",
|
| 278 |
-
)
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
class TestPipelineSpecLoaderApi:
|
| 282 |
-
def test_pipeline_spec_load_error(self):
|
| 283 |
-
cls = _assert_class(
|
| 284 |
-
"picarones.measurements.pipeline_spec_loader", "PipelineSpecLoadError",
|
| 285 |
-
)
|
| 286 |
-
assert issubclass(cls, ValueError)
|
| 287 |
-
|
| 288 |
-
@pytest.mark.parametrize("name", [
|
| 289 |
-
"load_pipeline_spec_from_yaml",
|
| 290 |
-
"load_pipeline_spec_from_dict",
|
| 291 |
-
"load_comparison_specs_from_yaml",
|
| 292 |
-
"load_comparison_specs_from_dict",
|
| 293 |
-
])
|
| 294 |
-
def test_function_exists(self, name):
|
| 295 |
-
_assert_function("picarones.measurements.pipeline_spec_loader", name)
|
| 296 |
|
| 297 |
|
| 298 |
# ──────────────────────────────────────────────────────────────────────────
|
|
@@ -494,7 +443,7 @@ class TestApiStableDoc:
|
|
| 494 |
)
|
| 495 |
assert path.exists(), "docs/reference/api-stable.md manquant"
|
| 496 |
content = path.read_text(encoding="utf-8")
|
| 497 |
-
# Présence des
|
| 498 |
for module in [
|
| 499 |
"picarones.evaluation.corpus",
|
| 500 |
"picarones.domain.artifacts",
|
|
@@ -502,10 +451,6 @@ class TestApiStableDoc:
|
|
| 502 |
"picarones.evaluation.benchmark_result",
|
| 503 |
"picarones.measurements.metrics",
|
| 504 |
"picarones.measurements.runner",
|
| 505 |
-
"picarones.pipeline.legacy_runner",
|
| 506 |
-
"picarones.pipeline.legacy_pipeline_benchmark",
|
| 507 |
-
"picarones.pipeline.legacy_pipeline_comparison",
|
| 508 |
-
"picarones.measurements.pipeline_spec_loader",
|
| 509 |
"picarones.evaluation.metric_registry",
|
| 510 |
"picarones.evaluation.metric_hooks",
|
| 511 |
"picarones.measurements.builtin_metrics",
|
|
|
|
| 235 |
|
| 236 |
|
| 237 |
# ──────────────────────────────────────────────────────────────────────────
|
| 238 |
+
# 6. (anciennement) ``picarones.pipeline.legacy_*`` — supprimé en Phase 7.D
|
| 239 |
# ──────────────────────────────────────────────────────────────────────────
|
| 240 |
+
# Les modules ``pipeline.legacy_runner``, ``legacy_pipeline_benchmark``,
|
| 241 |
+
# ``legacy_pipeline_comparison`` et ``measurements.pipeline_spec_loader``
|
| 242 |
+
# ont été supprimés en Phase 7.D (mai 2026). L'API canonique vit dans
|
| 243 |
+
# ``picarones.pipeline.executor`` (``PipelineExecutor``) et
|
| 244 |
+
# ``picarones.domain.pipeline_spec`` (``PipelineSpec``, ``PipelineStep``).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
|
| 246 |
|
| 247 |
# ──────────────────────────────────────────────────────────────────────────
|
|
|
|
| 443 |
)
|
| 444 |
assert path.exists(), "docs/reference/api-stable.md manquant"
|
| 445 |
content = path.read_text(encoding="utf-8")
|
| 446 |
+
# Présence des sections (1 par module canonique)
|
| 447 |
for module in [
|
| 448 |
"picarones.evaluation.corpus",
|
| 449 |
"picarones.domain.artifacts",
|
|
|
|
| 451 |
"picarones.evaluation.benchmark_result",
|
| 452 |
"picarones.measurements.metrics",
|
| 453 |
"picarones.measurements.runner",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 454 |
"picarones.evaluation.metric_registry",
|
| 455 |
"picarones.evaluation.metric_hooks",
|
| 456 |
"picarones.measurements.builtin_metrics",
|