Skip to content

Commit 156b290

Browse files
committed
Update flows to handle new changes
1 parent 5bc4bd0 commit 156b290

File tree

2 files changed

+24
-30
lines changed

2 files changed

+24
-30
lines changed

lead-score-flow/pyproject.toml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
[tool.poetry]
1+
[project]
22
name = "lead_score_flow"
33
version = "0.1.0"
44
description = "lead_score_flow using crewAI"
5-
authors = ["Your Name <you@example.com>"]
6-
7-
[tool.poetry.dependencies]
8-
python = ">=3.10,<=3.13"
9-
crewai = { extras = ["tools"], version = ">=0.67.1,<1.0.0" }
10-
asyncio = "*"
11-
langchain-tools = "^0.1.34"
12-
crewai-tools = "^0.12.0"
13-
google-auth-oauthlib = "^1.2.1"
14-
google-api-python-client = "^2.145.0"
15-
pyvis = "^0.3.2"
16-
17-
[tool.poetry.scripts]
18-
lead_score_flow = "lead_score_flow.main:main"
19-
run_flow = "lead_score_flow.main:main"
20-
plot_flow = "lead_score_flow.main:plot"
5+
authors = [
6+
{ name = "Your Name", email = "you@example.com" },
7+
]
8+
requires-python = ">=3.10,<=3.13"
9+
dependencies = [
10+
"crewai[tools]>=0.76.2,<1.0.0",
11+
"asyncio*",
12+
"langchain-tools>=0.1.34",
13+
"crewai-tools>=0.12.0",
14+
"google-auth-oauthlib>=1.2.1",
15+
"google-api-python-client>=2.145.0",
16+
"pyvis>=0.3.2",
17+
]
2118

19+
[project.scripts]
20+
kickoff = "lead_score_flow.main:kickoff"
21+
plot = "lead_score_flow.main:plot"
2222

2323
[build-system]
24-
requires = ["poetry-core"]
25-
build-backend = "poetry.core.masonry.api"
24+
requires = [
25+
"hatchling",
26+
]
27+
build-backend = "hatchling.build"

lead-score-flow/src/lead_score_flow/main.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -186,29 +186,21 @@ async def write_email(candidate):
186186
print(message)
187187

188188

189-
async def run_flow():
189+
def kickoff():
190190
"""
191191
Run the flow.
192192
"""
193193
lead_score_flow = LeadScoreFlow()
194194
lead_score_flow.kickoff()
195195

196196

197-
async def plot_flow():
197+
def plot():
198198
"""
199199
Plot the flow.
200200
"""
201201
lead_score_flow = LeadScoreFlow()
202202
lead_score_flow.plot()
203203

204204

205-
def main():
206-
asyncio.run(run_flow())
207-
208-
209-
def plot():
210-
asyncio.run(plot_flow())
211-
212-
213205
if __name__ == "__main__":
214-
main()
206+
kickoff()

0 commit comments

Comments
 (0)