raphaelvallat / yasa

YASA (Yet Another Spindle Algorithm): a Python package to analyze polysomnographic sleep recordings.
https://raphaelvallat.com/yasa/
BSD 3-Clause "New" or "Revised" License
428 stars 115 forks source link

Update simulate_hypno to return Hypnogram instance #121

Closed remrama closed 1 year ago

remrama commented 1 year ago

Brings yasa.simulate_hypno up to speed with the new object-oriented yasa.Hypnogram (see Issue #120).

I wasn't sure about how to handle the changelog since I think we're expecting other function changes, so feel free to suggest a different approach to documenting this.

@raphaelvallat care to review?

codecov-commenter commented 1 year ago

Codecov Report

Base: 92.40% // Head: 92.53% // Increases project coverage by +0.12% :tada:

Coverage data is based on head (8f0b0e5) compared to base (f55eb55). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #121 +/- ## ========================================== + Coverage 92.40% 92.53% +0.12% ========================================== Files 23 23 Lines 3054 3106 +52 ========================================== + Hits 2822 2874 +52 Misses 232 232 ``` | [Impacted Files](https://codecov.io/gh/raphaelvallat/yasa/pull/121?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Raphael+Vallat) | Coverage Δ | | |---|---|---| | [yasa/hypno.py](https://codecov.io/gh/raphaelvallat/yasa/pull/121/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Raphael+Vallat#diff-eWFzYS9oeXBuby5weQ==) | `98.32% <100.00%> (+0.13%)` | :arrow_up: | | [yasa/tests/test\_hypno.py](https://codecov.io/gh/raphaelvallat/yasa/pull/121/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Raphael+Vallat#diff-eWFzYS90ZXN0cy90ZXN0X2h5cG5vLnB5) | `100.00% <100.00%> (ø)` | | | [yasa/tests/test\_hypnoclass.py](https://codecov.io/gh/raphaelvallat/yasa/pull/121/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Raphael+Vallat#diff-eWFzYS90ZXN0cy90ZXN0X2h5cG5vY2xhc3MucHk=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Raphael+Vallat). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Raphael+Vallat)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

remrama commented 1 year ago

I'm sure the Python 3.7 failures are because I used a walrus operator. Ignore that for now and I'll just remove it later when I incorporate feedback before merging.

raphaelvallat commented 1 year ago

Are we good to merge this one?

raphaelvallat commented 1 year ago

Merging now! Awesome work!!

remrama commented 1 year ago

Great! Thanks for the review @raphaelvallat