Skip to content
Snippets Groups Projects
Commit 566fdb7c authored by Ronald Jäpel's avatar Ronald Jäpel
Browse files

rename load_previous_results to load_previous_output

parent 2a669032
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment