@@ -31,7 +31,9 @@ class ClientJobDescription(object):
31
31
Directory containing tool to execute (if a wrapper is used, it will
32
32
be transferred to remote server).
33
33
working_directory : str
34
- Local path created by Galaxy for running this job.
34
+ Local path created by Galaxy for running this job (job_wrapper.tool_working_directory).
35
+ metadata_directory : str
36
+ Local path created by Galaxy for running this job (job_wrapper.working_directory).
35
37
dependencies_description : list
36
38
galaxy.tools.deps.dependencies.DependencyDescription object describing
37
39
tool dependency context for remote depenency resolution.
@@ -57,7 +59,8 @@ def __init__(
57
59
config_files = [],
58
60
input_files = [],
59
61
client_outputs = None ,
60
- working_directory = None , # More sensible default?
62
+ working_directory = None ,
63
+ metadata_directory = None ,
61
64
dependencies_description = None ,
62
65
env = [],
63
66
arbitrary_files = None ,
@@ -69,6 +72,7 @@ def __init__(
69
72
self .input_files = input_files
70
73
self .client_outputs = client_outputs or ClientOutputs ()
71
74
self .working_directory = working_directory
75
+ self .metadata_directory = metadata_directory
72
76
self .dependencies_description = dependencies_description
73
77
self .env = env
74
78
self .rewrite_paths = rewrite_paths
@@ -103,9 +107,11 @@ def __init__(
103
107
output_files = [],
104
108
work_dir_outputs = None ,
105
109
version_file = None ,
106
- dynamic_outputs = None
110
+ dynamic_outputs = None ,
111
+ metadata_directory = None ,
107
112
):
108
113
self .working_directory = working_directory
114
+ self .metadata_directory = metadata_directory
109
115
self .work_dir_outputs = work_dir_outputs or []
110
116
self .output_files = output_files or []
111
117
self .version_file = version_file
@@ -115,6 +121,7 @@ def __init__(
115
121
def to_dict (self ):
116
122
return dict (
117
123
working_directory = self .working_directory ,
124
+ metadata_directory = self .metadata_directory ,
118
125
work_dir_outputs = self .work_dir_outputs ,
119
126
output_files = self .output_files ,
120
127
version_file = self .version_file ,
@@ -125,6 +132,7 @@ def to_dict(self):
125
132
def from_dict (config_dict ):
126
133
return ClientOutputs (
127
134
working_directory = config_dict .get ('working_directory' ),
135
+ metadata_directory = config_dict .get ('metadata_directory' ),
128
136
work_dir_outputs = config_dict .get ('work_dir_outputs' ),
129
137
output_files = config_dict .get ('output_files' ),
130
138
version_file = config_dict .get ('version_file' ),
@@ -139,9 +147,12 @@ class PulsarOutputs(object):
139
147
""" Abstraction describing the output files PRODUCED by the remote Pulsar
140
148
server. """
141
149
142
- def __init__ (self , working_directory_contents , output_directory_contents , remote_separator = sep ):
150
+ def __init__ (
151
+ self , working_directory_contents , output_directory_contents , metadata_directory_contents , remote_separator = sep
152
+ ):
143
153
self .working_directory_contents = working_directory_contents
144
154
self .output_directory_contents = output_directory_contents
155
+ self .metadata_directory_contents = metadata_directory_contents
145
156
self .path_helper = PathHelper (remote_separator )
146
157
147
158
@staticmethod
@@ -150,13 +161,15 @@ def from_status_response(complete_response):
150
161
# by the Pulsar - older Pulsar instances will not set these in complete response.
151
162
working_directory_contents = complete_response .get ("working_directory_contents" )
152
163
output_directory_contents = complete_response .get ("outputs_directory_contents" )
164
+ metadata_directory_contents = complete_response .get ("metadata_directory_contents" )
153
165
# Older (pre-2014) Pulsar servers will not include separator in response,
154
166
# so this should only be used when reasoning about outputs in
155
167
# subdirectories (which was not previously supported prior to that).
156
168
remote_separator = complete_response .get ("system_properties" , {}).get ("separator" , sep )
157
169
return PulsarOutputs (
158
170
working_directory_contents ,
159
171
output_directory_contents ,
172
+ metadata_directory_contents ,
160
173
remote_separator
161
174
)
162
175
0 commit comments