Title: Updated documentation by murrayrm · Pull Request #1094 · python-control/python-control · GitHub
Open Graph Title: Updated documentation by murrayrm · Pull Request #1094 · python-control/python-control
X Title: Updated documentation by murrayrm · Pull Request #1094 · python-control/python-control
Description: This (very large) PR contains a restructuring of the Sphinx documentation, including changes to improve uniformity of docstrings along with draft guidelines for developers. This is being posted initially as a draft PR so that people can start to have a look at the changes and provide feedback. High level principles: No documentation has been removed, only shifted around. With a few small exceptions, to fix up inconsistencies, there are no changes to the code base and all previous code will run without change. Because of the large number of files changed, this PR will probably be very difficult to review based on looking at the changes to individual files. It will probably make more sense to look through the updated version of the documentation on ReadTheDocs. Summary of significant changes: Sphinx documentation is now divided into a User Guide, which provides a narrative style description of python-control package, and a Reference Manual, which has a listing of all functions, classes, package configuraton parameters, and other detailed information about the package. Control plots included in the documentation are generated by the code in the documentation, using the Sphinx doctest extension. Figures are created using the make doctest command in the doc/ directory (called automatically when make html is run). Regularized the way that classes, functions, methods, parameters, built-ins, and code samples are annotated and created a custom.css file to control HTML formatting: Classes, functions, methods, and parameters use single backticks, with no additional directives, and are treated using the py:obj directive. For classes, functions, and methods, this will generate a link using bold, code font. For parameters, non-bold text is used (since Sphinx does not yet support links to parameter documentation). Code samples use double backticks and are rendered in non-bold, black, fixed width font (versus the default red color). Python built-ins (True, False, None) are written with no backticks. This was previously very non-uniform, and this style fits what is commonly used in the NumPy documentation. Moved the Control Systems Classes chapter to the Reference Manual and added all classes in the package (previous it was just the I/O system classes). Added a new chapter Package Configuration Parameters to the Reference Manual, with documentation on everything available via ct.config.defaults (and a unit test to make sure nothing is missing). Added a new chapter Developer Notes to the reference manual that describes the various choices that were made in making the package structure and documentation uniform. Sections in the chapter: Package Structure: how the package is organized (directories, files) Naming Conventions: how to name files, classes, functions, etc Documentation Guidelines: how to document various types of objects, including consistent use of backticks (with rationale), as well a description of what goes in the User Guide vs Reference Manual chapters. Utility Functions: a relatively incomplete listing of some of the more common utility functions for developers. Sample Files: template.py and template.rst that implement the guidelines. Got rid of docstring hashes for functions with variable arguments and instead used docstring signatures as a replacement for checking that parameters are documented. Added numpydoc checks in control/tests/docstring_test.py to pick up things like improperly labeled sections (e.g., "See also" instead of "See Also") and other errors. Moved documentation from __init__ docstrings (which is not included in the Sphinx documentation) to class documentation (with details in the factory function, when appropriate). Moved documentation examples files to doc/examples and documentation figures to doc/figures to declutter the doc directory (this accounts for many of the 226 files that have changed). [26 Jan 2025] Added Release Notes providing a (user-oriented) summary of changes in recent releases (with a summary of earlier releases). Release notes are contained in doc/releases. Smaller changes: Added Sphinx unit test (doc/test_sphinx) to make sure all primary functions are documented in the Reference Manual. Updated file header information to be a standard form, shown in examples/template.py. Removed top-level class dependence on object Removed (unused) table in matlab/__init__ and replaced with doc/matlab.rst (part of Reference Manual) Ran isort -m2 on all files to sort imports. Improved consistency checking in control/tests/docstring_test.py unit test checks: All function and parameter summaries now start with a capital letter and end with a period. Added checking docstring format of "Returns" section, in addition to "Parameters". Remove excess spaces throughout the package (since all files were touched). Equations are now centered in Sphinx, instead of left justified. Small code changes: Renamed acker to place_acker (to be consistent with place_varga) and set acker = place_acker. Identified source code lines that were more than 79 characters and reformatted (PEP 8). [25 Jan 2025] The NamedSignal class now has a __repr__ method that evaluates back to a NamedSignal (similar to the InputOutputSystem __repr__ method). Additional changes that are coming: Regularize frequency response arguments/return vals: (fresp, freqpts) Regularize timebase documentation ('dt' format + wording) Make sure all MATLAB functions are documented in Reference Manual Get rid of numbered notes (just use paragraphs) Remove all remaining .. todo::'s Fix additional typos and grammatical inconsistencies
Open Graph Description: This (very large) PR contains a restructuring of the Sphinx documentation, including changes to improve uniformity of docstrings along with draft guidelines for developers. This is being posted in...
X Description: This (very large) PR contains a restructuring of the Sphinx documentation, including changes to improve uniformity of docstrings along with draft guidelines for developers. This is being posted in...
Opengraph URL: https://github.com/python-control/python-control/pull/1094
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:8e022ca1-39fb-3396-68ca-865e0bf640d6 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 9628:191A63:201E2AC:2B0D379:697AB4EA |
| html-safe-nonce | 6421d548f789763e8940af4aa3e91d47d4e907b2a81a2c36390868170114381b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjI4OjE5MUE2MzoyMDFFMkFDOjJCMEQzNzk6Njk3QUI0RUEiLCJ2aXNpdG9yX2lkIjoiMjgyMTA3MjI2MTM4MzYzMjEwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e516516bb7eea1b76887fa5f774ba53e95688b4aa755db6ee60c84d67ae88e4a |
| hovercard-subject-tag | pull_request:2273043075 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/1094/checks |
| twitter:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| og:image:alt | This (very large) PR contains a restructuring of the Sphinx documentation, including changes to improve uniformity of docstrings along with draft guidelines for developers. This is being posted in... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 33acda8ebf71b04c9d33b494d2b6e0db48193ec89eb3ad92a9539d491fa9a3da |
| turbo-cache-control | no-cache |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4f714a84d3384e467839505ed65f968fc01aedf1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width