Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
33 lines (28 loc) · 1.05 KB

File metadata and controls

33 lines (28 loc) · 1.05 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from pocketflow import Flow
# Import all node classes from nodes.py
from nodes import (
FetchRepo,
IdentifyAbstractions,
AnalyzeRelationships,
OrderChapters,
WriteChapters,
CombineTutorial
)
def create_tutorial_flow():
"""Creates and returns the codebase tutorial generation flow."""
# Instantiate nodes
fetch_repo = FetchRepo()
identify_abstractions = IdentifyAbstractions(max_retries=5, wait=20)
analyze_relationships = AnalyzeRelationships(max_retries=5, wait=20)
order_chapters = OrderChapters(max_retries=5, wait=20)
write_chapters = WriteChapters(max_retries=5, wait=20) # This is a BatchNode
combine_tutorial = CombineTutorial()
# Connect nodes in sequence based on the design
fetch_repo >> identify_abstractions
identify_abstractions >> analyze_relationships
analyze_relationships >> order_chapters
order_chapters >> write_chapters
write_chapters >> combine_tutorial
# Create the flow starting with FetchRepo
tutorial_flow = Flow(start=fetch_repo)
return tutorial_flow
Morty Proxy This is a proxified and sanitized view of the page, visit original site.