Skip to content

Auto outside pkg - #2370

Merged
eteq merged 9 commits into
astropy:masterfrom
eteq:auto-outside-pkg
Apr 28, 2014
Merged

eteq merged 9 commits into
astropy:masterfrom
eteq:auto-outside-pkg

Conversation

@eteq

@eteq eteq commented Apr 25, 2014

Copy link
Copy Markdown
Member

At the request of @ChrisBeaumont, I've re-written the part of #1801 that allows using automodapi to document things that are not actually in the package you're documenting.

This is useful for "namespace modules", e.g., where you have something like:

implementation1.py
implementation2.py
namespace.py

where namespace.py is something like:

from implementation1 import *
from implementation2 import *

If you just do .. automodapi:: namespace in master, nothing will appear, because implementation1 and implementation2 members aren't included. But after this, if you do:

.. automodapi:: namespace
    :allowed-package-names: implementation1, implementation2

Anything that's acutally in implementation1 will show up on the module summary.

@ChrisBeaumont

Copy link
Copy Markdown

I finally had a chance to test this out, and it's great! Thanks for putting this together.

@eteq

eteq commented Apr 25, 2014

Copy link
Copy Markdown
Member Author

Note that the sphinx build failed, but because of an unrelated problem in master (fixed in 8d45943)

@embray embray added this to the v0.4.0 milestone Apr 28, 2014
@embray

embray commented Apr 28, 2014

Copy link
Copy Markdown
Member

Sounds good to me. Just as a reminder to myself, this will have to be pulled into astropy-helpers as well. But it should also be here for backward-compatibility.

@eteq

eteq commented Apr 28, 2014

Copy link
Copy Markdown
Member Author

I'm going to rebase this against master just to make sure the sphinx build passes against the latest master, and if so I'll merge this, then.

@eteq

eteq commented Apr 28, 2014

Copy link
Copy Markdown
Member Author

Hmm, an interesting quirk of Travis that I had not noticed before: If you use [ci skip], apparently it will skip even if you later rebase. So I'll just put in a quick no-op commit to get travis to run.

@eteq

eteq commented Apr 28, 2014

Copy link
Copy Markdown
Member Author

Alright, it's now actually passing, so merging!

eteq added a commit that referenced this pull request Apr 28, 2014
Allow automodapi to document objects not in the package being documented
@eteq
eteq merged commit 45dff5a into astropy:master Apr 28, 2014
@eteq
eteq deleted the auto-outside-pkg branch April 28, 2014 21:17
astrofrog pushed a commit to astropy/sphinx-automodapi that referenced this pull request Jan 27, 2018
Allow automodapi to document objects not in the package being documented
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants