-
-
Notifications
You must be signed in to change notification settings - Fork 429
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] refactor ecg_findpeaks #973
[Fix] refactor ecg_findpeaks #973
Conversation
Nice, though if need be we can also just discard that check on codeclimate - I wonder whether you have access to codeclimate's NK checks if you log in with ur GH account |
Couldn't find that option - would it make sense to update the config file in the repository? |
Yeah to be fair I think we should drop codeclimate entirely... it was kinda useful years ago but now with all the GH actions not so much |
can I merge this? |
Description
This PR aims to refactor
ecg_findpeaks()
following a failing codeclimate check: https://codeclimate.com/github/neuropsychology/NeuroKit/pull/926Avoid deeply nested control flow statements.
Severity: Major
Found in neurokit2/ecg/ecg_findpeaks.py - About 45 mins to fix
Proposed Changes
I changed the
ecg_findpeaks_hamilton()
function so that it is broken up into smaller functions. I also added a regression test for it.Checklist
Here are some things to check before creating the PR. If you encounter any issues, do let us know :)