hydra.build.walk module

Pure directory-traversal decision helpers: deterministic ordering and basename matching over observed paths.

hydra.build.walk.base_name(path: str) str

The final /-separated segment of a path (its file name).

hydra.build.walk.extension_of(path: str) str

The extension of a path (after the final . in its file name), or empty if none.

hydra.build.walk.filter_by_base_name(name: str, paths: Sequence[str]) Sequence[str]

Paths whose file name equals the given name, sorted deterministically.

hydra.build.walk.filter_by_extension(ext: str, paths: Sequence[str]) Sequence[str]

Paths whose extension equals the given extension, sorted deterministically.

hydra.build.walk.matches_base_name(name: str, path: str) bool

Whether a path’s file name equals the given name.

hydra.build.walk.matches_extension(ext: str, path: str) bool

Whether a path’s extension equals the given extension.

hydra.build.walk.sort_paths(paths: Sequence[T0]) Sequence[T0]

Sort a list of paths into a deterministic ascending order.