Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aswanipranjal opened this issue Apr 29, 2018 · 1 comment

Comments

@aswanipranjal
Copy link
Contributor

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.

@jgbarah
Copy link
Contributor

jgbarah commented May 2, 2018

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).

aswanipranjal added a commit to aswanipranjal/grimoirelab-manuscripts that referenced this issue May 14, 2018
Changed bin/manuscripts to show help when no arguments are passed to it.
Added default values to help for the arguments which have default values.
@acs acs closed this as completed in 5bd9a78 May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants