Skip to content

Commit

Permalink
fix path issue for unit testing
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmerk committed Aug 16, 2023
1 parent bd063bb commit 9d46478
Show file tree
Hide file tree
Showing 13 changed files with 206 additions and 280 deletions.
7 changes: 7 additions & 0 deletions docs/source/_templates/custom-class-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:inherited-members:
67 changes: 67 additions & 0 deletions docs/source/_templates/custom-module-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}

{% block attributes %}
{% if attributes %}
.. rubric:: Module Attributes

.. autosummary::
:toctree:
{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:toctree:
:nosignatures:
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:toctree:
:template: custom-class-template.rst
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
:toctree:
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block modules %}
{% if modules %}
.. rubric:: Modules

.. autosummary::
:toctree:
:template: custom-module-template.rst
:recursive:
{% for item in modules %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
36 changes: 36 additions & 0 deletions docs/source/api_documentation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
API Documentation
=================

Parametrization
---------------

.. toctree::
:maxdepth: 4

nm_settings
nm_run_analysis
nm_resample
nm_normalization
nm_rereference
nm_projection
nm_IO

Feature Estimation
------------------

.. toctree::
:maxdepth: 4

nm_oscillatory
nm_kalmanfilter
nm_hjorth_raw
nm_sharpwaves

Analysis
--------

.. toctree::
:maxdepth: 4

nm_analysis
nm_decode
14 changes: 14 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
]

source_suffix = ['.rst', '.md', ]

autosummary_generate = True

sphinx_gallery_conf = {
Expand All @@ -63,3 +64,16 @@
html_theme = "pydata_sphinx_theme"
html_static_path = ['_static']


# -- Intersphinx configuration -----------------------------------------------

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable", None),
"scipy": ("https://docs.scipy.org/doc/scipy", None),
"matplotlib": ("https://matplotlib.org/stable", None),
"numba": ("https://numba.readthedocs.io/en/latest", None),
"mne": ("https://mne.tools/stable", None),
"pandas" : ("https://pandas.pydata.org/docs", None),
}

5 changes: 2 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ Have a look at the :ref:`motivation<introduction>` and :ref:`installation`!
installation
usage
examples
api_documentation

.. toctree::
:maxdepth: 1
:caption: Code Documentation

outline_parametrization
outline_featureestimation
outline_analysis
api_documentation

Indices and tables
==================
Expand Down
2 changes: 1 addition & 1 deletion docs/source/nm_analysis.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
nm_analysis.py
=============
==============

.. automodule:: nm_analysis.Feature_Reader
:members:
Loading

0 comments on commit 9d46478

Please sign in to comment.