Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: make matplotlib core dependency and refactor visualization code #250

Merged
merged 7 commits into from
Aug 9, 2021

Conversation

alexander-held
Copy link
Member

@alexander-held alexander-held commented Aug 9, 2021

This turns matplotlib into a core dependency. As a result, contrib.visualize_matplotlib is moved into submodules of visualize instead, with the functionality split up into three new components:

  • visualize.plot_model (visualize fit model: data/MC, templates),
  • visualize.plot_result (visualize inference results: correlation, pulls, ranking, scan, limit),
  • visualize.utils (utilities, currently just figure saving).

The change allows for some simplifications in the visualize API, where the method kwarg is dropped.

Breaking changes:

  • method kwarg removed from visualize API
  • contrib.matplotlib_visualize no longer exists, functionality is split up into visualize.plot_model, visualize.plot_results and visualize.utils
* matplotlib is now a core dependency
* breaking change: method keyword argument removed from visualize API
* breaking change: contrib.visualize_matplotlib moved to visualize submodules: plot_model, plot_result, utils
* added missing modules to API documentation

@codecov
Copy link

codecov bot commented Aug 9, 2021

Codecov Report

Merging #250 (1cd2433) into master (38047ff) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #250   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        17    +2     
  Lines         1728      1720    -8     
  Branches       269       261    -8     
=========================================
- Hits          1728      1720    -8     
Impacted Files Coverage Δ
src/cabinetry/visualize/__init__.py 100.00% <100.00%> (ø)
src/cabinetry/visualize/plot_model.py 100.00% <100.00%> (ø)
src/cabinetry/visualize/plot_result.py 100.00% <100.00%> (ø)
src/cabinetry/visualize/utils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38047ff...1cd2433. Read the comment docs.

@alexander-held alexander-held merged commit 1043103 into master Aug 9, 2021
@alexander-held alexander-held deleted the feat/matplotlib-core-dependency branch August 9, 2021 17:34
@alexander-held alexander-held mentioned this pull request Aug 20, 2021
5 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant