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 a bug causing empty summary reports #435

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

godlygeek
Copy link
Contributor

Our TUI's update_snapshot method declares that it accepts any iterable, but it expects to be able to iterate over the snapshot repeatedly, which means that it does not accept generators or other iterators that can only be iterated once.

Update its type annotation to require a sequence instead of an iterable, and update the caller that was providing a generator to instead provide a sequence.

Closes #434

@godlygeek godlygeek self-assigned this Aug 1, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 1, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.07% 🎉

Comparison is base (d853623) 91.64% compared to head (9b59af0) 91.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #435      +/-   ##
==========================================
+ Coverage   91.64%   91.72%   +0.07%     
==========================================
  Files          90       90              
  Lines       10523    10524       +1     
  Branches     1446     1446              
==========================================
+ Hits         9644     9653       +9     
+ Misses        876      868       -8     
  Partials        3        3              
Flag Coverage Δ
cpp 85.20% <ø> (+0.21%) ⬆️
python_and_cython 95.18% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/memray/_version.py 100.00% <100.00%> (ø)
src/memray/reporters/summary.py 100.00% <100.00%> (ø)
src/memray/reporters/tui.py 98.85% <100.00%> (+<0.01%) ⬆️

... and 3 files with indirect coverage changes

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

Our TUI's `update_snapshot` method declares that it accepts any
iterable, but it expects to be able to iterate over the snapshot
repeatedly, which means that it does not accept generators or other
iterators that can only be iterated once.

Update its type annotation to require a sequence instead of an iterable,
and update the caller that was providing a generator to instead provide
a sequence.

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
See changelog for more details.

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
@pablogsal pablogsal merged commit 214debf into bloomberg:main Aug 1, 2023
33 checks passed
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.

Summary reporter no longer reporting anything with 1.9.0
3 participants