[Docs] Autogenerate module docs with apidoc

* Add sphinx-apidoc to setup.py build_docs
This commit is contained in:
bendikro 2016-05-11 15:47:31 +02:00 committed by Calum Lind
parent b6b1d40516
commit 5713ff09f4
12 changed files with 13 additions and 1109 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
*~
build
dist
docs/source/modules
*egg-info
*.egg
*.log

View File

@ -48,10 +48,8 @@ class Mock(object):
else:
return Mock()
MOCK_MODULES = ['deluge.ui.languages', 'deluge.ui.countries', 'deluge.ui.gtkui.gtkui', 'deluge._libtorrent',
'libtorrent', 'psyco', 'rencode',
'twisted.web', 'twisted.web.client', 'twisted.web.error',
'win32file', 'win32event', 'win32gui', 'win32api', 'win32con', '_winreg',
MOCK_MODULES = ['deluge.ui.gtkui.gtkui', 'deluge._libtorrent',
'libtorrent', 'psyco',
'pygtk', "gtk", "gobject", "gtk.gdk", "pango", "cairo", "pangocairo", "chardet"]
for mod_name in MOCK_MODULES:

View File

@ -1,102 +0,0 @@
deluge.core package
===================
Submodules
----------
deluge.core.alertmanager module
-------------------------------
.. automodule:: deluge.core.alertmanager
:members:
:undoc-members:
:show-inheritance:
deluge.core.authmanager module
------------------------------
.. automodule:: deluge.core.authmanager
:members:
:undoc-members:
:show-inheritance:
deluge.core.core module
-----------------------
.. automodule:: deluge.core.core
:members:
:undoc-members:
:show-inheritance:
deluge.core.daemon module
-------------------------
.. automodule:: deluge.core.daemon
:members:
:undoc-members:
:show-inheritance:
deluge.core.eventmanager module
-------------------------------
.. automodule:: deluge.core.eventmanager
:members:
:undoc-members:
:show-inheritance:
deluge.core.filtermanager module
--------------------------------
.. automodule:: deluge.core.filtermanager
:members:
:undoc-members:
:show-inheritance:
deluge.core.pluginmanager module
--------------------------------
.. automodule:: deluge.core.pluginmanager
:members:
:undoc-members:
:show-inheritance:
deluge.core.preferencesmanager module
-------------------------------------
.. automodule:: deluge.core.preferencesmanager
:members:
:undoc-members:
:show-inheritance:
deluge.core.rpcserver module
----------------------------
.. automodule:: deluge.core.rpcserver
:members:
:undoc-members:
:show-inheritance:
deluge.core.torrent module
--------------------------
.. automodule:: deluge.core.torrent
:members:
:undoc-members:
:show-inheritance:
deluge.core.torrentmanager module
---------------------------------
.. automodule:: deluge.core.torrentmanager
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: deluge.core
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,30 +0,0 @@
deluge.plugins package
======================
Submodules
----------
deluge.plugins.init module
--------------------------
.. automodule:: deluge.plugins.init
:members:
:undoc-members:
:show-inheritance:
deluge.plugins.pluginbase module
--------------------------------
.. automodule:: deluge.plugins.pluginbase
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: deluge.plugins
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,159 +0,0 @@
deluge package
==============
Subpackages
-----------
.. toctree::
deluge.core
deluge.plugins
deluge.ui
Submodules
----------
deluge.bencode module
---------------------
.. automodule:: deluge.bencode
:members:
:undoc-members:
:show-inheritance:
deluge.common module
--------------------
.. automodule:: deluge.common
:members:
:undoc-members:
:show-inheritance:
deluge.component module
-----------------------
.. automodule:: deluge.component
:members:
:undoc-members:
:show-inheritance:
deluge.config module
--------------------
.. automodule:: deluge.config
:members:
:undoc-members:
:show-inheritance:
deluge.configmanager module
---------------------------
.. automodule:: deluge.configmanager
:members:
:undoc-members:
:show-inheritance:
deluge.decorators module
------------------------
.. automodule:: deluge.decorators
:members:
:undoc-members:
:show-inheritance:
deluge.error module
-------------------
.. automodule:: deluge.error
:members:
:undoc-members:
:show-inheritance:
deluge.event module
-------------------
.. automodule:: deluge.event
:members:
:undoc-members:
:show-inheritance:
deluge.httpdownloader module
----------------------------
.. automodule:: deluge.httpdownloader
:members:
:undoc-members:
:show-inheritance:
deluge.log module
-----------------
.. automodule:: deluge.log
:members:
:undoc-members:
:show-inheritance:
deluge.main module
------------------
.. automodule:: deluge.main
:members:
:undoc-members:
:show-inheritance:
deluge.maketorrent module
-------------------------
.. automodule:: deluge.maketorrent
:members:
:undoc-members:
:show-inheritance:
deluge.metafile module
----------------------
.. automodule:: deluge.metafile
:members:
:undoc-members:
:show-inheritance:
deluge.path_chooser_common module
---------------------------------
.. automodule:: deluge.path_chooser_common
:members:
:undoc-members:
:show-inheritance:
deluge.pluginmanagerbase module
-------------------------------
.. automodule:: deluge.pluginmanagerbase
:members:
:undoc-members:
:show-inheritance:
deluge.rencode module
---------------------
.. automodule:: deluge.rencode
:members:
:undoc-members:
:show-inheritance:
deluge.transfer module
----------------------
.. automodule:: deluge.transfer
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: deluge
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,166 +0,0 @@
deluge.ui.console.commands package
==================================
Submodules
----------
deluge.ui.console.commands.add module
-------------------------------------
.. automodule:: deluge.ui.console.commands.add
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.cache module
---------------------------------------
.. automodule:: deluge.ui.console.commands.cache
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.config module
----------------------------------------
.. automodule:: deluge.ui.console.commands.config
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.connect module
-----------------------------------------
.. automodule:: deluge.ui.console.commands.connect
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.debug module
---------------------------------------
.. automodule:: deluge.ui.console.commands.debug
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.gui module
-------------------------------------
.. automodule:: deluge.ui.console.commands.gui
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.halt module
--------------------------------------
.. automodule:: deluge.ui.console.commands.halt
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.help module
--------------------------------------
.. automodule:: deluge.ui.console.commands.help
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.info module
--------------------------------------
.. automodule:: deluge.ui.console.commands.info
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.manage module
----------------------------------------
.. automodule:: deluge.ui.console.commands.manage
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.move module
--------------------------------------
.. automodule:: deluge.ui.console.commands.move
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.pause module
---------------------------------------
.. automodule:: deluge.ui.console.commands.pause
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.plugin module
----------------------------------------
.. automodule:: deluge.ui.console.commands.plugin
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.quit module
--------------------------------------
.. automodule:: deluge.ui.console.commands.quit
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.recheck module
-----------------------------------------
.. automodule:: deluge.ui.console.commands.recheck
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.resume module
----------------------------------------
.. automodule:: deluge.ui.console.commands.resume
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.rm module
------------------------------------
.. automodule:: deluge.ui.console.commands.rm
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.status module
----------------------------------------
.. automodule:: deluge.ui.console.commands.status
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commands.update-tracker module
------------------------------------------------
.. automodule:: deluge.ui.console.commands.update_tracker
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: deluge.ui.console.commands
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,134 +0,0 @@
deluge.ui.console.modes package
===============================
Submodules
----------
deluge.ui.console.modes.add_util module
---------------------------------------
.. automodule:: deluge.ui.console.modes.add_util
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.addtorrents module
------------------------------------------
.. automodule:: deluge.ui.console.modes.addtorrents
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.alltorrents module
------------------------------------------
.. automodule:: deluge.ui.console.modes.alltorrents
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.basemode module
---------------------------------------
.. automodule:: deluge.ui.console.modes.basemode
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.column module
-------------------------------------
.. automodule:: deluge.ui.console.modes.column
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.connectionmanager module
------------------------------------------------
.. automodule:: deluge.ui.console.modes.connectionmanager
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.eventview module
----------------------------------------
.. automodule:: deluge.ui.console.modes.eventview
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.format_utils module
-------------------------------------------
.. automodule:: deluge.ui.console.modes.format_utils
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.input_popup module
------------------------------------------
.. automodule:: deluge.ui.console.modes.input_popup
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.legacy module
-------------------------------------
.. automodule:: deluge.ui.console.modes.legacy
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.popup module
------------------------------------
.. automodule:: deluge.ui.console.modes.popup
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.preference_panes module
-----------------------------------------------
.. automodule:: deluge.ui.console.modes.preference_panes
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.preferences module
------------------------------------------
.. automodule:: deluge.ui.console.modes.preferences
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.torrent_actions module
----------------------------------------------
.. automodule:: deluge.ui.console.modes.torrent_actions
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.modes.torrentdetail module
--------------------------------------------
.. automodule:: deluge.ui.console.modes.torrentdetail
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: deluge.ui.console.modes
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,62 +0,0 @@
deluge.ui.console package
=========================
Subpackages
-----------
.. toctree::
deluge.ui.console.commands
deluge.ui.console.modes
Submodules
----------
deluge.ui.console.colors module
-------------------------------
.. automodule:: deluge.ui.console.colors
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.commander module
----------------------------------
.. automodule:: deluge.ui.console.commander
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.eventlog module
---------------------------------
.. automodule:: deluge.ui.console.eventlog
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.main module
-----------------------------
.. automodule:: deluge.ui.console.main
:members:
:undoc-members:
:show-inheritance:
deluge.ui.console.statusbars module
-----------------------------------
.. automodule:: deluge.ui.console.statusbars
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: deluge.ui.console
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,294 +0,0 @@
deluge.ui.gtkui package
=======================
Submodules
----------
deluge.ui.gtkui.aboutdialog module
----------------------------------
.. automodule:: deluge.ui.gtkui.aboutdialog
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.addtorrentdialog module
---------------------------------------
.. automodule:: deluge.ui.gtkui.addtorrentdialog
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.common module
-----------------------------
.. automodule:: deluge.ui.gtkui.common
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.connectionmanager module
----------------------------------------
.. automodule:: deluge.ui.gtkui.connectionmanager
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.createtorrentdialog module
------------------------------------------
.. automodule:: deluge.ui.gtkui.createtorrentdialog
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.details_tab module
----------------------------------
.. automodule:: deluge.ui.gtkui.details_tab
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.dialogs module
------------------------------
.. automodule:: deluge.ui.gtkui.dialogs
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.edittrackersdialog module
-----------------------------------------
.. automodule:: deluge.ui.gtkui.edittrackersdialog
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.files_tab module
--------------------------------
.. automodule:: deluge.ui.gtkui.files_tab
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.filtertreeview module
-------------------------------------
.. automodule:: deluge.ui.gtkui.filtertreeview
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.gtkui module
----------------------------
.. automodule:: deluge.ui.gtkui.gtkui
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.ipcinterface module
-----------------------------------
.. automodule:: deluge.ui.gtkui.ipcinterface
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.listview module
-------------------------------
.. automodule:: deluge.ui.gtkui.listview
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.mainwindow module
---------------------------------
.. automodule:: deluge.ui.gtkui.mainwindow
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.menubar module
------------------------------
.. automodule:: deluge.ui.gtkui.menubar
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.menubar_osx module
----------------------------------
.. automodule:: deluge.ui.gtkui.menubar_osx
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.new_release_dialog module
-----------------------------------------
.. automodule:: deluge.ui.gtkui.new_release_dialog
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.notification module
-----------------------------------
.. automodule:: deluge.ui.gtkui.notification
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.options_tab module
----------------------------------
.. automodule:: deluge.ui.gtkui.options_tab
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.path_chooser module
-----------------------------------
.. automodule:: deluge.ui.gtkui.path_chooser
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.path_combo_chooser module
-----------------------------------------
.. automodule:: deluge.ui.gtkui.path_combo_chooser
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.peers_tab module
--------------------------------
.. automodule:: deluge.ui.gtkui.peers_tab
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.piecesbar module
--------------------------------
.. automodule:: deluge.ui.gtkui.piecesbar
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.pluginmanager module
------------------------------------
.. automodule:: deluge.ui.gtkui.pluginmanager
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.preferences module
----------------------------------
.. automodule:: deluge.ui.gtkui.preferences
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.queuedtorrents module
-------------------------------------
.. automodule:: deluge.ui.gtkui.queuedtorrents
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.removetorrentdialog module
------------------------------------------
.. automodule:: deluge.ui.gtkui.removetorrentdialog
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.sidebar module
------------------------------
.. automodule:: deluge.ui.gtkui.sidebar
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.status_tab module
---------------------------------
.. automodule:: deluge.ui.gtkui.status_tab
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.statusbar module
--------------------------------
.. automodule:: deluge.ui.gtkui.statusbar
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.systemtray module
---------------------------------
.. automodule:: deluge.ui.gtkui.systemtray
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.toolbar module
------------------------------
.. automodule:: deluge.ui.gtkui.toolbar
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.torrentdetails module
-------------------------------------
.. automodule:: deluge.ui.gtkui.torrentdetails
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.torrentview module
----------------------------------
.. automodule:: deluge.ui.gtkui.torrentview
:members:
:undoc-members:
:show-inheritance:
deluge.ui.gtkui.torrentview_data_funcs module
---------------------------------------------
.. automodule:: deluge.ui.gtkui.torrentview_data_funcs
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: deluge.ui.gtkui
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,95 +0,0 @@
deluge.ui package
=================
Subpackages
-----------
.. toctree::
deluge.ui.console
deluge.ui.gtkui
deluge.ui.web
Submodules
----------
deluge.ui.Win32IconImagePlugin module
-------------------------------------
.. automodule:: deluge.ui.Win32IconImagePlugin
:members:
:undoc-members:
:show-inheritance:
deluge.ui.client module
-----------------------
.. automodule:: deluge.ui.client
:members:
:undoc-members:
:show-inheritance:
deluge.ui.common module
-----------------------
.. automodule:: deluge.ui.common
:members:
:undoc-members:
:show-inheritance:
deluge.ui.coreconfig module
---------------------------
.. automodule:: deluge.ui.coreconfig
:members:
:undoc-members:
:show-inheritance:
deluge.ui.countries module
--------------------------
.. automodule:: deluge.ui.countries
:members:
:undoc-members:
:show-inheritance:
deluge.ui.languages module
--------------------------
.. automodule:: deluge.ui.languages
:members:
:undoc-members:
:show-inheritance:
deluge.ui.sessionproxy module
-----------------------------
.. automodule:: deluge.ui.sessionproxy
:members:
:undoc-members:
:show-inheritance:
deluge.ui.tracker_icons module
------------------------------
.. automodule:: deluge.ui.tracker_icons
:members:
:undoc-members:
:show-inheritance:
deluge.ui.ui module
-------------------
.. automodule:: deluge.ui.ui
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: deluge.ui
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,62 +0,0 @@
deluge.ui.web package
=====================
Submodules
----------
deluge.ui.web.auth module
-------------------------
.. automodule:: deluge.ui.web.auth
:members:
:undoc-members:
:show-inheritance:
deluge.ui.web.common module
---------------------------
.. automodule:: deluge.ui.web.common
:members:
:undoc-members:
:show-inheritance:
deluge.ui.web.json_api module
-----------------------------
.. automodule:: deluge.ui.web.json_api
:members:
:undoc-members:
:show-inheritance:
deluge.ui.web.pluginmanager module
----------------------------------
.. automodule:: deluge.ui.web.pluginmanager
:members:
:undoc-members:
:show-inheritance:
deluge.ui.web.server module
---------------------------
.. automodule:: deluge.ui.web.server
:members:
:undoc-members:
:show-inheritance:
deluge.ui.web.web module
------------------------
.. automodule:: deluge.ui.web.web
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: deluge.ui.web
:members:
:undoc-members:
:show-inheritance:

View File

@ -60,6 +60,15 @@ class PyTest(_test):
sys.exit(errcode)
class BuildDocs(BuildDoc):
description = 'Build the documentation'
def run(self):
print("Generating module documentation...")
os.system('sphinx-apidoc --force -o docs/source/modules/ deluge deluge/plugins')
BuildDoc.run(self)
class BuildWebUI(cmd.Command):
description = 'Minify WebUI files'
@ -310,7 +319,7 @@ cmdclass = {
'build_webui': BuildWebUI,
'build_trans': BuildTranslations,
'build_plugins': BuildPlugins,
'build_docs': BuildDoc,
'build_docs': BuildDocs,
'install_data': InstallData,
'clean_plugins': CleanPlugins,
'clean': Clean,