StingraySoftware / stingray

Anything can happen in the next half hour (including spectral timing made easy)!
https://stingray.science/stingray
MIT License
172 stars 141 forks source link

Fix apply_mask #712

Closed mgullik closed 1 year ago

mgullik commented 1 year ago

This PR fixes the problem with the function apply_mask. Before this fix, the mask was applied only to the _time and _counts attributes when inplace was True. I also modified one test and added a new one to check that apply_mask is applied to all the attributes of the object Lightcurve

codecov[bot] commented 1 year ago

Codecov Report

Merging #712 (68fcb42) into main (fb98a57) will decrease coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #712      +/-   ##
==========================================
- Coverage   97.21%   97.20%   -0.01%     
==========================================
  Files          42       42              
  Lines        7797     7805       +8     
==========================================
+ Hits         7580     7587       +7     
- Misses        217      218       +1     
Impacted Files Coverage Δ
stingray/lightcurve.py 97.83% <100.00%> (-0.13%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

matteobachetti commented 1 year ago

@mgullik thanks for your PR! The failing tests are two minor issues, we recently started to use two new procedures for PRs:

  1. Automated code formatting with black: you need to pip install black and run black -l 100 stingray before each commit (VSCode and other editors can do that automatically at each save, I highly recommend it).
  2. Creating a changelog entry using towncrier: you need to create a new news fragment in the directory docs/changes/ as explained here: https://github.com/StingraySoftware/stingray/blob/main/docs/changes/README.rst Thanks again!
mgullik commented 1 year ago

Hi @matteobachetti, what do you think? Should I try to improve the coverage of the tests? Let me know

matteobachetti commented 1 year ago

Thanks @mgullik !