π§ Method Development Workflowο
This guide explains the typical steps to develop and publish a method in the Cloud Computing Platform (CCP).
If youβre new to the platform, it will help you understand how a method works behind the scenes, what CCP expects, and how to go from your algorithm to a fully executable component.
π§ What is a Method?ο
In CCP, a method is not just code β it is a full description of:
What the method does
What inputs it requires
How to run it inside a container
Where to collect its outputs
Which environment it needs to execute
Your method becomes an object that users can execute via a form or programmatically through APIs.
1. π Prepare Your Codeο
Your algorithm must live in a public repository or archive. You should:
Separate code from data
Ensure itβs executable via shell (e.g.,
python script.py)Include a dependency file (e.g.,
requirements.txtfor Python)
CCP will clone your repo and run your code inside a Docker container.
2. π§© Define Inputsο
Identify what your script needs as configuration or input data.
Each of these will be represented as a form field when users run your method:
| Type | Examples |
|---|---|
| Files | Upload or workspace file |
| URLs | Links to remote resources |
| Parameters | Text, numbers, booleans, dates |
| Lists | Dropdowns, checklists (single or multi) |
| Credentials | API keys, tokens |
| Docker image | Required runtime (ccpimage) |
Each field is declared in your method.json.
3. π³ Choose the Runtime (ccpimage)ο
Set the ccpimage input to define the Docker image that your method runs inside.
You can use:
π§
bashβ basic Unix environmentπ
python:3.9,r-base, etc.π³ Custom Docker image (see Consolidation)
4. βοΈ Deploy and Execute Scriptsο
CCP separates two phases:
Deploy script: runs before execution. Use it to:
Clone your repo
Install dependencies
Download data
Execute script: runs your algorithm with input parameters
Use {{placeholders}} to substitute field values dynamically.
Example:
python repo/myscript.py --input {{file}} --output /ccp_data/result.json
5. π¦ Write to /ccp_dataο
To be collected by CCP, your output files must be saved in /ccp_data/.
CCP will package this directory as output.zip, including:
Result files
Execution logs (
stdout,stderr)Metadata (
method.json,jobStatus.json,provo.xml, β¦)
π‘ Common Pitfallsο
| β Don't Do This | β Instead |
|---|---|
| Bundle data into the script | Expect files from the execution form |
| Hardcode input paths | Use script arguments and {{param}} |
Forget to write outputs to /ccp_data |
Always direct your output files there |
| Require manual install of dependencies | Use a requirements.txt in your repo |
β Ready to Continue?ο
Now that you understand the structure, you can: