diff --git a/cadetrdm/repositories.py b/cadetrdm/repositories.py index 383c8ec11b5d3beed707965d0b0e692dd7e58f66..87c0e33bf6e281bb134f4728d6b0d760af66680a 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 ef8f91e13b047e69a3984aa82eaea82313637f35..5b4829cbb99b4dd9ea4c31bc437105c8163d77d7 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)