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

DM-14782: Replace astropy_helpers with sphinx-automodapi and improve Sphinx configurations for stack documentation #36

Merged
merged 10 commits into from
Jun 29, 2018

Conversation

jonathansick
Copy link
Member

@jonathansick jonathansick commented Jun 15, 2018

Various improvements to the configuration for LSST Stack-based documentation projects (documenteer.sphinxconf.stackconf):

  • Replaced the third-party astropy_helpers package with the numpydoc and sphinx-automodapi packages. This helps reduce the number of extraneous dependencies needed for Stack documentation.

  • Special methods (dunder methods) are now included in API documentation (autodoc_default_flags includes special-members).

  • autoclass_content is now "class", fitting the LSST DM standards for writing class docstrings, and not filling out __init__ docstrings.

  • Removed h5py from intersphinx since it was never needed.

  • Removed the viewcode extension since that won't scale well with the LSST codebase. Ultimately we want to link to source on GitHub.

  • Other internal cleanups for documenteer.sphinxconf.stackconf.

Fixes #26 and #27

This attribute is expected by sphinx.cmd.build.handle_exception.
Use the patch_docutils context added with Sphinx 1.7.
Refactoring build_package_configs should make it easier to reuse
configurations for the primary Sphinx build in pipelines_lsst_io.
Turns out that h5py is not used in the stack, so there's no need to add
it to intersphinx.
Instead of obtaining numpydoc and automodapi through astropy_helpers,
this allows us to get that code directly through their standalone
packages. This is made possible by Astropy's recent moves to break up
astropy_helpers into smaller sub-dependencies.
This will make the doc build smaller since we're not rendering the
entire source code base. Ideally we want to link to the source code on
GitHub, but this will need extra work to resolve which Git repo a given
API comes from.
@jonathansick jonathansick changed the title DM-14782: Improve Sphinx configurations for stack documentation DM-14782: Replace astropy_helpers with sphinx-automodapi and improve Sphinx configurations for stack documentation Jun 15, 2018
The autodoc_default_flags configuration allows us to set default flags
for all autodoc directives that are created by automodapi.
special-members is the important flag.

Set autoclass_content = class. This enforces the LSST DM policy of not
writing in the __init__ docstring.

Disable the `inherited-members` flag. This didn't work will with the
lsst.verify documentation. The code comments and DM-14782 ticket have
additional descritpions.
python, numpy, scipy, and matplotlib switched to https from http
protocols.
This function works like build_package_configs but is specifically
intended to configure the pipelines_lsst_io main documentation package.
This pattern lets us share configurations between pipelines_lsst_io
"stack" builds and the per-package builds.
@jonathansick jonathansick merged commit efba06f into master Jun 29, 2018
@jonathansick jonathansick deleted the tickets/DM-14782 branch February 5, 2019 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant