Fix last trough assignment#99
Conversation
|
@smoia I've fixed the assignment bug in check_troughs and the pre-commit checks are green. Just letting you know this is ready for your review whenever you have a spare moment! |
kristinazvolanek
left a comment
There was a problem hiding this comment.
Hi Sejal,
Thank you for working on this! Sorry for the delay on the review. The code update looks great, but since we're making modifications, we can improve the rest of the code too! I have a few requested changes before we merge.
1. Could you please make the title more specific to the actual change and remove the semicolon? This title will appear in the release changelog. Something like, "Fix last trough assignment" would work.
2. This PR does not fully close #88, since that issue contains two separate items. Could you update the PR description to reflect that it partially addresses #88? Specifically:
- It closes item 2 (
utils/check_troughs) - Item 1 (
phys2neurokitconversion naming) is still outstanding
Alternatively, could you open a new issue for phys2neurokit conversion naming? Then we can close #88
- Issue #88 also suggests adding edge case handling at the start of
check_troughs. Could you add the following (you can check the issue for more info)?
Handle edge cases
if peaks is None or len(peaks) == 0:
return np.array([])
if len(peaks) == 1:
return np.array([])
Thank you! Please let me know if anything is unclear.
|
Hi @kristinazvolanek ,Thanks for the review!I will update the PR title and description to reflect that this partially addresses #88. I will also add the edge-case handling at the start of check_troughs as requested.I'll push the changes shortly and let you know when it's ready! |
|
I have pushed the changes with the edge-case handling added to the start of the Everything is ready for your review! |
Partially addresses #88 (closes item 2 regarding utils/check_troughs). Naming convention in item 1 is outstanding.
This PR fixes a small bug in the
check_troughsfunction where the final trough was not being correctly assigned due to a==comparison instead of=. No other functionality has been changed.Proposed Changes
all_troughs[-1]line incheck_troughsfunctionChange Type
bugfix(+0.0.1)minor(+0.1.0)major(+1.0.0)refactoring(no version update)test(no version update)infrastructure(no version update)documentation(no version update)otherChecklist before review