dootle.utils.commit_caching

See EOF for license/metadata/notes as applicable

Functions

_build_cache_path(→ pathlib.Path)

Classes

GetChangedFilesByCommit

Read a cached commit, and the head commit,

CacheGitCommit

Record the head commit hash id in a cache file

Module Contents

dootle.utils.commit_caching._build_cache_path(
cache: None | pathlib.Path,
taskname: doot.workflow.TaskName,
) pathlib.Path
Parameters:
  • cache (None | pathlib.Path)

  • taskname (doot.workflow.TaskName)

Return type:

pathlib.Path

class dootle.utils.commit_caching.GetChangedFilesByCommit

Read a cached commit, and the head commit, get git log’s list of files that have changed

Like job.walker, will select only files descended from roots, and with a suffix that matches on in exts, and passes fn, a one arg test function.

(recursive is not used.)

If cache is not specified, tried to read {temp}/{taskname}.commmit_cache If cache does not exist, diffs the past {head_count} commits

control_e
_test_files(
spec,
state,
roots,
exts,
fn,
potentials,
) list[pathlib.Path]

filter found potential files by roots, exts, and a test fn

Return type:

list[pathlib.Path]

class dootle.utils.commit_caching.CacheGitCommit

Bases: doot.mixins.path_manip.PathManip_m

Record the head commit hash id in a cache file

if {cache} is not specified, defaults to {temp}/{taskname}.commit_cache