File tree Expand file tree Collapse file tree 4 files changed +9
-11
lines changed
Expand file tree Collapse file tree 4 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 2020
2121
2222prefect-deploy : setup
23- (cd src && uv run prefect deploy --prefect-file ../prefect.yaml --all)
24-
23+ uv run prefect deploy --prefect-file prefect.yaml --all
Original file line number Diff line number Diff line change @@ -21,20 +21,18 @@ pull:
2121 credentials : ' {{ prefect.blocks.github-credentials.prefect-modal }}'
2222- prefect.deployments.steps.run_shell_script :
2323 directory : ' {{ clone-step.directory }}'
24- script : |
25- pip install --upgrade 'uv>=0.5.6,<0.6'
26- /bin/sh -c "uv export --no-dev --no-editable --no-hashes --locked > requirements.txt"
27- uv pip install --system -r requirements.txt
28- - prefect.deployments.steps.set_working_directory :
29- directory : ' /{{ clone-step.directory }}/src'
24+ script : pip install uv==0.5.6
25+ - prefect.deployments.steps.run_shell_script :
26+ directory : ' {{ clone-step.directory }}'
27+ script : uv sync --no-editable --extra workflows
3028
3129# the deployments section allows you to provide configuration for deploying flows
3230deployments :
3331- name : prefect-modal-example
3432 version :
3533 tags : []
3634 description : Our first flow which runs on modal
37- entrypoint : prefect_modal/ flows/flow1.py :main
35+ entrypoint : prefect_modal. flows.flow1 :main
3836 schedules :
3937 - cron : 0 12 * * *
4038 timezone : America/New_York
Original file line number Diff line number Diff line change 1+ MY_VAR = 5
Original file line number Diff line number Diff line change 11from prefect import flow , task
2-
2+ from prefect_modal . flows . constants import MY_VAR
33
44@task ()
55def do_print (param : str ) -> None :
@@ -15,7 +15,7 @@ def run_my_flow(param: str) -> None:
1515
1616@flow (log_prints = True )
1717def main (name : str = "world" , goodbye : bool = False ):
18- print (f"Hello { name } from Prefect! 🤗" )
18+ print (f"Hello { name } from Prefect! 🤗. Your lucky number is { MY_VAR } " )
1919 run_my_flow (name )
2020 if goodbye :
2121 print (f"Goodbye { name } !" )
You can’t perform that action at this time.
0 commit comments