INNER CODE UNIT · Python
build_modules_file
epigen/MrBiomics · helpers/MrBiomics_context_crawler.py:244
def build_modules_file(modules: Sequence[RepoSpec], generated_at: dt.datetime, token: Optional[str]) -> str:
header_lines = [
f"Snapshot generated: {generated_at.isoformat()}",
"Modules included (latest default branch commits):",
]
for repo in modules:
header_lines.append(f" - {repo.label} ({repo.url})")
header_lines.extend(
[
"",
'Each module section begins with "===== MODULE: <label> =====".',
]
)
sections = []
for repo in modules:
sha, commit_date = fetch_latest_commit(repo.url, token)
digest = fetch_repo_digest(repo, token)
section_lines = [