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

autodoc support packages #3384

Closed
szlinjia opened this issue Feb 2, 2017 · 2 comments
Closed

autodoc support packages #3384

szlinjia opened this issue Feb 2, 2017 · 2 comments

Comments

@szlinjia
Copy link

szlinjia commented Feb 2, 2017

Subject: autodoc support packages

Problem

  • I currently working on a project with tons of python files. I used autodoc extension to extract docstring from each file. But I don't want sphinx generate html from rst file for each module. Because this project is being added/removed/modified files everyday by multiple persons. Maintaining rst file for each module would be painful for the project is changing frequently. Is that a way that I can only add the package name to some special directive like "automodule: :" so the autodoc will automatically scan all files under the package and generate html ?
    For example, my project structure is like this:
package1/                            Top-level package
      __init__.py                    Initialize the package1 
      submodule1/                    Subpackage for submodule1
              __init__.py
              f1.py
              f2py
              ...
      submodule2/                    Subpackage for submodule2
              __init__.py
              f1.py
              f2.py
              ...

And I only need to modify the index.rst in this way:

.. automodule:: package1
    :members:

I had tried to auto doc with a package name. But it looks like sphinx doesn't work for submodule under the package.

###Environment info

  • OS: CentOS release 6.4
  • Python version: python2.7
  • Sphinx version: v1.5.3+

Any thoughts?

@tk0miya
Copy link
Member

tk0miya commented Feb 3, 2017

How about sphinx.ext.autosummary?
http://www.sphinx-doc.org/en/1.5.1/ext/autosummary.html

@tk0miya
Copy link
Member

tk0miya commented Feb 11, 2017

Now I close this issue because it's not a bug of Sphinx.
Please feel free to reopen if needed.

@tk0miya tk0miya closed this as completed Feb 11, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants