Skip to content

Commit

Permalink
updated documentation for 1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-kulkarni committed Jun 5, 2021
1 parent 179cc8d commit 7380088
Show file tree
Hide file tree
Showing 31 changed files with 1,315 additions and 719 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## A Hierarchical Resampling Package for Python

Version 0.4
Version 1.0

hierarch is a package for hierarchical resampling (bootstrapping, permutation) of datasets in Python. Because for loops are ultimately intrinsic to cluster-aware resampling, hierarch uses Numba to accelerate many of its key functions.

Expand Down
33 changes: 33 additions & 0 deletions docs/_templates/custom-class-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:show-inheritance:
:inherited-members:
:special-members: __call__, __add__, __mul__

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

.. autosummary::
{% for item in methods %}
{%- if not item.startswith('_') %}
~{{ name }}.{{ item }}
{%- endif -%}
{%- 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/_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:
:nosignatures:
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

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

.. autosummary::
:toctree:
:template: custom-class-template.rst
:nosignatures:
{% 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 %}
.. autosummary::
:toctree:
:template: custom-module-template.rst
:recursive:
{% for item in modules %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
10 changes: 9 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx_rtd_theme", "numpydoc", "sphinx.ext.autodoc"]
extensions = [
"sphinx_rtd_theme",
"numpydoc",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
]

autosummary_generate = True # Turn on sphinx.ext.autosummary
numpydoc_show_class_members = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
25 changes: 25 additions & 0 deletions docs/reference/_autosummary/hierarch.power.DataSimulator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
hierarch.power.DataSimulator
============================

.. currentmodule:: hierarch.power

.. autoclass:: DataSimulator
:members:
:show-inheritance:
:inherited-members:
:special-members: __call__, __add__, __mul__



.. rubric:: Methods

.. autosummary::

~DataSimulator.fit
~DataSimulator.generate






32 changes: 32 additions & 0 deletions docs/reference/_autosummary/hierarch.power.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
hierarch.power
==============

.. automodule:: hierarch.power











.. rubric:: Classes

.. autosummary::
:toctree:
:template: custom-class-template.rst
:nosignatures:

DataSimulator









25 changes: 25 additions & 0 deletions docs/reference/_autosummary/hierarch.resampling.Bootstrapper.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
hierarch.resampling.Bootstrapper
================================

.. currentmodule:: hierarch.resampling

.. autoclass:: Bootstrapper
:members:
:show-inheritance:
:inherited-members:
:special-members: __call__, __add__, __mul__



.. rubric:: Methods

.. autosummary::

~Bootstrapper.fit
~Bootstrapper.transform






25 changes: 25 additions & 0 deletions docs/reference/_autosummary/hierarch.resampling.Permuter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
hierarch.resampling.Permuter
============================

.. currentmodule:: hierarch.resampling

.. autoclass:: Permuter
:members:
:show-inheritance:
:inherited-members:
:special-members: __call__, __add__, __mul__



.. rubric:: Methods

.. autosummary::

~Permuter.fit
~Permuter.transform






33 changes: 33 additions & 0 deletions docs/reference/_autosummary/hierarch.resampling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
hierarch.resampling
===================

.. automodule:: hierarch.resampling











.. rubric:: Classes

.. autosummary::
:toctree:
:template: custom-class-template.rst
:nosignatures:

Bootstrapper
Permuter









Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hierarch.stats.confidence\_interval
===================================

.. currentmodule:: hierarch.stats

.. autofunction:: confidence_interval
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hierarch.stats.linear\_regression\_test
=======================================

.. currentmodule:: hierarch.stats

.. autofunction:: linear_regression_test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hierarch.stats.multi\_sample\_test
==================================

.. currentmodule:: hierarch.stats

.. autofunction:: multi_sample_test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hierarch.stats.preprocess\_data
===============================

.. currentmodule:: hierarch.stats

.. autofunction:: preprocess_data
37 changes: 37 additions & 0 deletions docs/reference/_autosummary/hierarch.stats.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
hierarch.stats
==============

.. automodule:: hierarch.stats







.. rubric:: Functions

.. autosummary::
:toctree:
:nosignatures:

confidence_interval
linear_regression_test
multi_sample_test
preprocess_data
studentized_covariance
two_sample_test
welch_statistic













Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hierarch.stats.studentized\_covariance
======================================

.. currentmodule:: hierarch.stats

.. autofunction:: studentized_covariance
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hierarch.stats.two\_sample\_test
================================

.. currentmodule:: hierarch.stats

.. autofunction:: two_sample_test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hierarch.stats.welch\_statistic
===============================

.. currentmodule:: hierarch.stats

.. autofunction:: welch_statistic
13 changes: 8 additions & 5 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
Reference
=========

.. toctree::

stats.rst
power.rst
resampling.rst
.. autosummary::
:toctree: _autosummary
:template: custom-module-template.rst
:recursive:

hierarch.stats
hierarch.power
hierarch.resampling
5 changes: 0 additions & 5 deletions docs/reference/power.rst

This file was deleted.

Loading

0 comments on commit 7380088

Please sign in to comment.