@@ -97,10 +97,10 @@ def run_commands_in_repo(repo_dir, commit_hash, age):
9797 commit_hash (str): The commit hash to run the commands in.
9898 age (str): The age of the commit being processed.
9999 """
100- # Checkout the repository to the specific commit
100+ # Checkout repo at the specific commit
101101 checkout_commit (repo_dir , commit_hash )
102102
103- # Retrieve the commit details
103+ # Retrieve commit details
104104 log_cmd = f'git log -n 1 { commit_hash } --pretty=format:"%H|%an|%aI"'
105105 log_output = run_git_command (log_cmd , cwd = repo_dir )
106106
@@ -112,7 +112,7 @@ def run_commands_in_repo(repo_dir, commit_hash, age):
112112
113113 print (f"{ Fore .MAGENTA } Commit for { age } : { commit_hash } , Author: { author_name } , Date: { commit_date } " )
114114
115- # Run the Python command on the repository
115+ # Run the Python command on the repo
116116 python_cmd = f'python3 -m aws_doc_sdk_examples_tools.stats "{ repo_dir } "'
117117 print (f"{ Fore .CYAN } Running stats command for repository: { repo_dir } " )
118118 output = run_git_command (python_cmd , cwd = repo_dir )
@@ -137,9 +137,9 @@ def get_file_from_commits_and_clone(repo_path, file_path, ages):
137137 age_content_dict = {}
138138 cloned_repos = {} # To track cloned repositories and their directories
139139
140- # Create a temporary directory for the clones
140+ # Create a tmp directory for the clones
141141 with tempfile .TemporaryDirectory () as tmp_dir :
142- # Fetch the configuration file from the main repository for each age
142+ # Fetch the config file from the main repository for each age
143143 for age in ages :
144144 print (f"{ Style .BRIGHT } { Fore .BLUE } #############################################################" )
145145 print (f"{ Style .BRIGHT } { Fore .BLUE } ######################## { age .upper ()} ##############################" )
@@ -163,13 +163,13 @@ def get_file_from_commits_and_clone(repo_path, file_path, ages):
163163 mirrors = yaml_content .get ('mirrors' , {})
164164 age_content_dict [age ] = mirrors
165165
166- # Clone or reuse repositories for each mirror
166+ # Clone or reuse repos for each mirror
167167 for mirror_name , mirror_info in mirrors .items ():
168168 repo_url = mirror_info .get ('git_mirror' )
169169 branch = mirror_info .get ('branch' )
170170 dir_name = mirror_info .get ('dir' )
171171
172- # Check if this repository has already been cloned
172+ # Check if repo has already been cloned
173173 if repo_url not in cloned_repos :
174174 # If not, clone the repository to a subfolder in the temp directory
175175 clone_dir = os .path .join (tmp_dir , dir_name )
@@ -214,8 +214,8 @@ def display_age_content_dict(age_content_dict):
214214 print ("-----------------" )
215215
216216if __name__ == "__main__" :
217- # Get the contents from the commits and clone the repos
217+ # Get the contents from the commits and clone the repos.
218218 age_content_dict = get_file_from_commits_and_clone (REPO_PATH , FILE_PATH , AGES )
219219
220- # Display the contents in the dictionary format
220+ # Display the contents in the dictionary format.
221221 display_age_content_dict (age_content_dict )
0 commit comments