|
20 | 20 |
|
21 | 21 | import sphinx_gallery
|
22 | 22 | from sphinx_gallery.sorting import FileNameSortKey
|
23 |
| -import sphinx_bootstrap_theme |
24 |
| -from numpydoc import numpydoc, docscrape # noqa |
25 |
| -import sphinx_fontawesome |
| 23 | +from numpydoc import docscrape |
26 | 24 | import mne
|
27 | 25 | from mne.utils import linkcode_resolve # noqa, analysis:ignore
|
28 | 26 |
|
|
45 | 43 | # If your documentation needs a minimal Sphinx version, state it here.
|
46 | 44 | needs_sphinx = '1.5'
|
47 | 45 |
|
48 |
| -# XXX This hack defines what extra methods numpydoc will document |
49 |
| -docscrape.ClassDoc.extra_public_methods = mne.utils._doc_special_members |
50 |
| - |
51 | 46 | # Add any Sphinx extension module names here, as strings. They can be
|
52 | 47 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
53 | 48 |
|
|
64 | 59 | 'sphinx_fontawesome',
|
65 | 60 | 'numpydoc',
|
66 | 61 | 'gen_commands',
|
| 62 | + 'sphinx_bootstrap_theme', |
67 | 63 | ]
|
68 | 64 |
|
69 | 65 | linkcheck_ignore = [
|
|
176 | 172 | ],
|
177 | 173 | }
|
178 | 174 |
|
179 |
| -# Add any paths that contain custom themes here, relative to this directory. |
180 |
| -html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() |
181 |
| - |
182 | 175 | # The name for this set of Sphinx documents. If None, it defaults to
|
183 | 176 | # "<project> v<release> documentation".
|
184 | 177 | #html_title = None
|
|
308 | 301 | 'dipy': ('http://nipy.org/dipy', None),
|
309 | 302 | }
|
310 | 303 |
|
| 304 | +############################################################################## |
| 305 | +# sphinx-gallery |
| 306 | + |
311 | 307 | examples_dirs = ['../examples', '../tutorials']
|
312 | 308 | gallery_dirs = ['auto_examples', 'auto_tutorials']
|
313 | 309 |
|
@@ -386,4 +382,113 @@ def reset_warnings(gallery_conf, fname):
|
386 | 382 | 'within_subsection_order': FileNameSortKey,
|
387 | 383 | }
|
388 | 384 |
|
| 385 | +############################################################################## |
| 386 | +# numpydoc |
| 387 | + |
| 388 | +# XXX This hack defines what extra methods numpydoc will document |
| 389 | +docscrape.ClassDoc.extra_public_methods = mne.utils._doc_special_members |
389 | 390 | numpydoc_class_members_toctree = False
|
| 391 | +numpydoc_xref_param_type = True |
| 392 | +numpydoc_xref_aliases = { |
| 393 | + 'None': ':data:`python:None`', |
| 394 | + 'bool': ':ref:`bool <python:bltin-boolean-values>`', |
| 395 | + 'boolean': ':ref:`bool <python:bltin-boolean-values>`', |
| 396 | + 'True': ':data:`python:True`', |
| 397 | + 'False': ':data:`python:False`', |
| 398 | + 'list': ':class:`python:list`', |
| 399 | + 'tuple': ':class:`python:tuple`', |
| 400 | + 'str': ':class:`python:str`', |
| 401 | + 'string': ':class:`python:str`', |
| 402 | + 'dict': ':class:`python:dict`', |
| 403 | + 'float': ':class:`python:float`', |
| 404 | + 'int': ':class:`python:int`', |
| 405 | + 'callable': ':func:`callable <python:callable>`', |
| 406 | + 'iterable': ':term:`python:iterable`', |
| 407 | + 'contextmanager': ':func:`python:contextlib.contextmanager`', |
| 408 | + 'namedtuple': ':func:`python:collections.namedtuple`', |
| 409 | + 'generator': ':term:`python:generator`', |
| 410 | + # NumPy |
| 411 | + 'array': '~numpy.ndarray', |
| 412 | + 'ndarray': '~numpy.ndarray', |
| 413 | + 'np.ndarray': '~numpy.ndarray', |
| 414 | + 'array-like': ':term:`numpy:array_like`', |
| 415 | + 'array_like': ':term:`numpy:array_like`', |
| 416 | + 'scalar': ':ref:`scalar <numpy:arrays.scalars>`', |
| 417 | + 'RandomState': '~numpy.random.RandomState', |
| 418 | + 'np.random.RandomState': '~numpy.random.RandomState', |
| 419 | + 'np.inf': ':data:`~numpy.inf`', |
| 420 | + # 'numpy': ':mod:`numpy`', |
| 421 | + # Matplotlib |
| 422 | + 'colormap': ':doc:`colormap <matplotlib:tutorials/colors/colormaps>`', |
| 423 | + 'color': ':doc:`color <matplotlib:api/colors_api>`', |
| 424 | + 'collection': ':doc:`collections <matplotlib:api/collections_api>`', |
| 425 | + 'Axes': '~matplotlib.axes.Axes', |
| 426 | + 'Figure': '~matplotlib.figure.Figure', |
| 427 | + 'Axes3D': '~mpl_toolkits.mplot3d.axes3d.Axes3D', |
| 428 | + # Mayavi |
| 429 | + 'mayavi.mlab.Figure': 'mayavi.core.api.Scene', |
| 430 | + 'mlab.Figure': 'mayavi.core.api.Scene', |
| 431 | + # sklearn |
| 432 | + 'LeaveOneOut': '~sklearn.model_selection.LeaveOneOut', |
| 433 | + 'sklearn.model_selection': ':mod:`sklearn.model_selection`', |
| 434 | + # nibabel |
| 435 | + 'Nifti1Image': '~nibabel.nifti1.Nifti1Image', |
| 436 | + 'Nifti2Image': '~nibabel.nifti2.Nifti2Image', |
| 437 | + # MNE |
| 438 | + 'Label': '~mne.Label', 'Forward': '~mne.Forward', 'Evoked': '~mne.Evoked', |
| 439 | + 'Info': '~mne.Info', 'SourceSpaces': '~mne.SourceSpaces', |
| 440 | + 'Epochs': '~mne.Epochs', 'Layout': '~mne.channels.Layout', |
| 441 | + 'EvokedArray': '~mne.EvokedArray', 'BiHemiLabel': '~mne.BiHemiLabel', |
| 442 | + 'AverageTFR': '~mne.time_frequency.AverageTFR', |
| 443 | + 'EpochsTFR': '~mne.time_frequency.EpochsTFR', |
| 444 | + 'Raw': '~mne.io.Raw', 'ICA': '~mne.preprocessing.ICA', |
| 445 | + 'Covariance': '~mne.Covariance', 'Annotations': '~mne.Annotations', |
| 446 | + 'Montage': '~mne.channels.Montage', |
| 447 | + 'DigMontage': '~mne.channels.DigMontage', |
| 448 | + 'VectorSourceEstimate': '~mne.VectorSourceEstimate', |
| 449 | + 'VolSourceEstimate': '~mne.VolSourceEstimate', |
| 450 | + 'MixedSourceEstimate': '~mne.MixedSourceEstimate', |
| 451 | + 'SourceEstimate': '~mne.SourceEstimate', 'Projection': '~mne.Projection', |
| 452 | + 'ConductorModel': '~mne.bem.ConductorModel', |
| 453 | + 'Dipole': '~mne.Dipole', 'DipoleFixed': '~mne.DipoleFixed', |
| 454 | + 'InverseOperator': '~mne.minimum_norm.InverseOperator', |
| 455 | + 'CrossSpectralDensity': '~mne.time_frequency.CrossSpectralDensity', |
| 456 | + 'RtEpochs': '~mne.realtime.RtEpochs', |
| 457 | + 'SourceMorph': '~mne.SourceMorph', |
| 458 | + 'Xdawn': '~mne.preprocessing.Xdawn', |
| 459 | + 'Report': '~mne.Report', 'Forward': '~mne.Forward', |
| 460 | + 'TimeDelayingRidge': '~mne.decoding.TimeDelayingRidge', |
| 461 | + 'Vectorizer': '~mne.decoding.Vectorizer', |
| 462 | + 'UnsupervisedSpatialFilter': '~mne.decoding.UnsupervisedSpatialFilter', |
| 463 | + 'TemporalFilter': '~mne.decoding.TemporalFilter', |
| 464 | + 'Scaler': '~mne.decoding.Scaler', 'SPoC': '~mne.decoding.SPoC', |
| 465 | + 'PSDEstimator': '~mne.decoding.PSDEstimator', |
| 466 | + 'LinearModel': '~mne.decoding.LinearModel', |
| 467 | + 'FilterEstimator': '~mne.decoding.FilterEstimator', |
| 468 | + 'EMS': '~mne.decoding.EMS', 'CSP': '~mne.decoding.CSP', |
| 469 | + 'Beamformer': '~mne.beamformer.Beamformer', |
| 470 | +} |
| 471 | +numpydoc_xref_ignore = { |
| 472 | + # words |
| 473 | + 'instance', 'instances', 'of', 'default', 'shape', 'or', |
| 474 | + 'with', 'length', 'pair', 'matplotlib', 'optional', 'kwargs', 'in', |
| 475 | + 'dtype', 'object', 'self.verbose', |
| 476 | + # shapes |
| 477 | + 'n_vertices', 'n_faces', 'n_channels', 'm', 'n', 'n_events', 'n_colors', |
| 478 | + 'n_times', 'obj', 'n_chan', 'n_epochs', 'n_picks', 'n_ch_groups', |
| 479 | + 'n_dipoles', 'n_ica_components', 'n_pos', 'n_node_names', 'n_tapers', |
| 480 | + 'n_signals', 'n_step', 'n_freqs', 'wsize', 'Tx', 'M', 'N', 'p', 'q', |
| 481 | + 'n_observations', 'n_regressors', 'n_cols', 'n_frequencies', 'n_tests', |
| 482 | + 'n_samples', 'n_permutations', 'nchan', 'n_points', 'n_features', |
| 483 | + 'n_parts', 'n_features_new', 'n_components', 'n_labels', 'n_events_in', |
| 484 | + 'n_splits', 'n_scores', 'n_outputs', 'n_trials', 'n_estimators', 'n_tasks', |
| 485 | + 'nd_features', 'n_classes', 'n_targets', 'n_slices', 'n_hpi', 'n_fids', |
| 486 | + 'n_elp', 'n_pts', 'n_tris', |
| 487 | + # Undocumented (on purpose) |
| 488 | + 'RawKIT', 'RawEximia', 'RawEGI', 'RawEEGLAB', 'RawEDF', 'RawCTF', 'RawBTi', |
| 489 | + 'RawBrainVision', |
| 490 | + # sklearn subclasses |
| 491 | + 'mapping', 'to', 'any', |
| 492 | + # unlinkable |
| 493 | + 'mayavi.mlab.pipeline.surface', |
| 494 | +} |
0 commit comments