File tree 4 files changed +19
-4
lines changed 4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ __pycache__/
5
5
docker /cromwell-metadata /cromwell_credentials.txt
6
6
docker /cromwell-metadata /caas_key.json
7
7
8
+ # IDE
9
+ .vscode /
10
+
8
11
# Sphinx documentation
9
12
docs /_build /
10
13
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ Cromwell-tools
5
5
:target: https://quay.io/repository/broadinstitute/cromwell-tools
6
6
:alt: Container Build Status
7
7
8
- .. image :: https://github.com/broadinstitute/cromwell-tools/workflows/Tests%20on%20Pull%20Requests%20and%20Master/badge.svg?branch=master
9
- :target: https://github.com/broadinstitute/cromwell-tools/actions?query=workflow%3A%22Tests+on+Pull+Requests+and+Master%22+branch%3Arex-switch-to-GithubActions
8
+ .. image :: https://github.com/broadinstitute/cromwell-tools/workflows/Tests%20on%20Pull%20Requests%20and%20Master/badge.svg
9
+ :target: https://github.com/broadinstitute/cromwell-tools/actions?query=workflow%3A%22Tests+on+Pull+Requests+and+Master%22+branch%3Amaster
10
10
:alt: Unit Test Status
11
11
12
12
.. image :: https://img.shields.io/readthedocs/cromwell-tools/latest.svg?label=ReadtheDocs%3A%20Latest&logo=Read%20the%20Docs&style=flat-square
Original file line number Diff line number Diff line change 4
4
from cromwell_tools .cromwell_auth import CromwellAuth
5
5
from cromwell_tools .diag import task_runtime
6
6
from cromwell_tools import __version__
7
+ import sys
7
8
8
9
9
10
diagnostic_index = {'task_runtime' : task_runtime .run }
10
11
11
12
13
+ class DefaultHelpParser (argparse .ArgumentParser ):
14
+ def error (self , message ):
15
+ sys .stderr .write ('error: %s\n ' % message )
16
+ self .print_help ()
17
+ sys .exit (2 )
18
+
19
+
12
20
def parser (arguments = None ):
13
21
# TODO: dynamically walk through the commands and automatcally create parsers here
14
22
15
- main_parser = argparse . ArgumentParser ()
23
+ main_parser = DefaultHelpParser ()
16
24
17
25
# Check the installed version of Cromwell-tools
18
26
main_parser .add_argument (
@@ -249,6 +257,10 @@ def add_auth_args(subcommand_parser):
249
257
# group all of the arguments
250
258
args = vars (main_parser .parse_args (arguments ))
251
259
260
+ # Return help messages if no arguments provided
261
+ if not args ['command' ]:
262
+ main_parser .error ("No commands/arguments provided!" )
263
+
252
264
# TODO: see if this can be moved or if the commands can be populated from above
253
265
if args ['command' ] in (
254
266
'submit' ,
Original file line number Diff line number Diff line change @@ -613,5 +613,5 @@ def _check_and_raise_status(response: requests.Response) -> None:
613
613
if not response .ok :
614
614
raise requests .exceptions .HTTPError (
615
615
'Error Code {0}: {1}' .format (response .status_code , response .text ),
616
- response = response
616
+ response = response ,
617
617
)
You can’t perform that action at this time.
0 commit comments