Skip to content

Commit

Permalink
Standardize the autodoc directives.
Browse files Browse the repository at this point in the history
  • Loading branch information
FredLoney committed Feb 19, 2015
1 parent d4a40fc commit a94512e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
8 changes: 0 additions & 8 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,15 @@ API Documentation
:mod:`hierarchy`
----------------
.. automodule:: qidicom.hierarchy
:members:
:show-inheritance:

:mod:`meta`
-----------
.. automodule:: qidicom.meta
:members:
:show-inheritance:

:mod:`reader`
-------------
.. automodule:: qidicom.reader
:members:
:show-inheritance:

:mod:`writer`
-------------
.. automodule:: qidicom.writer
:members:
:show-inheritance:
15 changes: 15 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo']
autoclass_content = "both"
autodoc_default_flags= ['members', 'show-inheritance']
source_suffix = '.rst'
master_doc = 'index'
project = u'qidicom'
Expand All @@ -11,3 +12,17 @@
pygments_style = 'sphinx'
htmlhelp_basename = 'qidicomdoc'
html_title = "qidicom v%s" % version


def skip(app, what, name, obj, skip, options):
"""
@return False if the name is __init__ or *skip* is set, True otherwise
"""
return skip and name is not "__init__"


def setup(app):
"""
Directs autodoc to call :meth:`skip` to determine whether to skip a member.
"""
app.connect("autodoc-skip-member", skip)
10 changes: 3 additions & 7 deletions qidicom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

__version__ = '2.2.1'
"""
The one-based major.minor.patch version.
The version numbering scheme loosely follows http://semver.org/.
The major version is incremented when a significant feature
set is introduced. The minor version is incremented when there
is a functionality change. The patch version is incremented when
there is a refactoring or bug fix. All major, minor and patch
version numbers begin at 1.
The one-based major.minor.patch version based on the
`Fast and Loose Versioning <https://gist.github.com/FredLoney/6d946112e0b0f2fc4b57>`_
scheme. Minor and patch version numbers begin at 1.
"""

0 comments on commit a94512e

Please sign in to comment.