From 566fdb7cb405067311d6758af987435eb61b159d Mon Sep 17 00:00:00 2001 From: "r.jaepel" <r.jaepel@fz-juelich.de> Date: Thu, 24 Aug 2023 16:01:22 +0200 Subject: [PATCH] rename load_previous_results to load_previous_output --- cadetrdm/repositories.py | 2 +- tests/test_git_adapter.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cadetrdm/repositories.py b/cadetrdm/repositories.py index 383c8ec..87c0e33 100644 --- a/cadetrdm/repositories.py +++ b/cadetrdm/repositories.py @@ -426,7 +426,7 @@ class ProjectRepo(BaseRepo): full_path = os.path.join(self.working_dir, path) return full_path - def load_previous_results(self, branch_name, file_path): + def load_previous_output(self, branch_name, file_path): """ Load previously generated results to iterate upon. :param branch_name: diff --git a/tests/test_git_adapter.py b/tests/test_git_adapter.py index ef8f91e..5b4829c 100644 --- a/tests/test_git_adapter.py +++ b/tests/test_git_adapter.py @@ -119,11 +119,11 @@ def try_commit_results_with_uncommitted_code_changes(path_to_repo): repo.commit("add code to print random number", add_all=True) -def try_load_previous_result(path_to_repo, branch_name): +def try_load_previous_output(path_to_repo, branch_name): repo = ProjectRepo(path_to_repo) with repo.track_results(results_commit_message="Load array and extend"): - cached_array_path = repo.load_previous_results(branch_name=branch_name, - file_path="result.csv") + cached_array_path = repo.load_previous_output(branch_name=branch_name, + file_path="result.csv") previous_array = np.loadtxt(cached_array_path, delimiter=",") extended_array = np.concatenate([previous_array, previous_array]) extended_array_file_path = os.path.join(path_to_repo, repo.output_folder, "extended_result.csv") @@ -152,4 +152,4 @@ def test_cadet_rdm(path_to_repo): try_commit_results_with_uncommitted_code_changes(path_to_repo) results_branch_name = try_commit_results_data(path_to_repo) - try_load_previous_result(path_to_repo, results_branch_name) + try_load_previous_output(path_to_repo, results_branch_name) -- GitLab