Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Refactor modifier classes and add docstrings #1641

Open
matthewfeickert opened this issue Oct 14, 2021 · 2 comments
Open

Refactor modifier classes and add docstrings #1641

matthewfeickert opened this issue Oct 14, 2021 · 2 comments
Labels
API Changes the public API docs Documentation related question Further information is requested refactor A code change that neither fixes a bug nor adds a feature

Comments

@matthewfeickert
Copy link
Member

PR #1625 added the modifier builder and combine classes, but they might be good candidates for a refactor that allows for a base class.

They also all need docstrings. This needs to happen before v0.7.0 so that we don't have an undocumented API.

Originally posted by @matthewfeickert in #1625 (comment)

@matthewfeickert matthewfeickert added API Changes the public API docs Documentation related question Further information is requested refactor A code change that neither fixes a bug nor adds a feature labels Oct 14, 2021
@matthewfeickert
Copy link
Member Author

This refactor should also rename mega_mods to builder_data everywhere in tests/test_combined_modifiers.py

$ git grep "mega_mods"
tests/test_combined_modifiers.py:    mega_mods = {
tests/test_combined_modifiers.py:        [('hello', 'histosys'), ('world', 'histosys')], mc, mega_mods
tests/test_combined_modifiers.py:        [('hello', 'histosys'), ('world', 'histosys')], mc, mega_mods, batch_size=4
tests/test_combined_modifiers.py:    mega_mods = {
tests/test_combined_modifiers.py:    hsc = normsys_combined([('hello', 'normsys'), ('world', 'normsys')], mc, mega_mods)
tests/test_combined_modifiers.py:        [('hello', 'normsys'), ('world', 'normsys')], mc, mega_mods, batch_size=4
tests/test_combined_modifiers.py:    mega_mods = {
tests/test_combined_modifiers.py:    hsc = lumi_combined([('lumi', 'lumi')], mc, mega_mods)
tests/test_combined_modifiers.py:    hsc = lumi_combined([('lumi', 'lumi')], mc, mega_mods, batch_size=4)
tests/test_combined_modifiers.py:    mega_mods = {
tests/test_combined_modifiers.py:        mega_mods,
tests/test_combined_modifiers.py:    mega_mods = {
tests/test_combined_modifiers.py:        [('shapesys1', 'shapesys'), ('shapesys2', 'shapesys')], mc, mega_mods
tests/test_combined_modifiers.py:    mega_mods = {
tests/test_combined_modifiers.py:        [('mu1', 'normfactor'), ('mu2', 'normfactor')], mc, mega_mods
tests/test_combined_modifiers.py:        [('mu1', 'normfactor'), ('mu2', 'normfactor')], mc, mega_mods, batch_size=4
tests/test_combined_modifiers.py:    mega_mods = {
tests/test_combined_modifiers.py:        [('syst', 'shapesys'), ('syst_lowstats', 'shapesys')], mc, mega_mods
tests/test_combined_modifiers.py:    mega_mods = {
tests/test_combined_modifiers.py:        [('shapefac1', 'shapefactor'), ('shapefac2', 'shapefactor')], mc, mega_mods
tests/test_combined_modifiers.py:        mega_mods,

@matthewfeickert matthewfeickert added this to To do in v0.7.0 via automation Oct 15, 2021
@kratsg
Copy link
Contributor

kratsg commented Jun 29, 2022

Note that the discussion in #1716 will be relevant for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes the public API docs Documentation related question Further information is requested refactor A code change that neither fixes a bug nor adds a feature
Projects
Status: To do
Development

No branches or pull requests

2 participants