Skip to content

Commit 9f3aa18

Browse files
committed
Cleaned up unused code
1 parent 613a4a1 commit 9f3aa18

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/action_main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
if __name__ == "__main__":
99
github_workspace = os.getenv("GITHUB_WORKSPACE")
1010
workspace = f"{github_workspace}/main"
11-
# workspace = os.getenv("GITHUB_WORKSPACE")
1211
git_repo = os.getenv("GITHUB_REPOSITORY")
1312
git_ref = os.getenv("GITHUB_REF")
1413
commit_SHA = os.getenv("GITHUB_SHA")

src/notebook_executor.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
class NotebookExecutor:
88
def __init__(self, workspace_path, notebook_path):
99
self.workspace_path = workspace_path
10-
# self.notebook_full_path = f"{workspace_path}/{notebook_path}"
11-
self.notebook_full_path = notebook_path
10+
self.notebook_path = notebook_path
1211

1312
def run(self):
14-
if os.path.exists(self.notebook_full_path):
15-
print(f"Running notebook: {self.notebook_full_path}")
16-
nb = nbformat.read(open(self.notebook_full_path), as_version=4)
13+
if os.path.exists(self.notebook_path):
14+
print(f"Running notebook: {self.notebook_path}")
15+
nb = nbformat.read(open(self.notebook_path), as_version=4)
1716
ep = ExecutePreprocessor(kernel_name="python3", allow_errors=False)
1817
try:
1918
ep.preprocess(nb, {"metadata": {"path": self.workspace_path}})
@@ -22,5 +21,5 @@ def run(self):
2221
raise Exception(f"An error occurred while executing the notebook: {e}")
2322
else:
2423
print(
25-
f"Notebook file not found at path: {self.notebook_full_path}. Omitting notebook execution step."
24+
f"Notebook file not found at path: {self.notebook_path}. Omitting notebook execution step."
2625
)

0 commit comments

Comments
 (0)