MCPcopy Create free account
hub / github.com/NVIDIA/SOL-ExecBench / get_entry_source

Method get_entry_source

src/sol_execbench/core/data/solution.py:312–324  ·  view source on GitHub ↗

Get the entry source file specified in the build spec. Returns ------- Optional[SourceFile] The SourceFile object containing the entry point, or None if not found.

(self)

Source from the content-addressed store, hash-verified

310 return self.spec.entry_point.split("::")[-1]
311
312 def get_entry_source(self) -> Optional[SourceFile]:
313 """Get the entry source file specified in the build spec.
314
315 Returns
316 -------
317 Optional[SourceFile]
318 The SourceFile object containing the entry point, or None if not found.
319 """
320 entry_path = self.spec.entry_point.split("::")[0]
321 for source in self.sources:
322 if source.path == entry_path:
323 return source
324 return None
325
326 def model_post_init(self, __context: Any) -> None:
327 # Precompute hash once since the model is frozen/immutable.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected