MCPcopy Create free account
hub / github.com/Open-Quant/openquant / cmd_status

Function cmd_status

scripts/afml_docs_loop.py:274–293  ·  view source on GitHub ↗
(_args: argparse.Namespace)

Source from the content-addressed store, hash-verified

272
273
274def cmd_status(_args: argparse.Namespace) -> int:
275 state = read_state()
276 total = 0
277 done = 0
278 in_progress = 0
279 for chapter in state["chapters"]:
280 chapter["status"] = recompute_chapter_status(chapter)
281 for section in chapter["sections"]:
282 total += 1
283 if section["status"] == "done":
284 done += 1
285 elif section["status"] == "in_progress":
286 in_progress += 1
287
288 pending = total - done - in_progress
289 print(f"Total sections: {total} | done: {done} | in_progress: {in_progress} | pending: {pending}")
290 for chapter in state["chapters"]:
291 chapter_done = sum(1 for s in chapter["sections"] if s["status"] == "done")
292 print(f"- {chapter['chapter']} [{chapter['status']}] {chapter_done}/{len(chapter['sections'])} :: {chapter['theme']}")
293 return 0
294
295
296def cmd_next(args: argparse.Namespace) -> int:

Callers

nothing calls this directly

Calls 2

read_stateFunction · 0.85
recompute_chapter_statusFunction · 0.85

Tested by

no test coverage detected