Repository: scikit-hep/pyhf

Issue:
Bug Report: six should be a required install for pyhf
# Description

While looking at Issue #223 I tried to reproduce it in the [python:3.6.6 Docker image](https://hub.docker.com/_/python/). However, after installing pyhf from PyPI and trying to run the example @lukasheinrich made in #223 
```
pip install pyhf
cat << 'EOF' | pyhf cls
{
    "channels": [
        {
            "name": "channel1", 
            "samples": [
                {"name": "sig", "data": [ 5.0], "modifiers": [{"name": "mu","data": null, "type": "normfactor"}]}, 
                {"name": "bkg", "data": [50.0], "modifiers": []}
            ]
        }
    ], 
    "data": {"channel1": [51.0] }, 
    "toplvl": {
        "measurements": [
          {"config": {"poi": "mu"}, "name": "HelloWorld"}
        ]
    }
}
EOF
```

# Expected Behavior

The example should work from any install of pyhf

# Actual Behavior

I came across a new error:

```python-traceback
Traceback (most recent call last):
  File "/usr/local/bin/pyhf", line 7, in <module>
    from pyhf.commandline import pyhf
  File "/usr/local/lib/python3.6/site-packages/pyhf/__init__.py", line 55, in <module>
    from .pdf import Model
  File "/usr/local/lib/python3.6/site-packages/pyhf/pdf.py", line 7, in <module>
    from . import modifiers
  File "/usr/local/lib/python3.6/site-packages/pyhf/modifiers/__init__.py", line 1, in <module>
    from six import string_types
ModuleNotFoundError: No module named 'six'
```

As the traceback tells us, `six` is not a [required installation library](https://github.com/diana-hep/pyhf/blob/master/setup.py#L11-L15) for pyhf at the moment, yet is [used in `modifiers`](https://github.com/diana-hep/pyhf/blob/master/pyhf/modifiers/__init__.py#L1).

# Steps to Reproduce

```
docker pull python:3.6.6
docker run --rm -it python:3.6.6 /bin/bash
cd root
pip install pyhf
cat << 'EOF' | pyhf cls
{
    "channels": [
        {
            "name": "channel1", 
            "samples": [
                {"name": "sig", "data": [ 5.0], "modifiers": [{"name": "mu","data": null, "type": "normfactor"}]}, 
                {"name": "bkg", "data": [50.0], "modifiers": []}
            ]
        }
    ], 
    "data": {"channel1": [51.0] }, 
    "toplvl": {
        "measurements": [
          {"config": {"poi": "mu"}, "name": "HelloWorld"}
        ]
    }
}
EOF
```

If one then does
```
pip install six
cat << 'EOF' | pyhf cls
{
    "channels": [
        {
            "name": "channel1", 
            "samples": [
                {"name": "sig", "data": [ 5.0], "modifiers": [{"name": "mu","data": null, "type": "normfactor"}]}, 
                {"name": "bkg", "data": [50.0], "modifiers": []}
            ]
        }
    ], 
    "data": {"channel1": [51.0] }, 
    "toplvl": {
        "measurements": [
          {"config": {"poi": "mu"}, "name": "HelloWorld"}
        ]
    }
}
EOF
```

then the error in Issue #223 is recovered.

# Checklist

- [x] Run `git fetch` to get the most up to date version of `master`
- [x] Searched through existing Issues to confirm this is not a duplicate issue
- [x] Filled out the Description, Expected Behavior, Actual Behavior, and Steps to Reproduce sections above or have edited/removed them in a way that fully describes the issue

Bug Repot: basic functionality not working in non-develop pip installs 
# Description

`jsonschema` is always imported in pdf.py so it must be a hard dependency unless we choose to make validation optional


# Expected Behavior

this should work for any install of `pyhf`
```
pip install pyhf
cat << 'EOF' | pyhf cls
{
    "channels": [
        {
            "name": "channel1", 
            "samples": [
                {"name": "sig", "data": [ 5.0], "modifiers": [{"name": "mu","data": null, "type": "normfactor"}]}, 
                {"name": "bkg", "data": [50.0], "modifiers": []}
            ]
        }
    ], 
    "data": {"channel1": [51.0] }, 
    "toplvl": {
        "measurements": [
          {"config": {"poi": "mu"}, "name": "HelloWorld"}
        ]
    }
}
EOF
```
# Actual Behavior

```
ImportError: No module named jsonschema
```

# Steps to Reproduce

install pyhf without any extras -- run above example

# Checklist

- [x] Run `git fetch` to get the most up to date version of `master`
- [x] Searched through existing Issues to confirm this is not a duplicate issue
- [x] Filled out the Description, Expected Behavior, Actual Behavior, and Steps to Reproduce sections above or have edited/removed them in a way that fully describes the issue



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -13,6 +13,8 @@
     'scipy',
     'click>=6.0',  # for console scripts,
     'tqdm',  # for readxml
+    'six',  # for modifiers
+    'jsonschema>=v3.0.0a2',  # for utils, alpha-release for draft 6
   ],
   extras_require = {
     'xmlimport': [
@@ -28,7 +30,7 @@
       'requests<2.19.0,>=2.18.4',
     ],
     'tensorflow':[
-       'tensorflow==1.10.0',
+       'tensorflow>=1.10.0',
        'numpy<=1.14.5,>=1.13.3',
        'setuptools<=39.1.0',
     ],
@@ -39,7 +41,7 @@
        'pytest-benchmark[histogram]',
        'pytest-console-scripts',
        'python-coveralls',
-       'coverage==4.0.3',  # coveralls
+       'coverage>=4.0',  # coveralls
        'matplotlib',
        'jupyter',
        'uproot',
@@ -50,8 +52,7 @@
        'sphinxcontrib-napoleon',
        'sphinx_rtd_theme',
        'nbsphinx',
-       'jsonpatch',
-       'jsonschema==v3.0.0a2'  # alpha-release for draft 6
+       'jsonpatch'
     ]
   },
   entry_points = {


Test patch: