Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
909 changes: 909 additions & 0 deletions public/example-pipelines/Intro-Data Flow.pipeline.component.yaml

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
140 changes: 140 additions & 0 deletions public/example-pipelines/Intro-Hello World.pipeline.component.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: Hello World
description: A simple pipeline that demonstrates the hello world component.
inputs:
- name: name
type: String
description: The name to greet.
default: ''
annotations:
editor.position: '{"x":140,"y":0}'
value: ''
optional: false
outputs:
- name: greeting
type: Text
description: The generated greeting message.
annotations:
editor.position: '{"x": 850, "y": 0}'
implementation:
graph:
tasks:
Greet:
componentRef:
name: Hello world
digest: 8cf1bcc31ce9cd9be6982a7ba95cf233f23efcb7769842b6b03e917ad5dfdd0a
spec:
name: Hello world
description: A simple hello world component that generates a greeting.
metadata:
annotations:
git_local_sha: 674a9b6ea9fbea311b91860128047d8644a2086e
git_local_branch: js-experiment_with_tangle_deploy_mcp-1209
git_relative_dir: oasis/generated/jordan_stern
cloud_pipelines.net: 'true'
component_yaml_path: hello_world.component.yaml
python_original_code: |
from cloud_pipelines import components


def hello_world(
name: str,
greeting_output: components.OutputPath("Text"),
greeting_prefix: str = "Hello",
):
"""A simple hello world component that generates a greeting.

Args:
name: The name to greet.
greeting_output: Output file containing the greeting message.
greeting_prefix: Prefix for the greeting (default: Hello).
"""
greeting = f"{greeting_prefix}, {name}! Welcome to Tangle."
print(greeting)
with open(greeting_output, "w") as f:
f.write(greeting)
python_original_code_path: ../../modules/jordan_stern/hello_world.py
components new regenerate python-function-component: 'true'
inputs:
- name: name
type: String
description: The name to greet.
- name: greeting_prefix
type: String
description: 'Prefix for the greeting (default: Hello).'
default: Hello
optional: true
outputs:
- name: greeting_output
type: Text
description: Output file containing the greeting message.
implementation:
container:
image: python:3.12
command:
- sh
- '-ec'
- |
program_path=$(mktemp)
printf "%s" "$0" > "$program_path"
python3 -u "$program_path" "$@"
- |
def _make_parent_dirs_and_return_path(file_path: str):
import os

os.makedirs(os.path.dirname(file_path), exist_ok=True)
return file_path

def hello_world(
name,
greeting_output,
greeting_prefix = "Hello",
):
"""A simple hello world component that generates a greeting.

Args:
name: The name to greet.
greeting_output: Output file containing the greeting message.
greeting_prefix: Prefix for the greeting (default: Hello).
"""
greeting = f"{greeting_prefix}, {name}! Welcome to Tangle."
print(greeting)
with open(greeting_output, "w") as f:
f.write(greeting)

import argparse
_parser = argparse.ArgumentParser(prog='Hello world', description='A simple hello world component that generates a greeting.')
_parser.add_argument("--name", dest="name", type=str, required=True, default=argparse.SUPPRESS)
_parser.add_argument("--greeting-prefix", dest="greeting_prefix", type=str, required=False, default=argparse.SUPPRESS)
_parser.add_argument("--greeting-output", dest="greeting_output", type=_make_parent_dirs_and_return_path, required=True, default=argparse.SUPPRESS)
_parsed_args = vars(_parser.parse_args())

_outputs = hello_world(**_parsed_args)
args:
- '--name'
- inputValue: name
- if:
cond:
isPresent: greeting_prefix
then:
- '--greeting-prefix'
- inputValue: greeting_prefix
- '--greeting-output'
- outputPath: greeting_output
arguments:
name:
graphInput:
inputName: name
annotations:
editor.position: '{"x":430,"y":0}'
editor.collapsed: 'true'
outputValues:
greeting:
taskOutput:
outputName: greeting_output
taskId: Greet
metadata:
annotations:
editor.flow-direction: left-to-right
cloned_from_run_id: 019c29f9be924481a1f9
notes: Pipeline Notes - Test
tags: health check
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading