simplify flow

This commit is contained in:
Brandon Hancock
2024-10-21 10:51:59 -04:00
parent b98256e434
commit 698cac066f
2 changed files with 5 additions and 20 deletions

View File

@@ -37,29 +37,14 @@ class PoemFlow(Flow[PoemState]):
f.write(self.state.poem)
print(f"State after save_poem: {self.state}")
async def run_flow():
"""
Run the flow.
"""
async def kickoff():
poem_flow = PoemFlow()
await poem_flow.kickoff()
async def plot_flow():
"""
Plot the flow.
"""
def plot():
poem_flow = PoemFlow()
poem_flow.plot()
def main():
asyncio.run(run_flow())
def plot():
asyncio.run(plot_flow())
if __name__ == "__main__":
main()
asyncio.run(kickoff())

View File

@@ -10,8 +10,8 @@ dependencies = [
]
[project.scripts]
{{folder_name}} = "{{folder_name}}.main:main"
run_flow = "{{folder_name}}.main:main"
{{folder_name}} = "{{folder_name}}.main:kickoff"
run_flow = "{{folder_name}}.main:kickoff"
plot_flow = "{{folder_name}}.main:plot"
[build-system]