Skip to content

Document partial stage cache reuse with an executable recipe - #144

Closed
qorud02 wants to merge 1 commit into
ORNL:mainfrom
qorud02:docs-partial-stage-cache-example
Closed

qorud02 wants to merge 1 commit into
ORNL:mainfrom
qorud02:docs-partial-stage-cache-example

Conversation

@qorud02

@qorud02 qorud02 commented Oct 1, 2026

Copy link
Copy Markdown

Fixes #139.

Add a cookbook example that uses the existing record.stage_cachers API to reuse one independent cached output when another output is missing. The recipe first recommends separate stages when that is simpler and explains that the reused value must remain valid for the current record.

Keep the executable example in examples/partial_stage_cache.py and include it directly in the documentation. Tests use the real stage decorator and file cachers: delete the second output, verify the first computation is reused, then check the case where both outputs are missing and a subsequent complete cache hit.

Validation on Windows/Python 3.14:

  • Both new recipe cases pass.
  • Black, isort, flake8, and git diff --check pass for the changed Python files.
  • The new recipe section builds with Sphinx -W; this is a section build, not the full documentation site.
  • The repository-wide suite was not run for this documentation change.

This contribution was developed with AI assistance and checked by executing the documented workflow against the actual stage and cache implementations.

@WarmCyan WarmCyan closed this Oct 1, 2026
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.

Include example of partial stage reloads in docs

2 participants