Repository: scikit-hep/pyhf

Issue:
pyhf contrib download fails gracelessly with invalid URL
# Description

calling `pyhf contrib download` (just to see what it does) fails pretty violently. hould we make itt a bit nicer @matthewfeickert 
?

```
pyhf contrib download
Traceback (most recent call last):
  File "/Users/lukasheinrich/Code/pyhfdev/dev/pyhfdevenv/bin/pyhf", line 33, in <module>
    sys.exit(load_entry_point('pyhf', 'console_scripts', 'pyhf')())
  File "/Users/lukasheinrich/Code/pyhfdev/dev/pyhfdevenv/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/lukasheinrich/Code/pyhfdev/dev/pyhfdevenv/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/lukasheinrich/Code/pyhfdev/dev/pyhfdevenv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lukasheinrich/Code/pyhfdev/dev/pyhfdevenv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/lukasheinrich/Code/pyhfdev/dev/pyhfdevenv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/lukasheinrich/Code/pyhfdev/dev/pyhfdevenv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/lukasheinrich/Code/pyhfdev/dev/pyhfsrc/src/pyhf/cli/contrib.py", line 60, in download
    utils.download(archive_url, output_directory, force, compress)
  File "/Users/lukasheinrich/Code/pyhfdev/dev/pyhfsrc/src/pyhf/contrib/utils.py", line 47, in download
    + "To download an archive from this host use the --force option."
pyhf.exceptions.InvalidArchiveHost:  is not an approved archive host: www.hepdata.net, doi.org
To download an archive from this host use the --force option.
```



Discussion:
@lukasheinrich Hm, I guess so. Seems that this is interpreting no input as a null address to attempt to access. 

While I agree that this should get improved, should we assume that all users will try to run commands without input rather than `--help` to learn about them? If so, we should make sure that we give helpful exits for all of our CLI.
I think the issue is the default value, 

is this intended? ```@click.argument("archive-url", default="-")```
> I think the issue is the default value,
> 
> is this intended? `@click.argument("archive-url", default="-")`

Ah yeah, you're 100% right, @lukasheinrich. Those should both have no default. My bad. Opening PR with fix now.

Resolving patch:
diff --git a/src/pyhf/cli/contrib.py b/src/pyhf/cli/contrib.py
--- a/src/pyhf/cli/contrib.py
+++ b/src/pyhf/cli/contrib.py
@@ -25,8 +25,8 @@ def cli():
 
 
 @cli.command()
-@click.argument("archive-url", default="-")
-@click.argument("output-directory", default="-")
+@click.argument("archive-url")
+@click.argument("output-directory")
 @click.option("-v", "--verbose", is_flag=True, help="Enables verbose mode")
 @click.option(
     "-f", "--force", is_flag=True, help="Force download from non-approved host"


Test patch: