Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CADET-RDM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IBG-1
ModSim
CADET
CADET-RDM
Commits
566fdb7c
Commit
566fdb7c
authored
1 year ago
by
Ronald Jäpel
Browse files
Options
Downloads
Patches
Plain Diff
rename load_previous_results to load_previous_output
parent
2a669032
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cadetrdm/repositories.py
+1
-1
1 addition, 1 deletion
cadetrdm/repositories.py
tests/test_git_adapter.py
+4
-4
4 additions, 4 deletions
tests/test_git_adapter.py
with
5 additions
and
5 deletions
cadetrdm/repositories.py
+
1
−
1
View file @
566fdb7c
...
...
@@ -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:
...
...
This diff is collapsed.
Click to expand it.
tests/test_git_adapter.py
+
4
−
4
View file @
566fdb7c
...
...
@@ -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_
resul
t
(
path_to_repo
,
branch_name
):
def
try_load_previous_
outpu
t
(
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_
resul
t
(
path_to_repo
,
results_branch_name
)
try_load_previous_
outpu
t
(
path_to_repo
,
results_branch_name
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment