ci: only run smoke-test-examples on manual workflow_dispatch - #94
Conversation
The example scripts are slow stochastic Monte Carlo simulations whose output occasionally exceeds its reference-value tolerance by pure chance (e.g. weber_1977_effectiveness_table failed CI on 6e08e9e with a 4.206 deviation against atol 4.0, then passed on fc3d1eb with identical example code). Running them on every push/PR therefore blocks merges randomly with no code change involved. Gate the job on workflow_dispatch so it stays available in the Actions UI for one-off verification of joblib/parallelism changes but is skipped on push and PR. Also widen the per-script tolerances (e.g. 4.0 -> 5.0 for weber_1977_effectiveness_table) to reduce the chance of such flakes while still catching real regressions. Co-authored-by: opencode <opencode@anomalyco.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe example smoke-test job now runs only on manual workflow dispatches. Example result comparisons use higher absolute tolerances for Merrill and Weber outputs. ChangesExample smoke-test adjustments
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Summary
This PR brings about increased efficiency in the testing process by refining the error-detecting mechanism and granting higher resilience towards variability in the results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #94 +/- ##
=======================================
Coverage 96.37% 96.37%
=======================================
Files 17 17
Lines 496 496
=======================================
Hits 478 478
Misses 18 18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Background
smoke-test-examplesruns the full stochastic example scripts (pytest tests/test_examples.py -m slow) to verify reference values against the published tables. It is useful for one-off checks when changing joblib/parallelism code.Problem
The Monte Carlo output occasionally exceeds its tolerance by pure chance. On
6e08e9e(merge of #87) the job failed onweber_1977_effectiveness_table.pywith a 4.206 deviation againstatol=4.0; the identical example code then passed onfc3d1eb. Running it on every push/PR blocks merges randomly with no code change involved.Visible symptoms
CI run
30938429399showssmoke-test-examplesfailing withAssertionError: Max absolute difference among violations: 4.20580657while every other job passes.What this PR changes
smoke-test-examplesjob ongithub.event_name == 'workflow_dispatch'. The workflow already declaresworkflow_dispatchinon:, so the job stays available from the Actions tab for manual runs (skipped on push/PR). Slow tests remain excluded from normalpytestruns via the existing-m 'not slow'addopts.weber_1977_effectiveness_table4.0 -> 5.0,merrill_1984_table_1_fig_13.5 -> 4.0, others 3.0 -> 3.5,weber_1977_table_40.2 -> 0.3) to cut flake probability while still catching real regressions.Tests
Tolerance values are read directly from
TOLERANCES; no test logic changed. The gating is a CI-only change verified by parsing the workflow.Summary by CodeRabbit