From 2469c48f2f955b5232a144461fab4260e8ffd4bc Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 22 Nov 2024 19:02:58 +0100 Subject: [PATCH] [DOC] fix doc string to remove warning in doc build (#4782) --- doc/Makefile | 20 ++++++++------------ nilearn/datasets/func.py | 28 +++++++++++++++++----------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 558a4b3619..bcddfd366c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -79,50 +79,46 @@ force: view: _build/html/index.html $(BROWSER) _build/html/index.html -html: sym_links sym_links_datasets glm_reports +no_jekyll: + touch $(BUILDDIR)/html/.nojekyll + +html: no_jekyll sym_links sym_links_datasets glm_reports # These two lines make the build a bit more lengthy, and the # the embedding of images more robust rm -rf $(BUILDDIR)/html/_images $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - touch $(BUILDDIR)/html/.nojekyll @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -html-strict: sym_links sym_links_datasets glm_reports +html-strict: no_jekyll sym_links sym_links_datasets glm_reports # Build html documentation using a strict mode: Warnings are # considered as errors. make check - touch $(BUILDDIR)/html/.nojekyll @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -html-modified-examples-only: sym_links sym_links_datasets glm_reports +html-modified-examples-only: sym_links sym_links_datasets glm_reports BUILD_DEV_HTML=1 $(SPHINXBUILD) -W --keep-going -D sphinx_gallery_conf.filename_pattern=$(PATTERN) -D sphinx_gallery_conf.run_stale_examples=True -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - touch $(BUILDDIR)/html/.nojekyll @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -html-noplot: sym_links_datasets glm_reports +html-noplot: no_jekyll sym_links_datasets glm_reports BUILD_DEV_HTML=1 $(SPHINXBUILD) -D plot_gallery=0 -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - touch $(BUILDDIR)/html/.nojekyll @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." html-noplot-noreport: sym_links_datasets BUILD_DEV_HTML=1 $(SPHINXBUILD) -D plot_gallery=0 -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - touch $(BUILDDIR)/html/.nojekyll @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." ci-html-noplot: sym_links_datasets glm_reports BUILD_DEV_HTML=1 $(SPHINXBUILD) -W --keep-going -D plot_gallery=0 -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - touch $(BUILDDIR)/html/.nojekyll @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -dirhtml: +dirhtml: no_jekyll $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - touch $(BUILDDIR)/dirhtml .nojekyll @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." diff --git a/nilearn/datasets/func.py b/nilearn/datasets/func.py index ee12786a0f..75788f1efc 100644 --- a/nilearn/datasets/func.py +++ b/nilearn/datasets/func.py @@ -2261,8 +2261,10 @@ def fetch_language_localizer_demo_dataset( Parameters ---------- %(data_dir)s + %(verbose)s - legacy_output: bool, default=True + + legacy_output : :obj:`bool`, default=True .. versionadded:: 0.10.3 .. deprecated::0.10.3 @@ -2278,18 +2280,22 @@ def fetch_language_localizer_demo_dataset( data : :class:`sklearn.utils.Bunch` Dictionary-like object, the interest attributes are : - - 'data_dir': :obj:`str` Path to downloaded dataset. - - 'func': :obj:`list` of :obj:`str`, - Absolute paths of downloaded files on disk - - 'description' : :obj:`str`, dataset description + - ``'data_dir'``: :obj:`str` Path to downloaded dataset. - Legacy output - ------------- - data_dir : :obj:`str` - Path to downloaded dataset. + - ``'func'``: :obj:`list` of :obj:`str`, + Absolute paths of downloaded files on disk - downloaded_files : :obj:`list` of :obj:`str` - Absolute paths of downloaded files on disk + - ``'description'`` : :obj:`str`, dataset description + + .. warning:: + + LEGACY OUTPUT: + + **data_dir** : :obj:`str` + Path to downloaded dataset. + + **downloaded_files** : :obj:`list` of :obj:`str` + Absolute paths of downloaded files on disk """ url = "https://osf.io/3dj2a/download"