Skip to content

Improve frame-omni-bencher docs #11674

Open
Kanasjnr wants to merge 7 commits intoparitytech:masterfrom
Kanasjnr:improve-frame-omni-bencher-docs
Open

Improve frame-omni-bencher docs #11674
Kanasjnr wants to merge 7 commits intoparitytech:masterfrom
Kanasjnr:improve-frame-omni-bencher-docs

Conversation

@Kanasjnr
Copy link
Copy Markdown
Contributor

@Kanasjnr Kanasjnr commented Apr 7, 2026

Description

This PR standardizes the frame-omni-bencher documentation and build pipeline, aligning it with Polkadot-SDK standards (similar to staging-chain-spec-builder). It automates README.md generation using docify, ensuring that all usage examples are backed by verified integration tests.

Integration

Downstream projects using frame-omni-bencher can now utilize the generate-readme feature to keep their documentation in sync with code changes via cargo build -p frame-omni-bencher --features generate-readme.

The substrate-test-runtime now includes a no-metadata-hash-check feature, which can be opted into by tools that do not yet support the latest CheckMetadataHash and WeightReclaim signed extensions.

Closes #6392

Review Notes

Key implementation details:

  • frame-omni-bencher:
    • Integrated docify::compile_markdown! macro gated by a new generate-readme feature.
    • Refactored tests/benchmark_works.rs to be resilient to missing WASM binaries; functional execution is now conditionally skipped if a real WASM binary isn't available, while still allowing docify to capture usage examples.
  • substrate-test-runtime:
    • Introduced the no-metadata-hash-check feature to feature-gate the recently added CheckMetadataHash and WeightReclaim extensions in the TxExtension tuple. This was necessary to resolve Codec error mismatches with the benchmarking CLI during apply_extrinsic.
  • frame-benchmarking-cli:
    • Applied surgical portability fixes to resolve macOS build errors related to optional dependency gating.

Example of the new documentation standard in lib.rs:

+#![doc = include_str!("../README.md")]
+#[cfg(feature = "generate-readme")]
+docify::compile_markdown!("README.docify.md", "README.md");

@Kanasjnr
Copy link
Copy Markdown
Contributor Author

Kanasjnr commented Apr 7, 2026

/cmd prdoc --audience node_dev --bump patch

@Kanasjnr
Copy link
Copy Markdown
Contributor Author

Kanasjnr commented Apr 7, 2026

/cmd label T1-FRAME I1-refactor R0-no-crate-publish-required

@paritytech-cmd-bot-polkadot-sdk paritytech-cmd-bot-polkadot-sdk bot added I4-refactor Code needs refactoring. R0-no-crate-publish-required The change does not require any crates to be re-published. T1-FRAME This PR/Issue is related to core FRAME, the framework. labels Apr 7, 2026
@Kanasjnr
Copy link
Copy Markdown
Contributor Author

Kanasjnr commented Apr 7, 2026

@iulianbarbu the pr is ready for review

@Kanasjnr Kanasjnr force-pushed the improve-frame-omni-bencher-docs branch from 4fd8d77 to 9621aa6 Compare April 7, 2026 15:06
@Kanasjnr Kanasjnr requested a review from a team as a code owner April 8, 2026 01:36
@Kanasjnr Kanasjnr force-pushed the improve-frame-omni-bencher-docs branch from cce7b14 to f513e26 Compare April 8, 2026 09:20
@Kanasjnr Kanasjnr requested a review from a team as a code owner April 8, 2026 09:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Review required! Latest push from author must always be reviewed

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Review required! Latest push from author must always be reviewed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I4-refactor Code needs refactoring. R0-no-crate-publish-required The change does not require any crates to be re-published. T1-FRAME This PR/Issue is related to core FRAME, the framework.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve frame-omni-bencher docs

1 participant