Repository: scikit-hep/cabinetry (language: python)

Issue:
feat: histogram inputs
This adds functionality to use analyzer-provided histograms instead of ntuples as input. This is done via approach 4) described in #219: The configuration schema is (slightly) expanded to support specification of paths to histograms, and the first step in a workspace-building workflow is to read the user-provided histograms and save them in the manner that `cabinetry` expects for further internal usage. Only a single histogram is supported per template that `cabinetry` needs, though this may be expanded in the future (#291).

additions:
- added `contrib.histogram_reader` to read histograms with uproot
- added `templates.collector` to collect histograms and store them in the `cabinetry`-internal format for subsequent processing (the whole `templates` module is new, but contains refactored functionality, see below)

**Breaking changes:**
- refactored `template_builder` and `template_postprocessor`, moved high-level functionality into `templates` and lower-level features into submodules `templates.creator` and `templates.postprocessor`
  - `template_builder.create_histograms` -> `templates.create`
  - `template_postprocessor.run` -> `templates.postprocess`
- renamed `contrib.histogram_creation` to `contrib.histogram_creator`, and the `from_uproot` function contained within to `with_uproot`
- `SamplePaths` config option renamed to `SamplePath`

resolves #219

```
* added support for histogram inputs to workspace building
* breaking change: refactored template_builder and template_postprocessor
   - high-level functionality now provided via new templates module
   - lower-level functionality available in submodules
* breaking change: SamplePaths config option renamed to SamplePath
* breaking change: contrib.histogram_creation.from_uproot renamed to contrib.histogram_creator.with_uproot
* extended config schema to support specifying histogram inputs
* added templates.collect API to support handling histogram inputs
* added documentation for histogram input handling
```


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index b421cdf5..5e810342 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -45,7 +45,7 @@ jobs:
         black --check --diff --verbose .
     - name: Run example
       run: |
-        python util/create_ntuples.py
+        python utils/create_ntuples.py
         python example.py
     - name: Test with pytest, without typeguard, generate coverage report
       if: matrix.python-version == 3.7
diff --git a/MANIFEST.in b/MANIFEST.in
index d4bf83f1..d9f2c799 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,6 +1,7 @@
 prune **
 graft src
 graft tests
+graft utils
 
 include setup.py
 include setup.cfg
diff --git a/README.md b/README.md
index 949f9c57..0688c96a 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ python -m pip install cabinetry[contrib]
 
 ## Hello world
 
-To run the following example, first generate the input files via the script `util/create_ntuples.py`.
+To run the following example, first generate the input files via the script `utils/create_ntuples.py`.
 
 ```python
 import cabinetry
diff --git a/example.py b/example.py
index 0bb3aa74..4e1441c3 100644
--- a/example.py
+++ b/example.py
@@ -9,7 +9,7 @@
 
     # check whether input data exists
     if not os.path.exists("ntuples/"):
-        print("run util/create_ntuples.py to create input data")
+        print("run utils/create_ntuples.py to create input data")
         raise SystemExit
 
     # import example config file
diff --git a/setup.cfg b/setup.cfg
index 6c058d75..48e7d52f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -61,7 +61,7 @@ exclude = docs/conf.py
 count = True
 statistics = True
 import-order-style = google
-application-import-names = cabinetry, util
+application-import-names = cabinetry, utils
 extend-ignore = E203  # whitespace before ':'
 # ignore print statements in example
 per-file-ignores =
diff --git a/util/create_ntuples.py b/utils/create_ntuples.py
similarity index 100%
rename from util/create_ntuples.py
rename to utils/create_ntuples.py


Test patch:
diff --git a/tests/test_integration.py b/tests/test_integration.py
index bff3fba5..54bc8a9c 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -4,7 +4,7 @@
 import pytest
 
 import cabinetry
-from util import create_ntuples
+from utils import create_ntuples
 
 
 @pytest.fixture