Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Enhance documentation #208

Merged
merged 21 commits into from
Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ htmlcov/
.cache/
.pytest_cache/
doc/auto_examples/*
doc/generated/*
16 changes: 16 additions & 0 deletions doc/_templates/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:mod:`{{module}}`.{{objname}}
{{ underline }}==============

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:undoc-members:
:inherited-members:
:special-members: __init__

.. include:: {{module}}.{{objname}}.examples

.. raw:: html

<div style='clear:both'></div>
15 changes: 15 additions & 0 deletions doc/_templates/module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:mod:`{{module}}` module
{{ underline }}==============

.. currentmodule:: {{ module }}

.. automodule:: metric_learn.base_metric
:members:
:undoc-members:
:show-inheritance:

.. include:: {{module}}.examples

.. raw:: html

<div style='clear:both'></div>
14 changes: 14 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import sys
import os

extensions = [
'sphinx.ext.autodoc',
Expand Down Expand Up @@ -50,3 +51,16 @@
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
'scikit-learn': ('https://scikit-learn.org/stable/', None)
}


# sphinx-gallery configuration
sphinx_gallery_conf = {
# to generate mini-galleries at the end of each docstring in the API
# section: (see https://sphinx-gallery.github.io/configuration.html
# #references-to-examples)
'doc_module': 'metric_learn',
'backreferences_dir': os.path.join('generated'),
}

# generate autosummary even if no references
autosummary_generate = True
7 changes: 0 additions & 7 deletions doc/metric_learn.base_metric.rst

This file was deleted.

7 changes: 0 additions & 7 deletions doc/metric_learn.constraints.rst

This file was deleted.

22 changes: 0 additions & 22 deletions doc/metric_learn.covariance.rst

This file was deleted.

28 changes: 0 additions & 28 deletions doc/metric_learn.itml.rst

This file was deleted.

31 changes: 0 additions & 31 deletions doc/metric_learn.lfda.rst

This file was deleted.

34 changes: 0 additions & 34 deletions doc/metric_learn.lmnn.rst

This file was deleted.

28 changes: 0 additions & 28 deletions doc/metric_learn.lsml.rst

This file was deleted.

28 changes: 0 additions & 28 deletions doc/metric_learn.mlkr.rst

This file was deleted.

28 changes: 0 additions & 28 deletions doc/metric_learn.mmc.rst

This file was deleted.

29 changes: 0 additions & 29 deletions doc/metric_learn.nca.rst

This file was deleted.

28 changes: 0 additions & 28 deletions doc/metric_learn.rca.rst

This file was deleted.