scikit-hep / cabinetry

design and steer profile likelihood fits
https://cabinetry.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
28 stars 21 forks source link

feat: visualization of modifier structure in models #333

Closed alexander-held closed 2 years ago

alexander-held commented 2 years ago

Adding visualize.modifier_grid to visualize the structure of modifiers in a workspace (see #332). The modifiers depend on (channel, sample, parameter) and to break this 3d space down, the visualization shows one 2d grid per channel or per sample (customizable). The functionality is also added to the command line interface as cabinetry modifier-grid workspace.json.

Raising the log level for the information about figures being saved from DEBUG to INFO, as this is particularly useful in the CLI to see where figures end up. Doing the same for tables for consistency.

mypy started complaining about importlib_metadata (backport for 3.7) and uhi type stubs missing (unclear to me why this is happening now), so adding them to the pre-commit dependencies.

resolves #332

* added modifier structure visualization for models via visualize.modifier_grid
* added modifier-grid to command line interface
* raised log level for messages about figures and tables being saved to INFO
* added missing dependencies to mypy pre-commit checks
codecov[bot] commented 2 years ago

Codecov Report

Merging #333 (8051e69) into master (7a93054) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #333   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         1933      1999   +66     
  Branches       312       326   +14     
=========================================
+ Hits          1933      1999   +66     
Impacted Files Coverage Δ
src/cabinetry/cli/__init__.py 100.00% <100.00%> (ø)
src/cabinetry/model_utils.py 100.00% <100.00%> (ø)
src/cabinetry/tabulate.py 100.00% <100.00%> (ø)
src/cabinetry/visualize/__init__.py 100.00% <100.00%> (ø)
src/cabinetry/visualize/plot_model.py 100.00% <100.00%> (ø)
src/cabinetry/visualize/utils.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.