Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Initial visual reports (nilearn#2019)
* Add externals directory for tempita * Add html report template * wip: initial commit of NiftiMasker report * Embed images in browser * Minor CSS updates * Add parameters table, non-responsive * Add tooltip for docstring * ENH: Avoid the use of iframes in the notebook (nicer layout) * MISC: cleaner inheritance * Remove ReportMixin class * Patch merge conflict * Create reporting module * Move computation to reporting method of masker * Call local style sheets * New nose-exclude dependency * Correct handling of 3D images * Revert nose-excludes, unpackage externals * Re-introduce ReportMixin * Re-package externals, add nose plugin to ignore * temporarily remove non-functioning nose plugin * Define __test__ attr to skip nosetest * Fix doc error, ignore linting in tempita * Remove externals from coverage * Unpackage pure style sheets * Remove externals from coverage reporting * Add pure attribution, license * Ask codecov directly (nicely) * Initial tests for reporting * Explicitly cast pathlib to str * Add overlay on hover * patch handling of single display images * Try to be careful about closing things... * fix: patch CI failure, add new text if hover * Address @jeromedockes review * Update images files to svg * omit externals from coverage * Move HTMLDocument to reporting * Add warning re missing MPL import, fix check_html calls * Move rm_file.py into reporting module * Fix check_html again * Move HTMLDocument to its own module * Adding additional tests * Retrigger Travis * Fix flake8 errors... the joys of switching text editors * Update examples to reference generate_report method * Change language from HTML to report, add comment on use * Update plot_nifti_simple example * Add code comment to plot_nifti_simple * Add in screenshots to showcase reporting * Adjust scaling * embed html reports * Address review comments * Fix iframe fenching * Update path to static HTML * Set height auto * Testing raw html directive * Break plot_mixed_gambles death spiral * Initial commit of MNE report scraper * Patch _ReportScraper * Use iframe rather than html page * define image_scrapers in sphinx conf * Update nilearn/reporting/sphinx_report.py Co-Authored-By: Eric Larson <[email protected]> * Use get_iframe method * Re-introduce whitespace in _SCRAPER_TEXT * Re-trigger CI * fix report in sphinx * Fix sphinx_report Indentation is also necessary * STY: fix CSS * Better example * FIX: avoid displaying reports twice * STY: more compact view Without this, the font is too big compared to the font of the examples * ENH: sphinx-gallery capture with repr_html Also works for interactive plots such as view_img * Update nilearn/reporting/sphinx_report.py Co-Authored-By: Elizabeth DuPre <[email protected]> * fix: correct dataset fetching * Add niftimasker report screenshots for rst * tst: initial tests for sphinx HTMLDocument embedding * fix: patch location of overlay * fix tst: do not rely on pytest fixture * tst: ensure tmpdir is closed after testing * fix: plot_nifti_simple fetcher * STY: fix whitespace in embedeed reports The CSS specified by the unclosing page (the nilearn website) was getting in the way. * STY: more styling to isolate from encompasing CSS * STY: enclose reports with a border * STY: tweak to limit scrollbars * CSS to get a better box This design makes the report really look like a box with a title. * STY: change colormap on masker report * STY: smaller reports in docs * STY: deal gracefully with details overflow * FIX: remove duplicate CSS rule * STY: fix scrolling in jupyter * Address @jeromedockes review * STY: make reports work in vscode Two problems arose: - Default theme is dark - The width was set wrong * Add example with resampling to plot_mask_computation * sty: update private attr in reporting * Differentiate warns for not fit, no reporting * fix: patch text in plot_mask_computation * sty: linting changes * fix: remove scaling to avoid jumping in page * sty: make contour thicker for contrast * Revert "fix: remove scaling to avoid jumping in page" This reverts commit 250e995. * fix: typo in sphinx_report * fix: remove overlay for saving svg images * Update nilearn/reporting/sphinx_report.py Co-Authored-By: Gael Varoquaux <[email protected]> * fix: update and extend test_html_report * fix: remove leftover nosetests attribute * Address @jeromedockes review * Re-introduce mask_img_ in examples * Generalize warnings in reporting * Add whats_new entry for generate_report * fix: patch whats_new entry * sty: Update display of plot_roi figs for NiftiMasker docs
- Loading branch information