Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chipathlon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Holland Computing Center
chipathlon
Commits
0a6048fd
Commit
0a6048fd
authored
7 years ago
by
aknecht2
Browse files
Options
Downloads
Patches
Plain Diff
Added more debug statements and fixed file_list parsing in workflow_job.
parent
af2ef997
No related branches found
Branches containing commit
No related tags found
1 merge request
!34
Resolve "Zerone"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
chipathlon/workflow_job.py
+10
-6
10 additions, 6 deletions
chipathlon/workflow_job.py
with
10 additions
and
6 deletions
chipathlon/workflow_job.py
+
10
−
6
View file @
0a6048fd
...
...
@@ -512,16 +512,13 @@ class WorkflowJob(object):
passed in.
"""
arg_value
=
self
.
_get_arg_value
(
arg_name
,
arg_info
)
if
self
.
debug
:
print
"
arg_value: %s
"
%
(
arg_value
,),
add_value
=
arg_value
if
(
isinstance
(
arg_value
,
str
)
and
arg_value
.
startswith
(
"
$
"
))
or
arg_info
[
"
type
"
]
==
"
rawfile
"
:
arg_value
=
arg_value
[
1
:]
if
arg_info
[
"
type
"
]
==
"
rawfile
"
:
add_value
=
self
.
raw_files
[
os
.
path
.
basename
(
arg_value
)][
"
file
"
]
elif
arg_info
[
"
type
"
]
==
"
file_list
"
:
# Lists can only be loaded from inputs
add_value
=
[]
for
file_dict
in
inputs
[
arg_value
][
"
values
"
]:
add_value
.
append
(
file_dict
[
"
file
"
].
name
)
else
:
# Conditionally load from inputs / outputs
# This will only load the dict of information though, not
...
...
@@ -538,6 +535,11 @@ class WorkflowJob(object):
elif
arg_info
[
"
type
"
]
==
"
rawfolder
"
:
# We want just the folder name
add_value
=
os
.
path
.
basename
(
os
.
path
.
dirname
(
arg_value
+
"
/
"
))
elif
arg_info
[
"
type
"
]
==
"
file_list
"
:
add_value
=
[]
for
val
in
arg_value
:
file_name
=
val
[
1
:]
add_value
.
append
((
inputs
if
file_name
in
inputs
else
outputs
)[
file_name
][
"
file
"
].
name
)
return
add_value
def
_create_arg_list
(
self
,
inputs
,
outputs
):
...
...
@@ -567,8 +569,10 @@ class WorkflowJob(object):
# 1. Should we add the argument name?
# 2. What's the correct value to add?
if
self
.
debug
:
print
"
\t
%s: Loading argument: %s, info: %s
"
%
(
self
,
arg_name
,
arg_info
)
print
"
\t
%s: Loading argument: %s, info: %s
,
"
%
(
self
,
arg_name
,
arg_info
)
,
add_value
=
self
.
_interpolate_value
(
inputs
,
outputs
,
arg_name
,
arg_info
)
if
self
.
debug
:
print
"
Final value: %s
"
%
(
add_value
)
# Only add arguments that have a value
if
add_value
is
not
None
:
# Need to add in the arg_name and the arg_value
...
...
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