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

Properly handle empty dictionary in get_range_spectrogram #407

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

iaraota
Copy link
Collaborator

@iaraota iaraota commented Apr 15, 2024

This PR addresses the bug introduced in #403 by acknowledging that globalv.SPECTROGRAMS might not contain the specified key. In such cases, it now correctly returns an empty SpectrogramList(), according to the previously removed code snippet:

return globalv.SPECTROGRAMS.get(key, SpectrogramList())

@iaraota iaraota requested a review from eagoetz April 15, 2024 20:46
@iaraota iaraota self-assigned this Apr 15, 2024
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 49.54%. Comparing base (720bd0c) to head (6233e7a).
Report is 4 commits behind head on master.

Files Patch % Lines
gwsumm/data/range.py 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #407      +/-   ##
==========================================
- Coverage   49.64%   49.54%   -0.10%     
==========================================
  Files          60       60              
  Lines        8823     8831       +8     
==========================================
- Hits         4380     4375       -5     
- Misses       4443     4456      +13     
Flag Coverage Δ
Linux 49.54% <0.00%> (-0.10%) ⬇️
macOS 49.54% <0.00%> (?)
python3.10 49.54% <0.00%> (-0.10%) ⬇️
python3.11 49.54% <0.00%> (-0.10%) ⬇️
python3.9 49.54% <0.00%> (-0.10%) ⬇️

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

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

Copy link
Collaborator

@eagoetz eagoetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eagoetz eagoetz added this to the 2.2.5 milestone Apr 17, 2024
@eagoetz eagoetz merged commit 93fa5d8 into gwpy:master Apr 18, 2024
9 of 10 checks passed
@iaraota iaraota deleted the fix_range_spectrogram branch April 23, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants