Skip to content

Split _build_compute_context into focused per-path helpers#233

Merged
timkpaine merged 1 commit into
nk/auto_deps_auto_callable_modelfrom
tkp/flow-model-split-compute-context
Jun 9, 2026
Merged

Split _build_compute_context into focused per-path helpers#233
timkpaine merged 1 commit into
nk/auto_deps_auto_callable_modelfrom
tkp/flow-model-split-compute-context

Conversation

@timkpaine

Copy link
Copy Markdown
Member

_build_compute_context mixed argument validation, the explicit-context path, plain-CallableModel defaults, and generated-model handling across one long function with several exit branches. Extract the three paths into _compute_context_from_explicit, _compute_context_for_plain_model, and _compute_context_for_generated_model, leaving _build_compute_context as a thin dispatcher.

Behavior-preserving refactor; no functional change. Verified against the full flow_model, flow_context, hydra, and evaluator suites.

`_build_compute_context` mixed argument validation, the explicit-context path,
plain-CallableModel defaults, and generated-model handling across one long
function with several exit branches. Extract the three paths into
`_compute_context_from_explicit`, `_compute_context_for_plain_model`, and
`_compute_context_for_generated_model`, leaving `_build_compute_context` as a
thin dispatcher.

Behavior-preserving refactor; no functional change. Verified against the full
flow_model, flow_context, hydra, and evaluator suites.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Test Results

    1 files  ± 0      1 suites  ±0   2m 56s ⏱️ -1s
1 116 tests  - 33  1 114 ✅  - 33  2 💤 ±0  0 ❌ ±0 
1 122 runs   - 33  1 120 ✅  - 33  2 💤 ±0  0 ❌ ±0 

Results for commit cfaab90. ± Comparison against base commit d35c55d.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.83%. Comparing base (d35c55d) to head (cfaab90).
⚠️ Report is 16 commits behind head on nk/auto_deps_auto_callable_model.

Files with missing lines Patch % Lines
ccflow/flow_model.py 90.90% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                         Coverage Diff                          @@
##           nk/auto_deps_auto_callable_model     #233      +/-   ##
====================================================================
- Coverage                             93.09%   92.83%   -0.26%     
====================================================================
  Files                                   158      152       -6     
  Lines                                 17895    17360     -535     
  Branches                               1221     1130      -91     
====================================================================
- Hits                                  16660    16117     -543     
- Misses                                 1014     1019       +5     
- Partials                                221      224       +3     

☔ 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.

@timkpaine timkpaine merged commit 91d008b into nk/auto_deps_auto_callable_model Jun 9, 2026
18 of 20 checks passed
@timkpaine timkpaine deleted the tkp/flow-model-split-compute-context branch June 9, 2026 22:38
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.

1 participant