Skip to content

Commit

Permalink
Update reproducibility_checker.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihengSun committed Feb 5, 2024
1 parent 65ac570 commit 7902553
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/reproducibility_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ def collect_missing_functions(file_path):

notebook_ast = ast.parse(notebook_content)
functions_used = extract_functions(notebook_ast)
print(f"functions_used = {functions_used}")

missing_functions = [func for func in functions_used if not check_function_existence(func)]
print(f"missing_functions = {missing_functions}")
return missing_functions

def traverse_notebooks(folder_path):
Expand All @@ -31,6 +33,7 @@ def traverse_notebooks(folder_path):
for file in files:
if file.endswith('.ipynb'):
file_path = os.path.join(root, file)
print(f"Examining {file_path}")
missing_functions = collect_missing_functions(file_path)
if missing_functions:
missing_functions_all.append((file_path, missing_functions))
Expand All @@ -39,6 +42,7 @@ def traverse_notebooks(folder_path):


def check_reproducibility_of_all_notebooks_in_a_folder(folder_path: str):
print(f"Checking the home directory: {folder_path}")
# Specify the folder path to traverse
folder_path = folder_path

Expand Down

0 comments on commit 7902553

Please sign in to comment.