Skip to content

Add resumable execution to the screening framework (#33) - #74

Merged
galjos merged 2 commits into
mainfrom
resumable-screening
Jul 6, 2026
Merged

Add resumable execution to the screening framework (#33)#74
galjos merged 2 commits into
mainfrom
resumable-screening

Conversation

@galjos

@galjos galjos commented Jul 6, 2026

Copy link
Copy Markdown
Member

Resolves the one MVP requirement still missing from the screening workflow (#33): resume/checkpoint (input/output formats, result collection, and per-molecule error isolation were already done).

What changed

  • Incremental writesscreen() now writes <out>.json/.csv after every molecule, so an interrupted run leaves a durable partial result set (previously written only once at the end).
  • screen(resume=True) — reuses the status="ok" records from a prior <out>.json (_load_completed), skips those molecules, and (re)runs the missing/previously-failed ones. A missing or corrupt prior file just runs everything.
  • CLIthermo screen --resume.

Tests

  • resume skips completed molecules and re-runs previously-failed ones (only mol_b re-run after mol_a succeeded, mol_b failed);
  • results written incrementally ([1, 2, 3] after each of 3 molecules);
  • _load_completed tolerates missing/corrupt prior files;
  • CLI --resume parsing.

Closes #33. Full suite green (patch fully covered).

Resolves the one MVP gap left in the screening workflow (#33): resume/checkpoint.

- screen(): results are now written after every molecule (incremental), so an
  interrupted screen leaves a durable partial `<out>.json`/`.csv`.
- screen(resume=True): reuse the `status="ok"` records from a prior `<out>.json`
  (via `_load_completed`), skip those molecules, and (re)run the missing/failed
  ones. A missing or corrupt prior file just runs everything.
- CLI: `thermo screen --resume`.

Closes #33
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.73%. Comparing base (5a7aa2a) to head (f0df9f7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
+ Coverage   96.68%   96.73%   +0.05%     
==========================================
  Files          24       24              
  Lines        1538     1564      +26     
==========================================
+ Hits         1487     1513      +26     
  Misses         51       51              
Flag Coverage Δ
unittests 96.73% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Address review of #33: write <out>.csv/.json via a temp file + os.replace so an
interrupted write cannot leave a truncated (unresumable) file, and treat a valid
but non-list prior JSON as nothing-to-resume rather than crashing.
@galjos
galjos merged commit 69f7bb9 into main Jul 6, 2026
3 checks passed
@galjos
galjos deleted the resumable-screening branch July 6, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add screening workflow framework

1 participant