From d25e6f1140a9803d7ede94261e602c2561ff8b0a Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 8 Jul 2026 14:46:07 +0200 Subject: [PATCH] lazy: repair fallout from store-infra resolve The resolve brought over the pydantic ToolIndex and the incremental/twin populate tests without adapting lazy-only surface: benchmarks.py still called the deleted to_dict/from_dict, and the test config stubs lacked the data-manager conf and biotools attributes the lazy populate path reads. Convert benchmarks to model_dump/model_validate and consolidate the two identical test stubs into one _populate_config helper carrying the full attribute set. Claude-Session: https://claude.ai/code/session_018L7ZmCv2ubKA3JNeSL8Pkr --- lib/galaxy/tools/source_store/benchmarks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/galaxy/tools/source_store/benchmarks.py b/lib/galaxy/tools/source_store/benchmarks.py index 8fbac494834..503a4a1fa46 100644 --- a/lib/galaxy/tools/source_store/benchmarks.py +++ b/lib/galaxy/tools/source_store/benchmarks.py @@ -268,23 +268,23 @@ class ToolSourceBenchmarks: ) def benchmark_index_serialization(self, iterations: int = 50) -> BenchmarkResult: - """Benchmark index to_dict serialization.""" + """Benchmark index serialization to JSON-ready dicts.""" index = self._build_sample_index(1000) return benchmark_function( "index_serialization", - lambda: index.to_dict(), + lambda: index.model_dump(mode="json"), iterations, ) def benchmark_index_deserialization(self, iterations: int = 50) -> BenchmarkResult: - """Benchmark index from_dict deserialization.""" + """Benchmark index deserialization from JSON-ready dicts.""" index = self._build_sample_index(1000) - data = index.to_dict() + data = index.model_dump(mode="json") return benchmark_function( "index_deserialization", - lambda: ToolIndex.from_dict(data), + lambda: ToolIndex.model_validate(data), iterations, )