相关疑难解决方法(0)

将sphinx autodoc用于fabfile

是否可以使用Sphinx autodoc从函数docstrings生成我的fabfile文档?

例如,对于包含setup_development我尝试过的任务的fabfile :

.. automodule::fabfile
   :members:
   .. autofunction:: setup_development
Run Code Online (Sandbox Code Playgroud)

但没有产生任何东西.

fabfile片段:

@task
def setup_development(remote='origin', branch='development'):
    """Setup your development environment.

    * Checkout development branch & pull updates from remote
    * Install required python packages
    * Symlink development settings
    * Sync and migrate database
    * Build HTML Documentation and open in web browser

    Args:
        remote: Name of remote git repository. Default: 'origin'.
        branch: Name of your development branch. Default: 'development'.
    """
    <code>
Run Code Online (Sandbox Code Playgroud)

python fabric python-sphinx autodoc

6
推荐指数
1
解决办法
1723
查看次数

标签 统计

autodoc ×1

fabric ×1

python ×1

python-sphinx ×1