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

fix: generic_plotter.py: skip empty branches #2742

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

AJPfleger
Copy link
Contributor

In case of an empty branch the plotter crashed when calculating the limits. Now we skip those branches and generate no plots for them.

Traceback (most recent call last):

  File "<source>/Examples/Scripts/generic_plotter.py", line 209, in <module>
    typer.run(main)

  File "<source>/Examples/Scripts/generic_plotter.py", line 139, in main
    found.min -= 1

TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'

@github-actions github-actions bot added the Component - Examples Affects the Examples module label Nov 29, 2023
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1bf0daf) 49.51% compared to head (89a34da) 49.51%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2742   +/-   ##
=======================================
  Coverage   49.51%   49.51%           
=======================================
  Files         475      475           
  Lines       26965    26965           
  Branches    12447    12447           
=======================================
  Hits        13352    13352           
  Misses       4764     4764           
  Partials     8849     8849           

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

@felix-russo
Copy link
Contributor

Is it expected behavior to have empty branches?

@AJPfleger
Copy link
Contributor Author

Here we can generate a root-file with some empty branches. (outlierChi2, outlierVolume, outlierLayer) since the GX2F doesn't do outliers (yet).

acts.examples.RootTrackSummaryWriter(

Maybe it is unexpected from the Writer- or GX2F-side, but I think the plotter shouldn't refuse to plot the other (valid) branches.

@paulgessinger paulgessinger added this to the next milestone Nov 29, 2023
@kodiakhq kodiakhq bot merged commit cf14470 into acts-project:main Nov 29, 2023
49 checks passed
@AJPfleger AJPfleger deleted the generic-plotter branch November 29, 2023 16:52
@acts-project-service
Copy link
Collaborator

@paulgessinger paulgessinger modified the milestones: next, v31.2.0 Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Examples Affects the Examples module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants