-
Notifications
You must be signed in to change notification settings - Fork 26
docs: Add inline documentation for SDK External API and deploy via GitHub Pages #1288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
docs: Add inline documentation for SDK External API and deploy via GitHub Pages #1288
Conversation
@miraclx Should the docs deploy only |
hey @varshith257 , pls comment on the corresponding github issue for assignment and reference the issue in the PR. |
❌ The PR description is missing these required sections:
This PR is blocked until this is fixed. |
1 similar comment
❌ The PR description is missing these required sections:
This PR is blocked until this is fixed. |
yeah just that |
E2E tests reportProtocol: ethereum
Protocol: icp
Protocol: near
Protocol: stellar
|
@miraclx Once this PR is merged into the master we can get live site of deployed docs of Before that we need to make sure GitHub Pages is enabled in the repository settings with the source set to the gh-pages branch |
@varshith257 is it ready for review? |
@antonpaisov Yes |
@varshith257 requested. pls message me on discord at @antonpaisov and provide me with your preferred email address there |
/// ```rust,no_run | ||
/// use calimero_sdk::{External, AccountId}; | ||
/// | ||
/// let proposal_id = External.propose() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this syntax External.propose()
will be deprecated, it should instead be:
/// let proposal_id = External.propose() | |
/// let proposal_id = Self::external() | |
/// .propose() |
where this is contained in an #[app::logic]
method
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
cache-all-crates: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason for this directive? cache-all-crates
@@ -1,6 +1,7 @@ | |||
pub use {borsh, serde, serde_json}; | |||
|
|||
pub mod env; | |||
pub use env::ext::{AccountId, DraftProposal, External, ProposalAction, ProposalId}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not pollute the root
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./target/doc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[calimero-sdk]
Fixes
Description
This PR adds Rust doc for the
calimero_sdk crate
for the External API. It also includes a GitHub Actions workflow that builds and deploys the generated docs to GitHub Pages for easy reference.Test Plan
Ran
cargo doc -p calimero-sdk --no-deps
locally, docs generated undertarget/doc/calimero_sdk/
Verified GitHub Actions builds and deploys on master push.
Checked deployed docs are live at: https://varshith257.github.io/core/calimero_sdk/
Confirmed CSS/JS load properly and module structure appears as expected.
Documentation update
Documented external APIs in calimero-sdk