Skip to content

Rename cli/quick-guide to deploy-app. Add Python example#411

Merged
k3dz0r merged 2 commits intodevelopfrom
2026-02-05
Feb 5, 2026
Merged

Rename cli/quick-guide to deploy-app. Add Python example#411
k3dz0r merged 2 commits intodevelopfrom
2026-02-05

Conversation

@k3dz0r
Copy link
Collaborator

@k3dz0r k3dz0r commented Feb 5, 2026

Summary by CodeRabbit

  • Documentation
    • Added a step-by-step guide for deploying Python apps using the CLI, including packaging, deployment, and result retrieval.
    • Updated CLI guides with clearer paths, examples, JSON configuration samples, and improved internal links and redirects.
    • Clarified data path semantics and result download conditions.
    • Refined platform certification/attestation wording for clarity.
    • Added an example Python script demonstrating a cryptocurrency price conversion workflow.

@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Walkthrough

Adds a new end-to-end deployment guide for running a Python script on Super Protocol with SPCTL, introduces a sample usd_to_crypto.py script, updates several CLI guides and links, augments TGWUI/ComfyUI configuration examples, and refines certification docs wording and workload-info fields.

Changes

Cohort / File(s) Summary
New Deployment Guide & Example
docs/cli/Guides/deploy-app/deploy-app-example.md, static/files/usd_to_crypto.py
Adds a step‑by‑step deploy-app example documenting Docker build, artifact packaging, SPCTL deployment, CVM input/output paths, and result retrieval; introduces usd_to_crypto.py that reads input.txt, queries CoinGecko, and writes result.txt.
Deploy Guide Metadata & Redirects
docs/cli/Guides/deploy-app/index.md, docusaurus.config.js
Renames/relocates deploy guide metadata and slug, clarifies CVM input/output semantics and download conditions, and adds a redirect from the old quick-guide path to the new deploy-app path.
UI Engine Configs & Deployment Steps
docs/cli/Guides/tgwui.md
Adds TGWUI and ComfyUI JSON configuration examples, reorganizes deployment steps into UI-specific tabs, and adjusts wording and example commands.
Internal Link Fixes & Guide Index
docs/cli/Guides/unsloth.md, docs/cli/Guides/vllm.md, docs/guides/index.md
Converts external absolute links to internal relative paths for SPCTL/prerequisites and confidential collaboration; updates guide index to point to the new deploy-app page.
Certification Docs Clarifications
docs/fundamentals/certification.md
Minor wording edits for SGX attestation and Trusted Loader descriptions; extends Workload Info documentation with additional fields (Size, optional signature key hash, optional hash of input arguments).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SPCTL
    participant CVM as "CVM (container)"
    participant CoinGecko as "CoinGecko API"

    User->>SPCTL: build & upload artifacts (Docker image, archive)
    SPCTL->>CVM: create order & deploy container (entrypoint runs)
    CVM->>CVM: entrypoint launches `usd_to_crypto.py`
    CVM->>CVM: read `/sp/inputs/input.txt`
    CVM->>CoinGecko: HTTP request for BTC/ETH prices
    CoinGecko-->>CVM: JSON price response
    CVM->>CVM: compute amounts, write `/sp/output/result.txt`
    CVM-->>SPCTL: package `/sp/output` as output archive
    User->>SPCTL: download output archive (retrieve `result.txt`)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rabbit hopped through docs and code with glee,
Packaged a script and a deploy-how-to tree,
It reads an input, asks prices of coin,
Writes results to output—oh what joy to join!
Follow the trail, and the rabbit winks "deploy!" 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the two main changes: renaming the quick-guide to deploy-app and adding a Python example for deployment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2026-02-05

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/cli/Guides/tgwui.md (2)

108-177: ⚠️ Potential issue | 🟡 Minor

Both TabItems have default attribute.

In the Tabs component, both <TabItem value="tgwui" ...> on line 109 and <TabItem value="comfyui" ...> on line 154 have default set. Only one TabItem should have default to indicate which tab is shown initially. Typically the first one should be the default.

Proposed fix
-    <TabItem value="comfyui" label="ComfyUI" default>
+    <TabItem value="comfyui" label="ComfyUI">

190-211: ⚠️ Potential issue | 🟡 Minor

Remove duplicate default attribute from second TabItem.

Similar to the configuration section above, both TabItems have the default attribute. Only one should be marked as default.

Proposed fix
-    <TabItem value="comfyui" label="ComfyUI" default>
+    <TabItem value="comfyui" label="ComfyUI">
🤖 Fix all issues with AI agents
In `@docs/cli/Guides/deploy-app/deploy-app-example.md`:
- Line 39: Fix the typo in the documentation line that reads "Create an new file
named `entrypoint.sh`" by changing "an new" to "a new" so the sentence reads
"Create a new file named `entrypoint.sh`"; update the string in
deploy-app-example.md (the sentence containing `entrypoint.sh`) accordingly.
- Line 69: Replace the typo in the sentence "Create an new file named
`Dockerfile`..." by changing "an new" to "a new" so the line reads "Create a new
file named `Dockerfile`..."; update the corresponding text in
deploy-app-example.md where that sentence appears.

In `@docs/cli/Guides/deploy-app/index.md`:
- Line 35: Update the broken relative link string
'/cli/guides/deploy-app/example' in the document (the line containing "Check the
[example](/cli/guides/deploy-app/example) at the end of this guide.") to use the
correct slug '/guides/deploy-app/example' so the example link resolves; replace
the incorrect '/cli/...' path with '/guides/deploy-app/example' wherever that
link appears.
🧹 Nitpick comments (3)
static/files/usd_to_crypto.py (3)

1-2: Remove unused import.

The sys module is imported but never used in the script.

Proposed fix
 import requests
-import sys

15-18: Use exception chaining for proper traceback preservation.

When re-raising an exception within an except block, use raise ... from err to preserve the original traceback context.

Proposed fix
         try:
             usd_amount = float(content)
         except ValueError:
-            raise ValueError("Input is not a valid number")
+            raise ValueError("Input is not a valid number") from None

26-32: Add defensive checks for API response structure.

The code assumes the API response contains bitcoin.usd and ethereum.usd keys. If the API response structure changes or returns unexpected data, this will raise a KeyError. Consider adding validation or using .get() with appropriate fallback handling.

Additionally, while unlikely, a price of 0 from the API would cause a ZeroDivisionError on lines 31-32.

Proposed fix with defensive checks
         data = response.json()
-        btc_price = data["bitcoin"]["usd"]
-        eth_price = data["ethereum"]["usd"]
+        
+        if "bitcoin" not in data or "usd" not in data.get("bitcoin", {}):
+            raise RuntimeError("API response missing bitcoin price data")
+        if "ethereum" not in data or "usd" not in data.get("ethereum", {}):
+            raise RuntimeError("API response missing ethereum price data")
+        
+        btc_price = data["bitcoin"]["usd"]
+        eth_price = data["ethereum"]["usd"]
+        
+        if btc_price <= 0 or eth_price <= 0:
+            raise RuntimeError("Invalid price data received from API")

         # Calculate how much BTC and ETH can be bought
         btc_amount = usd_amount / btc_price
         eth_amount = usd_amount / eth_price

:::

You can find several Dockerfile examples in the [Super-Protocol/solutions](https://github.com/Super-Protocol/solutions) GitHub repository.
Check the [example](/cli/guides/deploy-app/example) at the end of this guide.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find the deploy-app example doc and display its frontmatter (id/slug).
fd -a 'deploy-app-example\.md' docs/cli/Guides/deploy-app -x rg -n --context 3 '^(id|slug):'

Repository: Super-Protocol/docs

Length of output: 197


Fix the broken example link path.
The link uses /cli/guides/deploy-app/example, but the file's slug is /guides/deploy-app/example. Remove the /cli prefix to match the correct path.

🤖 Prompt for AI Agents
In `@docs/cli/Guides/deploy-app/index.md` at line 35, Update the broken relative
link string '/cli/guides/deploy-app/example' in the document (the line
containing "Check the [example](/cli/guides/deploy-app/example) at the end of
this guide.") to use the correct slug '/guides/deploy-app/example' so the
example link resolves; replace the incorrect '/cli/...' path with
'/guides/deploy-app/example' wherever that link appears.

@k3dz0r k3dz0r merged commit 86e9396 into develop Feb 5, 2026
5 checks passed
@k3dz0r k3dz0r deleted the 2026-02-05 branch February 5, 2026 16:18
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.

1 participant