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

[MAINT] check events before plotting them #3994

Merged
merged 4 commits into from Sep 20, 2023
Merged

Conversation

Remi-Gau
Copy link
Collaborator

Changes proposed in this pull request:

  • run check_events on inputs of plot_events to ensure that they get the same treatment as before design matrix generation
  • extract summation of modulation of duplicated events in a separate function

@github-actions
Copy link
Contributor

github-actions bot commented Sep 19, 2023

👋 @Remi-Gau Thanks for creating a PR!

Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.

Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.

  • PR has an interpretable title.
  • PR links to Github issue with mention Closes #XXXX (see our documentation on PR structure)
  • Code is PEP8-compliant (see our documentation on coding style)
  • Changelog or what's new entry in doc/changes/latest.rst (see our documentation on PR structure)

For new features:

  • There is at least one unit test per new function / class (see our documentation on testing)
  • The new feature is demoed in at least one relevant example.

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

We will review it as quick as possible, feel free to ping us with questions if needed.

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #3994 (ff594ea) into main (ecf7686) will decrease coverage by 0.07%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3994      +/-   ##
==========================================
- Coverage   91.76%   91.70%   -0.07%     
==========================================
  Files         134      134              
  Lines       15781    15786       +5     
  Branches     3289     3291       +2     
==========================================
- Hits        14482    14476       -6     
- Misses        755      767      +12     
+ Partials      544      543       -1     
Flag Coverage Δ
macos-latest_3.10 91.68% <100.00%> (+<0.01%) ⬆️
macos-latest_3.11 91.68% <100.00%> (+<0.01%) ⬆️
macos-latest_3.8 91.64% <100.00%> (+<0.01%) ⬆️
macos-latest_3.9 91.65% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.10 91.68% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.11 91.68% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.8 91.64% <100.00%> (+<0.01%) ⬆️
ubuntu-latest_3.9 91.65% <100.00%> (+<0.01%) ⬆️
windows-latest_3.10 91.63% <100.00%> (?)
windows-latest_3.11 91.63% <100.00%> (+<0.01%) ⬆️
windows-latest_3.8 91.59% <100.00%> (?)
windows-latest_3.9 91.59% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
nilearn/glm/first_level/design_matrix.py 93.54% <100.00%> (+0.27%) ⬆️
nilearn/glm/first_level/experimental_paradigm.py 100.00% <100.00%> (ø)
nilearn/plotting/matrix_plotting.py 93.72% <100.00%> (+0.10%) ⬆️

... and 6 files with indirect coverage changes

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

Copy link
Member

@bthirion bthirion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit on the side of the PR, but I see that some private function in glm/first_level/experimental_paradigm do not even have a one-liner docstring to explain what they do. Maybe we could take this opportunity to add them ?

LGTM otherwise

nilearn/glm/first_level/experimental_paradigm.py Outdated Show resolved Hide resolved
@Remi-Gau
Copy link
Collaborator Author

do not even have a one-liner docstring

the functions were extracted by turning the comments prefacing them into the function

if the doc string does more than just repeating the function name I will add it one

@Remi-Gau
Copy link
Collaborator Author

if the doc string does more than just repeating the function name I will add it one

done

Copy link
Member

@ymzayek ymzayek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

nilearn/glm/first_level/experimental_paradigm.py Outdated Show resolved Hide resolved
Co-authored-by: Yasmin <63292494+ymzayek@users.noreply.github.com>
@Remi-Gau Remi-Gau merged commit 7842646 into nilearn:main Sep 20, 2023
29 checks passed
@Remi-Gau Remi-Gau deleted the plot_events branch November 9, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handling of simultaneous events by plot_event
3 participants