FIX apidoc generation
This commit is contained in:
parent
3e0ea06172
commit
354842841c
4 changed files with 28 additions and 168 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,3 +10,4 @@ larigira.db_*
|
|||
*.json
|
||||
.coverage
|
||||
*.db
|
||||
doc/source/api/larigira.rst
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
larigira.dbadmin package
|
||||
========================
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: larigira.dbadmin
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -1,157 +0,0 @@
|
|||
larigira package
|
||||
================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
|
||||
larigira.dbadmin
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
larigira.audiogen module
|
||||
------------------------
|
||||
|
||||
.. automodule:: larigira.audiogen
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.audiogen_mpdrandom module
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: larigira.audiogen_mpdrandom
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.audiogen_randomdir module
|
||||
----------------------------------
|
||||
|
||||
.. automodule:: larigira.audiogen_randomdir
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.audiogen_script module
|
||||
-------------------------------
|
||||
|
||||
.. automodule:: larigira.audiogen_script
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.audiogen_static module
|
||||
-------------------------------
|
||||
|
||||
.. automodule:: larigira.audiogen_static
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.config module
|
||||
----------------------
|
||||
|
||||
.. automodule:: larigira.config
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.entrypoints_utils module
|
||||
---------------------------------
|
||||
|
||||
.. automodule:: larigira.entrypoints_utils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.event module
|
||||
---------------------
|
||||
|
||||
.. automodule:: larigira.event
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.event_manage module
|
||||
----------------------------
|
||||
|
||||
.. automodule:: larigira.event_manage
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.eventutils module
|
||||
--------------------------
|
||||
|
||||
.. automodule:: larigira.eventutils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.forms module
|
||||
---------------------
|
||||
|
||||
.. automodule:: larigira.forms
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.larigira module
|
||||
------------------------
|
||||
|
||||
.. automodule:: larigira.larigira
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.mpc module
|
||||
-------------------
|
||||
|
||||
.. automodule:: larigira.mpc
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.rpc module
|
||||
-------------------
|
||||
|
||||
.. automodule:: larigira.rpc
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.timeform_single module
|
||||
-------------------------------
|
||||
|
||||
.. automodule:: larigira.timeform_single
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.timegen module
|
||||
-----------------------
|
||||
|
||||
.. automodule:: larigira.timegen
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
larigira.timegen_every module
|
||||
-----------------------------
|
||||
|
||||
.. automodule:: larigira.timegen_every
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: larigira
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
|
@ -49,7 +50,7 @@ master_doc = 'index'
|
|||
|
||||
# General information about the project.
|
||||
project = 'larigira'
|
||||
copyright = '2015, boyska'
|
||||
copyright = '2015-2016, boyska'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
|
@ -261,3 +262,28 @@ texinfo_documents = [
|
|||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
|
||||
def run_apidoc(_):
|
||||
cur_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
proj_dir = os.path.abspath(os.path.join(cur_dir, '..', '..'))
|
||||
modules = ['larigira']
|
||||
exclude_files = [os.path.abspath(os.path.join(proj_dir, excl))
|
||||
for excl in ('larigira/rpc.py', 'larigira/dbadmin/')]
|
||||
for module in modules:
|
||||
output_path = os.path.join(cur_dir, 'api')
|
||||
cmd_path = 'sphinx-apidoc'
|
||||
if hasattr(sys, 'real_prefix'): # Are we in a virtualenv?
|
||||
# assemble the path manually
|
||||
cmd_path = os.path.abspath(os.path.join(sys.prefix,
|
||||
'bin',
|
||||
'sphinx-apidoc'))
|
||||
subprocess.check_call([cmd_path,
|
||||
'--force',
|
||||
'-o', output_path,
|
||||
module
|
||||
] + exclude_files)
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.connect('builder-inited', run_apidoc)
|
||||
|
|
Loading…
Reference in a new issue