Skip to content

Conversation

alexander-held
Copy link
Member

@alexander-held alexander-held commented Apr 18, 2025

As raised in cabinetry/cabinetry-tutorials#20 and mentioned in #291: the cabinetry templates CLI so far has not supported histogram inputs. By checking for "Tree" properties of samples, which are mandatory for ntuple inputs, we can determine it the input most likely has ntuple format. This could theoretically fail if configs are written for histograms but still set these tree properties (which do nothing in that case), so a --input_type override can be used to correct the automatic detection if needed.

The logic for the input format detection may need to be updated in case of config format changes, e.g. for features discussed in #291, #435, or #528.

resolves cabinetry/cabinetry-tutorials#20

* support histogram input reading through the command line interface
* automatically detect if input files have ntuple or histogram type
* new --input_type override to `cabinetry templates` to manually set input type

Copy link

codecov bot commented Apr 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (54985d0) to head (5cc4bbc).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #537   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         2099      2106    +7     
  Branches       291       293    +2     
=========================================
+ Hits          2099      2106    +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexander-held alexander-held requested a review from MoAly98 April 18, 2025 13:58
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.

Histogram example: KeyError: 'Tree'
1 participant