chaoss/grimoirelab-manuscripts

Change the error which is thrown when no arguments are provided to 'manuscripts' command

aswanipranjal opened this issue · 1 comments

Currently, when we type the command manuscripts on the command line, without providing any arguments, it throws

2018-04-29 18:43:54,451 Missing needed params for Report None, 2015-01-01 00:00:00+00:00, 2018-04-28 23:59:59.999999+00:00, None

Which actually does not provide any information about what exactly is missing.
Either we can specify that es_url, start, end and data_sources are missing such as:

2018-04-29 18:43:54,451 Missing needed params for Report: elasticsearch-url, start date, end date, data-sources

or we can throw an error such as:

No arguments provided!
Usage: manuscripts <options> <arguments>
Try 'manuscripts --help' for more information.

Also, there does not exists a help command so maybe we can add that too.

Good point, @aswanipranjal. I think the way to go is the second one you propose. If you want to work on this, have a look at how the perceval command, in chaoss/grimoirelab-perceval, handles this case. If I remember well, we could do here pretty much the same. If you want, propose a pr following that direction (please, mention this issue in it).