πŸ”§ 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.txt for 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: