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

[Feature] EMG report #841

Merged
merged 17 commits into from
Jul 3, 2023

Conversation

danibene
Copy link
Collaborator

Description

This PR aims to generate an interactive HTML report describing EMG processing as described in #665

Proposed Changes

  1. I changed the emg_plot() function so that it optionally generates an interactive plot with plotly
  2. I added an emg_methods() function
  3. I changed the emg_process() function so that it optionally generates a report
  4. I wrote a test for generating a report
  5. I modified the docstring in report.py to reference EMG; however, I did not add any EMG-specific logic for generating a summary table. I wonder if we should use bio_analyze() to generate the table rather than checking the column names within report.py

Checklist

  • I have read the CONTRIBUTING file.
  • My PR is targeted at the dev branch (and not towards the master branch).

@danibene
Copy link
Collaborator Author

danibene commented Jun 14, 2023

I think the test for emg_plot is currently failing because I returned a figure even when it is generated with matplotlib to keep the option of generating a report with matplotlib instead of plotly

@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2023

Codecov Report

Patch coverage: 86.20% and project coverage change: +1.35 🎉

Comparison is base (5116fb4) 53.88% compared to head (75c931f) 55.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #841      +/-   ##
==========================================
+ Coverage   53.88%   55.23%   +1.35%     
==========================================
  Files         295      296       +1     
  Lines       13811    13905      +94     
==========================================
+ Hits         7442     7681     +239     
+ Misses       6369     6224     -145     
Impacted Files Coverage Δ
neurokit2/misc/report.py 94.18% <ø> (+2.32%) ⬆️
neurokit2/ppg/ppg_clean.py 70.58% <33.33%> (ø)
neurokit2/ppg/ppg_methods.py 85.29% <66.66%> (ø)
neurokit2/emg/emg_clean.py 83.33% <75.00%> (+1.51%) ⬆️
neurokit2/emg/emg_methods.py 90.00% <90.00%> (ø)
neurokit2/emg/emg_plot.py 93.33% <90.24%> (-4.45%) ⬇️
neurokit2/emg/emg_process.py 95.65% <90.90%> (-4.35%) ⬇️
neurokit2/ppg/ppg_process.py 95.83% <100.00%> (ø)
neurokit2/rsp/rsp_methods.py 86.79% <100.00%> (ø)

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@DominiqueMakowski
Copy link
Member

can we merge that?

@danibene danibene merged commit 503ce96 into neuropsychology:dev Jul 3, 2023
@danibene danibene deleted the feature/report_methods_emg branch July 3, 2023 21:30
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.

3 participants