Skip to content

Fix sphinx warnings and use readthedocs theme for local doc generation#297

Merged
murrayrm merged 6 commits intopython-control:masterfrom
murrayrm:sphinx-fix-errors
May 18, 2019
Merged

Fix sphinx warnings and use readthedocs theme for local doc generation#297
murrayrm merged 6 commits intopython-control:masterfrom
murrayrm:sphinx-fix-errors

Conversation

@murrayrm
Copy link
Copy Markdown
Member

This PR fixes up some warnings that were being generated by sphinx and changes the default theme used for generated the documentation on a local machine to match the ReadTheDocs theme that is used online (handy so that you know what things will look like when rendered on ReadTheDocs).

In fixing up one of the warning messages in statesp.py, I also took the opportunity to update other docstrings to be numpydoc compatible.

@roryyorke
Copy link
Copy Markdown
Contributor

Looks fine to me.

It's probably not important, but FYI: with Python 3.7 and Sphinx 2.0.1, the only python-sphinx variant I tried, I get this warning when building docs:

/home/rory/src/python-control/doc/generated/control.frd.rst: WARNING: document isn't included in any toctree

@murrayrm
Copy link
Copy Markdown
Member Author

Thought I found the problem (a stray "frd" in matlab.rst instead of "FRD"), but turns out the problem was more subtle:

On MacOS (where I usually work), the file system is "case preserving" but not "case sensitive". This is a problem when you have two functions with the same name but different case. In the control package, there is a class FRD and a function frd. These conflict with each other in the generated/ subdirectory.

There was an error that was getting masked by this effect: in the documentation, we need to reference both FRD (when referring to the class) and frd (when referring to the function). The reference to the function in the "system creation" portion of the manual was FRD when it should have been frd. I've fixed that here, but it does cause a problem compiling the documentation on MacOS.

@roryyorke Can you check to see if this fix works for you (on windows or linux, I assume).

@roryyorke
Copy link
Copy Markdown
Contributor

No more warning due to FRD/frd, and I can see both control.frd and control.FRD in the generated docs.

@murrayrm murrayrm merged commit c0092e0 into python-control:master May 18, 2019
@murrayrm murrayrm deleted the sphinx-fix-errors branch May 18, 2019 16:41
@murrayrm murrayrm added this to the 0.8.3 milestone Jan 4, 2020
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.

2 participants