From 01e28ed7e6f6cfa1d3da689805ba1d972174b45f Mon Sep 17 00:00:00 2001 From: "Julio A. Peraza" <52050407+JulioAPeraza@users.noreply.github.com> Date: Wed, 31 May 2023 11:53:36 -0400 Subject: [PATCH] Add `reports` module (#802) * Add reports module * Add template * Add config file * Add generate_figues script * Add test * Update test_reports.py * Update setup.cfg * Fix lint error * Add yaml to setup file * Update setup.cfg * Update default.yml * Update setup.cfg * Add report to example gallery * check online path * Plot coordinates * Update 10_plot_cbma_workflow.py * Update 10_plot_cbma_workflow.py * Update figures.py * Update 10_plot_cbma_workflow.py * [skip ci] update figures * [skip ci] add static plot * [skip ci] update path to report * [skip ci] update path * [skip ci] explore rtd directory tree * [skip ci] high res images * [skip ci] update path to report * [skip ci] close fig after saving * [skip ci] update path * [skip ci] try another path the report.html * [skip ci] change the path again............. * [skip ci] update path * [skip ci] update path * [skip ci] add cluster table * [skip ci] add title, caption, and description * [skip ci] update example * [skip ci] increase size of heatmap * [skip ci] add ids of studies excluded to summary * [skip ci] update table style * [skip ci] add dynamic coordinates plot * [skip ci] add legend * [skip ci] embed heatmaps wit iframe * [skip ci] change names to fit new bids-like format * [skip ci] pin pandas version * [skip ci] add summary diagnostics * [skip ci] work on copy of diagnostics * [skip ci] get threshold from diagnostics * [skip ci] add all possible combinations of results * [skip ci] add message when tables and map are empty * [skip ci] add alpha to dictionary * [skip ci] add label maps * [skip ci] add tail label * [skip ci] add mask * add documentation * fix typo * add tables naming convention to output * only plot coordinates for CBMAEstimator * fix typo * improve coverage * reduce report and yml file --- docs/api.rst | 14 + docs/outputs.rst | 6 +- .../02_meta-analyses/10_plot_cbma_workflow.py | 27 +- nimare/__init__.py | 2 + nimare/diagnostics.py | 57 ++- nimare/reports/__init__.py | 24 + nimare/reports/base.py | 479 ++++++++++++++++++ nimare/reports/default.yml | 85 ++++ nimare/reports/figures.py | 354 +++++++++++++ nimare/reports/report.tpl | 140 +++++ nimare/tests/test_reports.py | 39 ++ nimare/tests/test_workflows.py | 6 +- nimare/workflows/cbma.py | 16 +- setup.cfg | 7 +- 14 files changed, 1212 insertions(+), 44 deletions(-) create mode 100644 nimare/reports/__init__.py create mode 100644 nimare/reports/base.py create mode 100644 nimare/reports/default.yml create mode 100644 nimare/reports/figures.py create mode 100644 nimare/reports/report.tpl create mode 100644 nimare/tests/test_reports.py diff --git a/docs/api.rst b/docs/api.rst index c527918cc..9e6f08fdd 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -336,6 +336,20 @@ For more information about fetching data from the internet, see :ref:`fetching t workflows.macm_workflow workflows.cbma_workflow +:mod:`nimare.reports`: NiMARE report +-------------------------------------------------- + +.. automodule:: nimare.reports + :no-members: + :no-inherited-members: + +.. currentmodule:: nimare + +.. autosummary:: + :toctree: generated/ + :template: function.rst + + reports.run_reports .. _api_base_ref: diff --git a/docs/outputs.rst b/docs/outputs.rst index 60d6ec4d1..ab25b7f62 100644 --- a/docs/outputs.rst +++ b/docs/outputs.rst @@ -11,11 +11,13 @@ File names NiMARE-generated files, especially ones made by meta-analyses, follow a naming convention somewhat based on BIDS. -Here is the basic naming convention for statistical maps: +Here is the basic naming convention for statistical maps and tables: .. code-block:: Text - [_desc-