Skip to content

Fix metadata cacher examples and test their save/load workflows - #145

Closed
qorud02 wants to merge 1 commit into
ORNL:mainfrom
qorud02:docs-fix-metadata-cacher-examples
Closed

qorud02 wants to merge 1 commit into
ORNL:mainfrom
qorud02:docs-fix-metadata-cacher-examples

Conversation

@qorud02

@qorud02 qorud02 commented Oct 1, 2026

Copy link
Copy Markdown

Both metadata cacher examples currently fail when copied and executed: the automatic-stage example calls geet_path() during saving, and both examples save the_best_number but read best_number during loading.

Use the existing get_path() method and the same metadata key in save/load. Add tests that extract and execute the actual documentation code blocks rather than maintaining separate copies. One test runs the real stage decorator through saving and a cache hit; the other checks explicit inline metadata saving/loading.

Before the documentation correction, the two tests fail with AttributeError and KeyError. After it, both pass. Black, isort, flake8, and git diff --check passed. The repository-wide suite and full documentation site were not run for this change.

This contribution was developed with AI assistance and verified against the real 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.

2 participants