Skip to content

Commit

Permalink
rename template directory
Browse files Browse the repository at this point in the history
Signed-off-by: nikki everett <nikki@union.ai>
  • Loading branch information
nikki everett committed Dec 13, 2023
1 parent f34edad commit beb2fe2
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 16 deletions.
3 changes: 0 additions & 3 deletions basic-example-dockerfile/cookiecutter.json

This file was deleted.

3 changes: 3 additions & 0 deletions basic-template-dockerfile/cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"project_name": "basic_example_dockerfile"
}
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
"""A basic Flyte example."""
"""A basic Flyte project template that uses a Dockerfile"""

import typing
from flytekit import task, workflow


@task
@task()
def say_hello(name: str) -> str:
"""A Flyte task to say "hello".
"""A simple Flyte task to say "Hello".
The @task decorator allows Flyte to use this function as a Flyte task, which
is executed as an isolated, containerized unit of compute.
The @task decorator allows Flyte to use this function as a Flyte task,
which is executed as an isolated, containerized unit of compute.
"""
return f"hello {name}!"
return f"Hello, {name}!"


@task
@task()
def greeting_length(greeting: str) -> int:
"""A task the counts the length of a greeting."""
return len(greeting)


@workflow
def wf(name: str = "union") -> typing.Tuple[str, int]:
def wf(name: str = "world") -> typing.Tuple[str, int]:
"""Declare workflow called `wf`.
The @workflow decorator defines an execution graph that is composed of tasks
and potentially sub-workflows. In this simple example, the workflow is
composed of just one task.
The @workflow decorator defines an execution graph that is composed of
tasks and potentially sub-workflows. In this simple example, the workflow
is composed of just one task.
There are a few important things to note about workflows:
- Workflows are a domain-specific language (DSL) for creating execution
Expand All @@ -40,6 +41,6 @@ def wf(name: str = "union") -> typing.Tuple[str, int]:


if __name__ == "__main__":
# Execute the workflow, simply by invoking it like a function and passing in
# Execute the workflow by invoking it like a function and passing in
# the necessary parameters
print(f"Running wf() { wf(name='passengers') }")
print(f"Running wf() {wf(name='passengers')}")

0 comments on commit beb2fe2

Please sign in to comment.