Skip to content

Conversation

@leotrs
Copy link
Contributor

@leotrs leotrs commented Aug 14, 2020

List of Changes

  • Add the numpydoc extension to sphinx. Now all our docstrings written in numpy style will not generate warnings.
  • numpydoc automatically includes the autosummary extension.
  • the line autosummary_generate = True has been added to docs/source/conf.py. This will make autosummary generate files whenever needed. Accordingly, the files docs/source/config.rst, docs/source/mobject.rst, docs/source/geometry.rst are no longer needed (a similar --and better-- version is generated by autosummary).
    -- the autogenerated files are put in docs/source/_autogenerated/. This folder should be kept outside of version control.

Motivation

The previous setup required to manually create a stub page for each module, each including just boilerplate code. With the new setup, the autosummary extension does that on its own.

Explanation for Changes

The autosummary extension seeks out any autosummary directives in each document and generates new files as needed. The new files are put in source/_autosummary. The name of this folder may be changed later.

Testing Status

All tests pass locally.

Further Comments

I realized that the numpydoc extension was not installed/included in our sphinx setup. Once I added it, numpydoc included autosummary, and I realized we could use it to streamline our setup. Once this PR is merged, I'll go back to what I was actually trying to do with numpydoc...

Acknowledgement

@leotrs leotrs merged commit 4cc014c into master Aug 14, 2020
@leotrs leotrs deleted the sphinx-stuff branch August 14, 2020 15: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.

4 participants