Skip to content

feat: more flexible filter specification to allow overriding and appending to filters#310

Open
alexander-held wants to merge 8 commits intomasterfrom
feat/filter-dicts
Open

feat: more flexible filter specification to allow overriding and appending to filters#310
alexander-held wants to merge 8 commits intomasterfrom
feat/filter-dicts

Conversation

@alexander-held
Copy link
Copy Markdown
Member

@alexander-held alexander-held commented Dec 7, 2021

This implements a new approach for filter specification outlined in #307 (comment).

Breaking changes:

  • the Filter option in configs is replaced by Filters, which takes a dictionary instead of a string
  • the dictionary for Filters needs a user-defined name (Name property) and the filter itself (a string, as Filter)

to-do:

  • update tests
  • documentation for new filter approach
  • decide whether to pass through general config info in every function call in apply_to_all_templates, or whether to wrap required info like currently done with ntuple and histogram paths (if not, that should probably be refactored in a second step)
  • consider this also for weights

resolves #307

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 8, 2021

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (729a5d8) compared to base (6281501).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #310   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         2023      2032    +9     
  Branches       331       335    +4     
=========================================
+ Hits          2023      2032    +9     
Impacted Files Coverage Δ
src/cabinetry/route.py 100.00% <ø> (ø)
src/cabinetry/configuration.py 100.00% <100.00%> (ø)
src/cabinetry/templates/__init__.py 100.00% <100.00%> (ø)
src/cabinetry/templates/builder.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.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to combine filters for Samples and Regions

1 participant