Skip to content

Commit

Permalink
Merge pull request #2 from IanCa/develop
Browse files Browse the repository at this point in the history
Add alternate api.rst
  • Loading branch information
IanCa authored Jan 11, 2023
2 parents 53a8e99 + b40bbd4 commit 92ba027
Show file tree
Hide file tree
Showing 21 changed files with 116 additions and 971 deletions.
32 changes: 32 additions & 0 deletions docs/source/_templates/custom-class-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:show-inheritance:
:inherited-members:

{% block methods %}
.. automethod:: __init__

{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
{% for item in methods %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Attributes') }}

.. autosummary::
{% for item in attributes %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
66 changes: 66 additions & 0 deletions docs/source/_templates/custom-module-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{{ 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:
{% 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 %}
17 changes: 17 additions & 0 deletions docs/source/api2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
HED API reference (Auto style)
========================

.. currentmodule:: hed

.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst
:recursive:

errors
models
schema
tools
validator


10 changes: 0 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@


sys.path.insert(0, os.path.abspath('../../'))
# sys.path.insert(0, os.path.abspath('../../hed'))
# sys.path.insert(0, os.path.abspath('../../hed/models'))
# sys.path.insert(0, os.path.abspath('../../hed/schema'))
sys.path.insert(0, os.path.abspath('../../hed/tools/'))
# sys.path.insert(0, os.path.abspath('../../hed/tools/analysis'))
# sys.path.insert(0, os.path.abspath('../../hed/tools/bids'))
# sys.path.insert(0, os.path.abspath('../../hed/tools/remodeling'))
# sys.path.insert(0, os.path.abspath('../../hed/tools/remodeling/cli'))
# sys.path.insert(0, os.path.abspath('../../hed/tools/remodeling/operations'))
# sys.path.insert(0, os.path.abspath('../../hed/validators'))

# -- Project information -----------------------------------------------------
project = 'HED Python'
Expand Down
173 changes: 0 additions & 173 deletions docs/source/generated/hed.models.rst

This file was deleted.

22 changes: 0 additions & 22 deletions docs/source/generated/hed.rst

This file was deleted.

This file was deleted.

Loading

0 comments on commit 92ba027

Please sign in to comment.