Creates and returns the codebase tutorial generation flow.
()
| 10 | ) |
| 11 | |
| 12 | def create_tutorial_flow(): |
| 13 | """Creates and returns the codebase tutorial generation flow.""" |
| 14 | |
| 15 | # Instantiate nodes |
| 16 | fetch_repo = FetchRepo() |
| 17 | identify_abstractions = IdentifyAbstractions(max_retries=5, wait=20) |
| 18 | analyze_relationships = AnalyzeRelationships(max_retries=5, wait=20) |
| 19 | order_chapters = OrderChapters(max_retries=5, wait=20) |
| 20 | write_chapters = WriteChapters(max_retries=5, wait=20) # This is a BatchNode |
| 21 | combine_tutorial = CombineTutorial() |
| 22 | |
| 23 | # Connect nodes in sequence based on the design |
| 24 | fetch_repo >> identify_abstractions |
| 25 | identify_abstractions >> analyze_relationships |
| 26 | analyze_relationships >> order_chapters |
| 27 | order_chapters >> write_chapters |
| 28 | write_chapters >> combine_tutorial |
| 29 | |
| 30 | # Create the flow starting with FetchRepo |
| 31 | tutorial_flow = Flow(start=fetch_repo) |
| 32 | |
| 33 | return tutorial_flow |
no test coverage detected