from research import *
def run(title,question,compute,finding,reassessment,sources=()):
completed=json.loads(JOURNAL.read_text()) if JOURNAL.exists() else []
old=[r for r in completed if r['title']==title]
if old:
assert old[0]['question']==question
print('Already completed C'+str(old[0]['step'])+'; not repeated.')
return
if (ROOT/'pending.json').exists():
pending=json.loads((ROOT/'pending.json').read_text())
assert pending['title']==title and pending['question']==question
else: begin(title,question,sources)
result=compute()
finish(result,finding,reassessment)
Evidence
runner.py
Edition and provenance
runner.py
SHA-256 88f7cb8c238e9aefe98e3454b690b1d83c8a033b74b47b5882c7fc66c0bd718b
C480–C1634/Research_Cycles/C1585_C1634/runner.py