Skip to content

Commit 342cd1a

Browse files
committed
Flyte-ify the code
1 parent bdd4c20 commit 342cd1a

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# {{ cookiecutter.project_name }}
22

3-
A simple Union project.
3+
A simple Flyte project.
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
"""Hello World"""
22

3-
import union
3+
import flytekit as fl
44

5-
image_spec = union.ImageSpec(
6-
7-
# Build the image using Union's built-in cloud builder (not locally on your machine)
8-
builder="union",
5+
image_spec = fl.ImageSpec(
96

107
# The name of the image. This image will be used byt he say_hello task
118
name="say-hello-image",
@@ -14,11 +11,11 @@
1411
requirements="uv.lock",
1512
)
1613

17-
@union.task(container_image=image_spec)
14+
@fl.task(container_image=image_spec)
1815
def say_hello(name: str) -> str:
1916
return f"Hello, {name}!"
2017

21-
@union.workflow
18+
@fl.workflow
2219
def hello_world_wf(name: str = "world") -> str:
2320
greeting = say_hello(name=name)
2421
return greeting
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
2-
name = "union-simple"
2+
name = "flyte-simple"
33
version = "0.1.0"
4-
description = "A simple Union project"
4+
description = "A simple Flyte project"
55
readme = "README.md"
66
requires-python = ">=3.9,<3.13"
7-
dependencies = ["union"]
7+
dependencies = ["flytekit"]

0 commit comments

Comments
 (0)