astropy / package-template

Template for packages that use Astropy. Maintainer: @astrofrog
http://docs.astropy.org/projects/package-template/en/latest/
Other
60 stars 63 forks source link

Sphinx automodapi broken? #430

Closed bmorris3 closed 4 years ago

bmorris3 commented 4 years ago

I just recently created a package using the package template and tried to run python setup.py build_docs, and also tried building docs on RTD, and in both cases automodapi does not build the API documentation, it just generates a blank page. Am I doing something wrong, or is something wrong with the package template, or might there be a problem with automodapi?

Thanks!

pllim commented 4 years ago

Your log says you couldn't find batman. Doesn't seem related to automodapi.

https://readthedocs.org/projects/kelp/builds/9648330/

🦇

bmorris3 commented 4 years ago

Here's a build where the batman fix is implemented, but automodapi doesn't seem to kick in:

https://readthedocs.org/projects/kelp/builds/9659655/

pllim commented 4 years ago

Are you sure you ask RTD to install automodapi? I don't see any trace of it being installed in your log. https://readthedocs.org/api/v2/build/9659655.txt

pllim commented 4 years ago

So, I guess, either there is a misconfiguration in your RTD admin settings, or whatever in the template is not playing well with RTD anymore... :thinking:

bmorris3 commented 4 years ago

I think I've found the problem. This line seems to squelch any imported classes/functions in the lines that follow it. By removing the __all__ = [] line, I get successful docs builds...

bmorris3 commented 4 years ago

Upon looking at the latest version of the package-template, I think this bug is resolved in some recent commits, so I'm going to close this issue, but not before leaving a little note to future Issue searchers: if you're running into bugs with an older version of the package-template, be mindful of the __all__ floating around in the repo/package/__init__.py file!