8000 docs: Add inline documentation for SDK External API and deploy via GitHub Pages by varshith257 · Pull Request #1288 · calimero-network/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

varshith257
Copy link
@varshith257 varshith257 commented May 28, 2025

[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 under target/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.

image
image

Documentation update

Documented external APIs in calimero-sdk

@varshith257 varshith257 changed the title test: Add inline documentation for External proposal API and deploy v… docs: Add inline documentation for SDK External API and deploy via GitHub Pages May 28, 2025
@varshith257
Copy link
Author
varshith257 commented May 29, 2025

@miraclx Should the docs deploy only calimero_sdk or the entire workspace?

@antonpaisov
Copy link
Contributor
antonpaisov commented May 29, 2025

hey @varshith257 , pls comment on the corresponding github issue for assignment and reference the issue in the PR.
and message me on discord @antonpaisov

Copy link

❌ The PR description is missing these required sections:

  • ## Test Plan

This PR is blocked until this is fixed.

1 similar comment
Copy link

❌ The PR description is missing these required sections:

  • ## Test Plan

This PR is blocked until this is fixed.

@miraclx
Copy link
Member
miraclx commented May 29, 2025

Should the docs deploy only calimero_sdk or the entire workspace?

yeah just that

Copy link

E2E tests report

Protocol: ethereum

Application/Step 0. app install (AllMembers) 1. ctx create 2. ctx invite-join 3. wait (Consensus) 4. call (create_new_proposal, Inviter) 5. get proposals 6. call (send_proposal_messages, Inviter) 7. wait (Broadcast) 8. call (get_proposal_messages, Invitees) 9. call (approve_proposal, Invitees) 10. verify external state
demo-blockchain-integrations
Application/Step 0. app install (AllMembers) 1. ctx create 2. alias create 3. call (set, Inviter) 4. call (get, Inviter) 5. ctx invite-join 6. wait (Consensus) 7. call (get, AllMembers) 8. call (set, Inviter) 9. wait (Broadcast) 10. call (get, AllMembers)
kv-store-test

Protocol: icp

Application/Step 0. app install (AllMembers) 1. ctx create 2. ctx invite-join 3. wait (Consensus) 4. call (create_new_proposal, Inviter) 5. get proposals 6. call (send_proposal_messages, Inviter) 7. wait (Broadcast) 8. call (get_proposal_messages, Invitees) 9. call (approve_proposal, Invitees) 10. verify external state
demo-blockchain-integrations
Application/Step 0. app install (AllMembers) 1. ctx create 2. alias create 3. call (set, Inviter) 4. call (get, Inviter) 5. ctx invite-join 6. wait (Consensus) 7. call (get, AllMembers) 8. call (set, Inviter) 9. wait (Broadcast) 10. call (get, AllMembers)
kv-store-test

Protocol: near

Application/Step 0. app install (AllMembers) 1. ctx create 2. ctx invite-join 3. wait (Consensus) 4. call (create_new_proposal, Inviter) 5. get proposals 6. call (send_proposal_messages, Inviter) 7. wait (Broadcast) 8. call (get_proposal_messages, Invitees) 9. call (approve_proposal, Invitees) 10. verify external state
demo-blockchain-integrations
Application/Step 0. app install (AllMembers) 1. ctx create 2. alias create 3. call (set, Inviter) 4. call (get, Inviter) 5. ctx invite-join 6. wait (Consensus) 7. call (get, AllMembers) 8. call (set, Inviter) 9. wait (Broadcast) 10. call (get, AllMembers)
kv-store-test

Protocol: stellar

Application/Step 0. app install (AllMembers) 1. ctx create 2. ctx invite-join 3. wait (Consensus) 4. call (create_new_proposal, Inviter) 5. get proposals 6. call (approve_proposal, Invitees) 7. verify external state 8. call (create_new_proposal, Inviter) 9. get proposals 10. call (send_proposal_messages, Inviter) 11. wait (Broadcast) 12. call (get_proposal_messages, Invitees)
demo-blockchain-integrations
Application/Step 0. app install (AllMembers) 1. ctx create 2. alias create 3. call (set, Inviter) 4. call (get, Inviter) 5. ctx invite-join 6. wait (Consensus) 7. call (get, AllMembers) 8. call (set, Inviter) 9. wait (Broadcast) 10. call (get, AllMembers)
kv-store-test

@varshith257
Copy link
Author
varshith257 commented May 29, 2025

@miraclx Once this PR is merged into the master we can get live site of deployed docs of calimero-sdk at https://calimero-network.github.io/core/calimero_sdk/

Before that we need to make sure GitHub Pages is enabled in the repository settings with the source set to the gh-pages branch

@antonpaisov
Copy link
Contributor

@varshith257 is it ready for review?

@varshith257
Copy link
Author

@antonpaisov Yes

@antonpaisov antonpaisov requested review from frdomovic and miraclx May 30, 2025 13:44
@antonpaisov
Copy link
Contributor
antonpaisov commented May 30, 2025

@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()
Copy link
Member

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:

Suggested change
/// 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
Copy link
Member

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};
Copy link
Member

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

Comment on lines +33 to +37
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6BDF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0