Skip to content

Commit bef3381

Browse files
committed
Account for when workflows dir doesn't exist yet.
1 parent 5930d4a commit bef3381

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

wes_client/util.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def get_service_info(self):
111111
WES API versions supported, and information about general
112112
the service availability.
113113
114-
:param object http_client: bravado.requests_client.RequestsClient
115114
:param str auth: String to send in the auth header.
116115
:param proto: Schema where the server resides (http, https)
117116
:param host: Port where the post request will be sent and the wes server listens at (default 8080)
@@ -128,7 +127,6 @@ def list_runs(self):
128127
live updates as the user traverses the pages, the behavior
129128
should be decided (and documented) by each implementation.
130129
131-
:param object http_client: bravado.requests_client.RequestsClient
132130
:param str auth: String to send in the auth header.
133131
:param proto: Schema where the server resides (http, https)
134132
:param host: Port where the post request will be sent and the wes server listens at (default 8080)
@@ -145,7 +143,6 @@ def run(self, wf, jsonyaml, attachments):
145143
:param str workflow_file: A local/http/https path to a cwl/wdl/python workflow file.
146144
:param str jsonyaml: A local path to a json or yaml file.
147145
:param list attachments: A list of local paths to files that will be uploaded to the server.
148-
:param object http_client: bravado.requests_client.RequestsClient
149146
:param str auth: String to send in the auth header.
150147
:param proto: Schema where the server resides (http, https)
151148
:param host: Port where the post request will be sent and the wes server listens at (default 8080)
@@ -163,7 +160,6 @@ def cancel(self, run_id):
163160
Cancel a running workflow.
164161
165162
:param run_id: String (typically a uuid) identifying the run.
166-
:param object http_client: bravado.requests_client.RequestsClient
167163
:param str auth: String to send in the auth header.
168164
:param proto: Schema where the server resides (http, https)
169165
:param host: Port where the post request will be sent and the wes server listens at (default 8080)
@@ -178,7 +174,6 @@ def get_run_log(self, run_id):
178174
Get detailed info about a running workflow.
179175
180176
:param run_id: String (typically a uuid) identifying the run.
181-
:param object http_client: bravado.requests_client.RequestsClient
182177
:param str auth: String to send in the auth header.
183178
:param proto: Schema where the server resides (http, https)
184179
:param host: Port where the post request will be sent and the wes server listens at (default 8080)
@@ -193,7 +188,6 @@ def get_run_status(self, run_id):
193188
Get quick status info about a running workflow.
194189
195190
:param run_id: String (typically a uuid) identifying the run.
196-
:param object http_client: bravado.requests_client.RequestsClient
197191
:param str auth: String to send in the auth header.
198192
:param proto: Schema where the server resides (http, https)
199193
:param host: Port where the post request will be sent and the wes server listens at (default 8080)

wes_service/cwl_runner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ def GetServiceInfo(self):
173173

174174
def ListRuns(self, page_size=None, page_token=None, state_search=None):
175175
# FIXME #15 results don't page
176+
if not os.path.exists(os.path.join(os.getcwd(), "workflows")):
177+
return {"workflows": [], "next_page_token": ""}
176178
wf = []
177179
for l in os.listdir(os.path.join(os.getcwd(), "workflows")):
178180
if os.path.isdir(os.path.join(os.getcwd(), "workflows", l)):

wes_service/toil_wes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ def GetServiceInfo(self):
298298

299299
def ListRuns(self, page_size=None, page_token=None, state_search=None):
300300
# FIXME #15 results don't page
301+
if not os.path.exists(os.path.join(os.getcwd(), "workflows")):
302+
return {"workflows": [], "next_page_token": ""}
301303
wf = []
302304
for l in os.listdir(os.path.join(os.getcwd(), "workflows")):
303305
if os.path.isdir(os.path.join(os.getcwd(), "workflows", l)):

0 commit comments

Comments
 (0)