From 5f9cd527b50fd1050c9967081aef9058b2ab91f4 Mon Sep 17 00:00:00 2001 From: Mathieu Scheltienne Date: Fri, 27 Oct 2023 14:43:55 +0200 Subject: [PATCH] doc fixes (#142) --- doc/Makefile | 199 ++----------------- doc/_static/versions.json | 2 +- doc/_templates/docs-navbar.html | 20 -- doc/_templates/docs-toc.html | 13 -- doc/_templates/layout.html | 19 -- doc/_templates/version-switcher.html | 11 -- doc/api.rst | 10 +- doc/changes/0.2.rst | 22 +++ doc/changes/0.3.rst | 21 ++ doc/changes/0.4.rst | 18 ++ doc/changes/authors.inc | 4 + doc/changes/index.rst | 10 + doc/changes/latest.rst | 22 +++ doc/changes/latest.rst.template | 38 ++++ doc/conf.py | 6 +- doc/index.rst | 2 +- doc/install.rst | 12 +- doc/make.bat | 277 ++++----------------------- doc/whats_new.rst | 46 ----- doc/whats_new_previous_releases.rst | 117 ----------- 20 files changed, 198 insertions(+), 671 deletions(-) delete mode 100644 doc/_templates/docs-navbar.html delete mode 100644 doc/_templates/docs-toc.html delete mode 100755 doc/_templates/layout.html delete mode 100644 doc/_templates/version-switcher.html create mode 100644 doc/changes/0.2.rst create mode 100644 doc/changes/0.3.rst create mode 100644 doc/changes/0.4.rst create mode 100644 doc/changes/authors.inc create mode 100644 doc/changes/index.rst create mode 100644 doc/changes/latest.rst create mode 100644 doc/changes/latest.rst.template delete mode 100644 doc/whats_new.rst delete mode 100644 doc/whats_new_previous_releases.rst diff --git a/doc/Makefile b/doc/Makefile index f2492c751..d4bb2cbb9 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,193 +1,20 @@ -# Makefile for Sphinx documentation +# Minimal makefile for Sphinx documentation # -# You can set these variables from the command line. -SPHINXOPTS = -nWT --keep-going -SPHINXBUILD = sphinx-build -PAPER = +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . BUILDDIR = _build -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - +# Put it first so that "make" without argument is like "make help". help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -rm -rf generated/* - -html_stable: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html_stable - @echo - @echo "Build finished. The HTML pages are in _build/html_stable." - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -html-noplot: - $(SPHINXBUILD) -D plot_gallery=0 -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/project-template.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/project-template.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/project-template" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/project-template" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -view: - @python -c "import webbrowser; webbrowser.open_new_tab('file://$(PWD)/_build/html/index.html')" +.PHONY: help Makefile -show: view +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/_static/versions.json b/doc/_static/versions.json index 17406b0a1..9e1e51db5 100644 --- a/doc/_static/versions.json +++ b/doc/_static/versions.json @@ -6,7 +6,7 @@ }, { "name": "0.4 (stable)", - "version": "stable", + "version": "0.4", "url": "https://mne.tools/mne-icalabel/stable" }, { diff --git a/doc/_templates/docs-navbar.html b/doc/_templates/docs-navbar.html deleted file mode 100644 index f32479392..000000000 --- a/doc/_templates/docs-navbar.html +++ /dev/null @@ -1,20 +0,0 @@ -{%- extends "pydata_sphinx_theme/docs-navbar.html" %} - -{%- block icon_links -%} - - - -{%- include "icon-links.html" with context -%} -{%- endblock %} diff --git a/doc/_templates/docs-toc.html b/doc/_templates/docs-toc.html deleted file mode 100644 index 97dc4a69f..000000000 --- a/doc/_templates/docs-toc.html +++ /dev/null @@ -1,13 +0,0 @@ -{% set page_toc = generate_toc_html() %} - -{%- if page_toc | length >= 1 %} -
- On this page -
-{%- endif %} - - - -{% include "edit_this_page.html" %} diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html deleted file mode 100755 index 6b3d45b5b..000000000 --- a/doc/_templates/layout.html +++ /dev/null @@ -1,19 +0,0 @@ -{%- extends "pydata_sphinx_theme/layout.html" %} - -{% block fonts %} - - - - - -{% endblock %} - -{% block extrahead %} - - - -{{ super() }} -{% endblock %} diff --git a/doc/_templates/version-switcher.html b/doc/_templates/version-switcher.html deleted file mode 100644 index add617220..000000000 --- a/doc/_templates/version-switcher.html +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/doc/api.rst b/doc/api.rst index 97cd9f80b..9c212ced1 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -16,7 +16,7 @@ Most-used functions .. currentmodule:: mne_icalabel .. autosummary:: - :toctree: generated/ + :toctree: ./generated/api label_components @@ -48,7 +48,7 @@ the 3 features are concatenated for the final layer. .. currentmodule:: mne_icalabel.iclabel .. autosummary:: - :toctree: generated/ + :toctree: ./generated/api iclabel_label_components get_iclabel_features @@ -63,7 +63,7 @@ Contains functions to extract features from `~mne.preprocessing.ICA` instance an .. currentmodule:: mne_icalabel.features .. autosummary:: - :toctree: generated/ + :toctree: ./generated/api get_topomaps @@ -75,7 +75,7 @@ derivative standard of BIDS for EEG data. .. currentmodule:: mne_icalabel.annotation .. autosummary:: - :toctree: generated/ + :toctree: ./generated/api mark_component write_components_tsv @@ -88,6 +88,6 @@ significant bugs still. Please report these in the GH issues tab. .. currentmodule:: mne_icalabel .. autosummary:: - :toctree: generated/ + :toctree: ./generated/api gui.label_ica_components diff --git a/doc/changes/0.2.rst b/doc/changes/0.2.rst new file mode 100644 index 000000000..65bf0af1e --- /dev/null +++ b/doc/changes/0.2.rst @@ -0,0 +1,22 @@ +.. NOTE: we use cross-references to highlight new functions and classes. + Please follow the examples below, so the changelog page will have a link to + the function/class documentation. + +.. NOTE: there are 3 separate sections for changes, based on type: + - "Enhancements" for new features + - "Bugs" for bug fixes + - "API changes" for backward-incompatible changes + +.. NOTE: You can use the :pr:`xx` and :issue:`xx` role to x-ref to a GitHub PR + or issue from this project. + +.. include:: ./authors.inc + +Version 0.3 +=========== + +- Add functions for annotating and labeling ICA components in BIDS format :func:`mne_icalabel.annotation.write_components_tsv`, :func:`mne_icalabel.annotation.mark_component` (:pr:`60` by `Adam Li`_) +- Fix shape of ``'y_pred_proba'`` output from :func:`mne_icalabel.label_components` (:pr:`36` by `Mathieu Scheltienne`_) +- Add a warning if the ICA decomposition provided does not match the expected decomposition by ``ICLabel`` (:pr:`42` by `Mathieu Scheltienne`_) +- Fix extraction of PSD feature from ``ICLabel`` model on epochs by (:pr:`64` by `Mathieu Scheltienne`_) +- Fix ICLabel topographic features on ICA fitted with a channel selection performed by ``picks`` (:pr:`68` by `Mathieu Scheltienne`_) diff --git a/doc/changes/0.3.rst b/doc/changes/0.3.rst new file mode 100644 index 000000000..493bdc543 --- /dev/null +++ b/doc/changes/0.3.rst @@ -0,0 +1,21 @@ +.. NOTE: we use cross-references to highlight new functions and classes. + Please follow the examples below, so the changelog page will have a link to + the function/class documentation. + +.. NOTE: there are 3 separate sections for changes, based on type: + - "Enhancements" for new features + - "Bugs" for bug fixes + - "API changes" for backward-incompatible changes + +.. NOTE: You can use the :pr:`xx` and :issue:`xx` role to x-ref to a GitHub PR + or issue from this project. + +.. include:: ./authors.inc + +Version 0.3 +=========== + +- Adding an experimental GUI to facilitate the labeling of ICA components (:pr:`66` by `Adam Li`_ and `Mathieu Scheltienne`_) +- Improve test coverage and documentation (:pr:`94` by `Mathieu Scheltienne`_) +- Ignore the ``RuntimeWarning`` issued by the grid inteprolation for ICLabel topographic feature (:pr:`69` by `Mathieu Scheltienne`_) +- Add topographic feature using MNE with `~mne_icalabel.features.get_topomaps` (:pr:`71` by `Anand Saini`_ and `Mathieu Scheltienne`_) diff --git a/doc/changes/0.4.rst b/doc/changes/0.4.rst new file mode 100644 index 000000000..4740ee26e --- /dev/null +++ b/doc/changes/0.4.rst @@ -0,0 +1,18 @@ +.. NOTE: we use cross-references to highlight new functions and classes. + Please follow the examples below, so the changelog page will have a link to + the function/class documentation. + +.. NOTE: there are 3 separate sections for changes, based on type: + - "Enhancements" for new features + - "Bugs" for bug fixes + - "API changes" for backward-incompatible changes + +.. NOTE: You can use the :pr:`xx` and :issue:`xx` role to x-ref to a GitHub PR + or issue from this project. + +.. include:: ./authors.inc + +Version 0.4 +=========== + +- Add ``strict_label`` keyword argument to :func:`mne_icalabel.annotation.mark_component` to enable users to input labels that are not part of the accepted ICLabel key words (:pr:`101` by `Adam Li`_) diff --git a/doc/changes/authors.inc b/doc/changes/authors.inc new file mode 100644 index 000000000..445bb7509 --- /dev/null +++ b/doc/changes/authors.inc @@ -0,0 +1,4 @@ +.. _Adam Li: https://github.com/adam2392 +.. _Mathieu Scheltienne: https://github.com/mscheltienne +.. _Jacob Feitelberg: https://github.com/jacobf18 +.. _Anand Saini: https://github.com/anandsaini024 \ No newline at end of file diff --git a/doc/changes/index.rst b/doc/changes/index.rst new file mode 100644 index 000000000..d9a2557ae --- /dev/null +++ b/doc/changes/index.rst @@ -0,0 +1,10 @@ +Changelog +========= + +.. toctree:: + :titlesonly: + + latest.rst + 0.4.rst + 0.3.rst + 0.2.rst diff --git a/doc/changes/latest.rst b/doc/changes/latest.rst new file mode 100644 index 000000000..9eb6929b4 --- /dev/null +++ b/doc/changes/latest.rst @@ -0,0 +1,22 @@ +.. NOTE: we use cross-references to highlight new functions and classes. + Please follow the examples below, so the changelog page will have a link to + the function/class documentation. + +.. NOTE: there are 3 separate sections for changes, based on type: + - "Enhancements" for new features + - "Bugs" for bug fixes + - "API changes" for backward-incompatible changes + +.. NOTE: You can use the :pr:`xx` and :issue:`xx` role to x-ref to a GitHub PR + or issue from this project. + +.. include:: ./authors.inc + +.. _latest: + +Version 0.5 +=========== + +- Compatibility with MNE 1.6 (:pr:`136`, :pr:`140` by `Mathieu Scheltienne`_) +- Raise error if EEG channels are missing from the instance provided to ``ICLABEL`` (:pr:`124` by `Mathieu Scheltienne`_ and `Adam Li`_) +- Add ONNX backend support to ``ICLABEL`` (:pr:`129` by `Jacob Feitelberg`_) diff --git a/doc/changes/latest.rst.template b/doc/changes/latest.rst.template new file mode 100644 index 000000000..1c74fabf1 --- /dev/null +++ b/doc/changes/latest.rst.template @@ -0,0 +1,38 @@ +.. NOTE: we use cross-references to highlight new functions and classes. + Please follow the examples below, so the changelog page will have a link to + the function/class documentation. + +.. NOTE: there are 3 separate sections for changes, based on type: + - "Enhancements" for new features + - "Bugs" for bug fixes + - "API changes" for backward-incompatible changes + +.. NOTE: You can use the :pr:`xx` and :issue:`xx` role to x-ref to a GitHub PR + or issue from this project. + +.. include:: ./authors.inc + +.. _latest: + +Version x.x +=========== + +Enhancements +------------ + +- xxx + +Bugs +---- + +- xxx + +API and behavior changes +------------------------ + +- xxx + +Authors +------- + +* `Mathieu Scheltienne`_ diff --git a/doc/conf.py b/doc/conf.py index 3d3420fa3..957776803 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -91,6 +91,7 @@ # documentation. switcher_version_match = "dev" if release.endswith("dev0") else version html_theme_options = { + "check_switcher": True, "external_links": [{"name": "MNE", "url": "https://mne.tools/stable/index.html"}], "icon_links": [ dict( @@ -114,7 +115,7 @@ "show_toc_level": 1, "use_edit_page_button": False, "switcher": { - "json_url": "https://mne.tools/dev/_static/versions.json", + "json_url": "https://mne.tools/mne-icalabel/dev/_static/versions.json", "version_match": switcher_version_match, }, } @@ -131,6 +132,9 @@ # -- autosummary ------------------------------------------------------------- autosummary_generate = True +# -- autosectionlabels ------------------------------------------------------- +autosectionlabel_prefix_document = True + # -- autodoc ----------------------------------------------------------------- autoclass_content = "class" autodoc_typehints = "none" diff --git a/doc/index.rst b/doc/index.rst index 81f6d19f3..549a2240b 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -31,7 +31,7 @@ Contents :maxdepth: 2 :caption: Getting started: - whats_new install api generated/examples/index + changes/index diff --git a/doc/install.rst b/doc/install.rst index 42ca35e37..d6bbf6a5e 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -3,17 +3,11 @@ Installation ============ -``mne-icalabel`` requires Python ``3.8`` or higher. +``mne-icalabel`` requires Python ``3.9`` or higher. Dependencies ------------ -* ``mne`` (>=1.1) -* ``numpy`` (>=1.21) -* ``scipy`` (>=1.2.0) -* ``pooch`` (for example dataset access) -* ``torch`` (for running pytorch neural networks) - ``mne-icalabel`` works best with the latest stable release of MNE-Python. To ensure MNE-Python is up-to-date, see `MNE installation instructions `_. @@ -33,9 +27,9 @@ Methods The installers create a conda environment with the entire MNE-ecosystem setup, and more! - .. tab-item:: Pypi + .. tab-item:: PyPI - ``mne-icalabel`` is available on `Pypi `_ and can be + ``mne-icalabel`` is available on `PyPI `_ and can be installed in a given environment via ``pip``. .. code-block:: bash diff --git a/doc/make.bat b/doc/make.bat index 79c1e1984..954237b9b 100644 --- a/doc/make.bat +++ b/doc/make.bat @@ -1,242 +1,35 @@ -@ECHO OFF - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -set I18NSPHINXOPTS=%SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items - echo. xml to make Docutils-native XML files - echo. pseudoxml to make pseudoxml-XML files for display purposes - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - - -%SPHINXBUILD% 2> nul -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\project-template.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\project-template.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdf" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf - cd %BUILDDIR%/.. - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdfja" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf-ja - cd %BUILDDIR%/.. - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) - -if "%1" == "xml" ( - %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The XML files are in %BUILDDIR%/xml. - goto end -) - -if "%1" == "pseudoxml" ( - %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. - goto end -) - -:end +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/doc/whats_new.rst b/doc/whats_new.rst deleted file mode 100644 index 7f60bb892..000000000 --- a/doc/whats_new.rst +++ /dev/null @@ -1,46 +0,0 @@ -:orphan: - -.. _whats_new: - - -What's new? -=========== - -Here we list a changelog of MNE-ICALabel. - -.. contents:: Contents - :local: - :depth: 3 - -.. currentmodule:: mne_icalabel - -.. _current: - -Version 0.5 (unreleased) ------------------------- - -... - -Enhancements -~~~~~~~~~~~~ - -- - -Bug -~~~ - -- - -API -~~~ - -- - -Authors -~~~~~~~ - -* - -:doc:`Find out what was new in previous releases ` - -.. include:: authors.inc diff --git a/doc/whats_new_previous_releases.rst b/doc/whats_new_previous_releases.rst deleted file mode 100644 index 08f3d2280..000000000 --- a/doc/whats_new_previous_releases.rst +++ /dev/null @@ -1,117 +0,0 @@ -:orphan: - -.. _whats_new_in_previous_releases: - -.. currentmodule:: mne_icalabel - -What was new in previous releases? -================================== - -Version 0.4 (08/23/2022) ------------------------- - -Short release for the JOSS paper. Minor enhancements to BIDS pipeline and bug fixes to code. -See here for review: https://github.com/openjournals/joss-reviews/issues/4484. - -Enhancements -~~~~~~~~~~~~ - -- Add ``strict_label`` keyword argument to :func:`mne_icalabel.annotation.mark_component` to enable users to input labels that are not part of the accepted ICLabel key words, by `Adam Li`_ (:pr:`101`) - -Bug -~~~ - -- - -API -~~~ - -- - -Authors -~~~~~~~ - -* `Adam Li`_ - -Version 0.3 (08/10/2022) ------------------------- - -This new version adds an experimental GUI for annotating ICA components. Please test it out if you find -it useful in your workflow! Moreover, we consolidated our testing suite and improved overall coverage -and added some bug fixes. We also created a function to extract topomap features from fitted ICA instances. - -Enhancements -~~~~~~~~~~~~ - -- Adding a GUI to facilitate the labeling of ICA components by `Adam Li`_ and `Mathieu Scheltienne`_ (:pr:`66`) -- Improve test coverage and documentation by `Mathieu Scheltienne`_ (:pr:`94`) - -Bug -~~~ - -- Ignore the ``RuntimeWarning`` issued by the grid inteprolation for ICLabel topographic feature by `Mathieu Scheltienne`_ (:pr:`69`) - -API -~~~ - -- Add topographic feature using MNE with `~mne_icalabel.features.get_topomaps` by `Anand Saini`_ and `Mathieu Scheltienne`_ (:pr:`71`) - -Authors -~~~~~~~ - -* `Mathieu Scheltienne`_ -* `Anand Saini`_ -* `Adam Li`_ - -Version 0.2 (06/30/2022) ------------------------- - -This includes series of bug fixes to the ICLabel ported model. In addition, we have -added an experimental feature for helping add ICA component annotations to BIDS-derivative for EEG format. - -Enhancements -~~~~~~~~~~~~ - -- Add functions for annotating and labeling ICA components in BIDS format :func:`mne_icalabel.annotation.write_components_tsv`, :func:`mne_icalabel.annotation.mark_component` by `Adam Li`_ (:pr:`60`) - -Bug -~~~ - -- Fix shape of ``'y_pred_proba'`` output from :func:`mne_icalabel.label_components` by `Mathieu Scheltienne`_ (:pr:`36`) -- Add a warning if the ICA decomposition provided does not match the expected decomposition by ``ICLabel`` by `Mathieu Scheltienne`_ (:pr:`42`) -- Fix extraction of PSD feature from ``ICLabel`` model on epochs by `Mathieu Scheltienne`_ (:pr:`64`) -- Fix ICLabel topographic features on ICA fitted with a channel selection performed by ``picks`` by `Mathieu Scheltienne`_ (:pr:`68`) - -API -~~~ - -- - -Authors -~~~~~~~ - -* `Mathieu Scheltienne`_ -* `Adam Li`_ - -Version 0.1 (2022-05-03) ------------------------- - -This is the first version of mne-icalabel that is released. This package -consists of a replica of the ICLabel network and pipeline present in EEGLAB -for automatically predicting the label of an ICA component and whether it -is brain signal, or noise. - -We integrated our API on top of MNE-Python and provide a lightweight example -demonstrating how to use the ICLabel network. - -Authors -~~~~~~~ - -People who contributed to this release (in alphabetical order): - -* `Adam Li`_ -* `Jacob Feitelberg`_ -* `Anand Saini`_ -* `Mathieu Scheltienne`_ - -.. include:: authors.inc