Skip to content

Commit f392de7

Browse files
committed
TODOs
Signed-off-by: Piotr <piotrzan@gmail.com>
1 parent 5831bcf commit f392de7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

killercoda_cli/cli.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import difflib
66
import sys
77

8+
# TODO:(piotr1215) fallback if tree is not installed
89
def get_tree_structure():
910
"""
1011
Retrieves the current directory structure using the 'tree' command.
@@ -36,7 +37,6 @@ def generate_diff(old_tree, new_tree):
3637
)
3738
return ''.join(diff)
3839

39-
# 1. Traverse the current directory and build a dictionary mapping step numbers to paths
4040
def get_current_steps_dict(directory_items):
4141
"""
4242
Build a dictionary mapping step numbers to their respective paths.
@@ -58,7 +58,6 @@ def get_current_steps_dict(directory_items):
5858
pass # This handles cases where the step name is not a number
5959
return steps_dict
6060

61-
# 2. Take input from the user for the new step's name and the desired step number
6261
def get_user_input(steps_dict, step_title_input, step_number_input):
6362
"""
6463
Prompt the user for the new step's title and the desired step number, then validate the input.
@@ -84,7 +83,6 @@ def get_user_input(steps_dict, step_title_input, step_number_input):
8483

8584
return step_title, step_number
8685

87-
# 3. Determine the renaming and shifting required based on user input
8886
def plan_renaming(steps_dict, insert_step_num):
8987
"""
9088
Create a plan for renaming step directories and files after inserting a new step.
@@ -111,6 +109,7 @@ def plan_renaming(steps_dict, insert_step_num):
111109
renaming_plan.reverse()
112110
return renaming_plan
113111

112+
# TODO:(piotr1215) replace os calls with data structure
114113
def calculate_renaming_operations(renaming_plan):
115114
"""
116115
Calculate the file operations required to execute the renaming plan.
@@ -247,8 +246,6 @@ def display_help():
247246

248247
def main():
249248
"""
250-
The main entry point for the CLI tool.
251-
252249
This function orchestrates the entire process of adding a new step to the scenario,
253250
from taking user input to updating the file system and the index.json file.
254251
It ensures that the 'index.json' file is present, gathers the current directory structure,

0 commit comments

Comments
 (0)