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

[DOC] display all masker reports in the doc #4295

Merged
merged 11 commits into from Mar 5, 2024
Merged

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Feb 28, 2024

Changes proposed in this pull request:

  • example of maskers report are generated on every full build of the doc
  • they are viewable in the maskers section of the API part of the doc
  • add a notebook to help check the look of reports in notebooks

Copy link
Contributor

👋 @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.

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.04%. Comparing base (abb80ff) to head (2dd5211).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4295      +/-   ##
==========================================
+ Coverage   91.85%   92.04%   +0.19%     
==========================================
  Files         144      143       -1     
  Lines       16419    16438      +19     
  Branches     3434     3444      +10     
==========================================
+ Hits        15082    15131      +49     
+ Misses        792      764      -28     
+ Partials      545      543       -2     
Flag Coverage Δ
macos-latest_3.10_test_plotting 91.92% <100.00%> (?)
macos-latest_3.11_test_plotting 91.92% <100.00%> (+0.06%) ⬆️
macos-latest_3.8_test_plotting 91.88% <100.00%> (?)
macos-latest_3.9_test_plotting 91.88% <100.00%> (?)
ubuntu-latest_3.10_test_plotting 91.92% <100.00%> (+0.06%) ⬆️
ubuntu-latest_3.11_test_plotting 91.92% <100.00%> (?)
ubuntu-latest_3.12_test_plotting 91.92% <100.00%> (?)
ubuntu-latest_3.12_test_pre 91.92% <100.00%> (?)
ubuntu-latest_3.8_test_plot_min 91.63% <100.00%> (?)
ubuntu-latest_3.8_test_plotting 91.88% <100.00%> (?)
ubuntu-latest_3.9_test_plotting 91.88% <100.00%> (?)
windows-latest_3.10_test_plotting 91.89% <100.00%> (?)
windows-latest_3.11_test_plotting 91.89% <100.00%> (?)
windows-latest_3.12_test_plotting 91.89% <100.00%> (?)
windows-latest_3.8_test_plotting 91.85% <100.00%> (?)
windows-latest_3.9_test_plotting 91.86% <100.00%> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Remi-Gau
Copy link
Collaborator Author

@Remi-Gau Remi-Gau changed the title [FIX] update layout of maskers report to avoid overlap between sections [FIX] update layout of maskers reports Feb 29, 2024
Comment on lines +11 to +12
.. raw:: html
:file: nifti_masker.html
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

mention for each where they were taken from

@Remi-Gau
Copy link
Collaborator Author

Random thoughts from working on this.

  • we need to find a way to lint and format the HTML and CSS. The diffs become unmanageable otherwise.
  • a lot of the CSS should be refactored across reports (glm and maskers) to ensure a common style
  • some html sections should be also refactored across reports (for glm and maskers reports the footer section for example)

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Mar 1, 2024

Will try to extract a few things from this into separate PR to make it easier to review.

@bthirion
Copy link
Member

bthirion commented Mar 3, 2024

Starts to look pretty good !

@Remi-Gau Remi-Gau changed the title [FIX] update layout of maskers reports [DOC] display all masker reports in the doc Mar 4, 2024
@Remi-Gau Remi-Gau marked this pull request as ready for review March 4, 2024 10:00
@Remi-Gau Remi-Gau marked this pull request as draft March 4, 2024 10:01
@Remi-Gau Remi-Gau marked this pull request as ready for review March 4, 2024 14:03
@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Mar 4, 2024

I would say that the run time optimization mentioned in this issue should be tackled in another PR.

@Remi-Gau Remi-Gau requested a review from bthirion March 4, 2024 14:10
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.

LGTM otherwise.

@@ -0,0 +1,212 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

I'm striggling to see where the resulting notebook can be found.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry.

I put the notebook with the figures on a different branch. Because I don't think we want to commit that 9 MB monster to the repo.

Also it seems that the HTML report embedded are not viewable on github so it needs to be downloaded.

Clearly not optimal for an easy review.

https://github.com/Remi-Gau/nilearn/blob/notebooks/doc/visual_testing/visualize_reports_in_notebook.ipynb

Copy link
Member

Choose a reason for hiding this comment

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

It would be great to see them once ;-)

@bthirion
Copy link
Member

bthirion commented Mar 4, 2024

The other issues is the set of failures. I guess it is unrelated.

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Mar 5, 2024

Zipped HTMLified notebook is here:

visualize_reports_in_notebook.zip

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.

LGTM, thx.

@Remi-Gau
Copy link
Collaborator Author

Remi-Gau commented Mar 5, 2024

will fix the doc build and merge if CI is still happy

@Remi-Gau Remi-Gau merged commit c43d5f9 into nilearn:main Mar 5, 2024
32 of 33 checks passed
@Remi-Gau Remi-Gau deleted the fix/4281 branch March 5, 2024 22:34
Remi-Gau added a commit to Remi-Gau/nilearn that referenced this pull request Mar 5, 2024
* display masker reports in doc

* update changelog

* refactor

* add notebooks

* clear cells

* [full doc] request full build

* add link to examples

* [full doc] request full build

* fix doc build
Remi-Gau added a commit to Remi-Gau/nilearn that referenced this pull request Mar 5, 2024
* display masker reports in doc

* update changelog

* refactor

* add notebooks

* clear cells

* [full doc] request full build

* add link to examples

* [full doc] request full build

* fix doc build
Remi-Gau added a commit that referenced this pull request Mar 9, 2024
…ap with masker report images (#4308)

* extract table folding and overlapping

* update changelog

* Update doc/changes/latest.rst

Co-authored-by: bthirion <bertrand.thirion@inria.fr>

* FIX] fixes several plotting details in glm reports (#4266)

* fix several issues in glm reports

* further fixes

* change cmap for glass brain

* fix remaining issues

* [full doc] request full build

* update changelog

* [full doc] request full build

* [FIX] force views in surface plotting to be pairs of `int` or `float` when not a `string` (#4297)

* for views to be pairs of int or float when not a string

* update changelog

* [FIX] fix cut position in nifti maps maskers (#4304)

* fix cut position in nifti maps maskers

* update changelog

* [FIX] remove conftest for externals (#4306)

* remove conftest tempita

* ignore tempita in pyproject.toml

* [MAINT] add script to check duration of test suite (#4231)

* add script to check duration of test suite

* add comment

* comment and refactor

* typo

* improve paging

* add workflow

* Update maint_tools/requirements.txt

* fail on bad request

* upload artefacts

* upload artefacts

* remove running on PR

* Apply suggestions from code review

Co-authored-by: Elizabeth DuPre <emd222@cornell.edu>

* update doc string

* update doc string

* refactor

---------

Co-authored-by: Elizabeth DuPre <emd222@cornell.edu>

* [DOC] display all masker reports in the doc (#4295)

* display masker reports in doc

* update changelog

* refactor

* add notebooks

* clear cells

* [full doc] request full build

* add link to examples

* [full doc] request full build

* fix doc build

* [full doc] request full build

* [full doc] request full build

---------

Co-authored-by: bthirion <bertrand.thirion@inria.fr>
Co-authored-by: Elizabeth DuPre <emd222@cornell.edu>
Remi-Gau added a commit that referenced this pull request Mar 9, 2024
…4310)

* fix display of mutli maps masker

* update changelog

* Update doc/changes/latest.rst

Co-authored-by: bthirion <bertrand.thirion@inria.fr>

* [DOC] display all masker reports in the doc (#4295)

* display masker reports in doc

* update changelog

* refactor

* add notebooks

* clear cells

* [full doc] request full build

* add link to examples

* [full doc] request full build

* fix doc build

* [full doc] request full build

* [full doc] request full build

---------

Co-authored-by: bthirion <bertrand.thirion@inria.fr>
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.

Render masker report as part of the documentation
2 participants