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

Auto outside pkg #2370

Merged
merged 9 commits into from Apr 28, 2014
Merged

Auto outside pkg #2370

merged 9 commits into from Apr 28, 2014

Conversation

eteq
Copy link
Member

@eteq eteq commented Apr 25, 2014

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

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

@eteq
Copy link
Member Author

eteq commented Apr 25, 2014

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
Copy link
Member

embray commented Apr 28, 2014

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
Copy link
Member Author

eteq commented Apr 28, 2014

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
Copy link
Member Author

eteq commented Apr 28, 2014

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
Copy link
Member Author

eteq commented Apr 28, 2014

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.

None yet

3 participants