Repository navigation
Documentation updates and testing #1038
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
Merged
murrayrm
merged 15 commits into
python-control:main
from
murrayrm:doc-comment_fixes-11May2024
Aug 13, 2024
Merged
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e01c580
small updates to comments + remove obsolete Pending
murrayrm f078b3e
docstring updates for nyquist_plot
murrayrm 4838bbf
add unit test for testing documentation
murrayrm b767e52
change check_kwargs to _check_kwargs and disable docstring check
murrayrm 3697afa
improve docstrings unit test for deprecation, seq args; skip duplicates
murrayrm a59184c
add hashes for positional arguments
murrayrm 4d9f57d
update intersphinx URL for SciPy
murrayrm 7f48535
update docstrings to fix missing arguments, incorrect format
murrayrm 8fcf0b7
make deprecration warnings consistent (as FutureWarning)
murrayrm 4ef9dd6
update docstring text for new functions
murrayrm 806e5b3
add test for multiple copies of argument documentation
murrayrm 122c405
update docstring position arg hash to include source + docstring
murrayrm fb2086c
address @slivingston review comments
murrayrm a201504
filter known FutureWarning's from unit tests
murrayrm c3ea6dc
add back missing image examples/vehicle-steering.png
murrayrm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -207,11 +207,12 @@ def suptitle( | |||||
| title, fig=None, frame='axes', **kwargs): | ||||||
| """Add a centered title to a figure. | ||||||
|
|
||||||
| This function is deprecated. Use :func:`ControlPlot.set_plot_title`. | ||||||
| .. deprecated:: 0.10.1 | ||||||
| Use :func:`ControlPlot.set_plot_title`. | ||||||
|
|
||||||
| """ | ||||||
| warnings.warn( | ||||||
| "suptitle is deprecated; use cplt.set_plot_title", FutureWarning) | ||||||
| "suptitle() is deprecated; use cplt.set_plot_title()", FutureWarning) | ||||||
| _update_plot_title( | ||||||
| title, fig=fig, frame=frame, use_existing=False, **kwargs) | ||||||
|
|
||||||
|
|
@@ -220,6 +221,10 @@ def suptitle( | |||||
| def get_plot_axes(line_array): | ||||||
| """Get a list of axes from an array of lines. | ||||||
|
|
||||||
| .. deprecated:: 0.10.1 | ||||||
| This function will be removed in a future version of python-control. | ||||||
| Use `cplt.axes` to obtain axes for a control plot `cplt`. | ||||||
|
|
||||||
| This function can be used to return the set of axes corresponding | ||||||
| to the line array that is returned by `time_response_plot`. This | ||||||
| is useful for generating an axes array that can be passed to | ||||||
|
|
@@ -242,7 +247,8 @@ def get_plot_axes(line_array): | |||||
| Only the first element of each array entry is used to determine the axes. | ||||||
|
|
||||||
| """ | ||||||
| warnings.warn("get_plot_axes is deprecated; use cplt.axes", FutureWarning) | ||||||
| warnings.warn( | ||||||
| "get_plot_axes() is deprecated; use cplt.axes()", FutureWarning) | ||||||
| _get_axes = np.vectorize(lambda lines: lines[0].axes) | ||||||
| if isinstance(line_array, ControlPlot): | ||||||
| return _get_axes(line_array.lines) | ||||||
|
|
@@ -268,6 +274,9 @@ def pole_zero_subplots( | |||||
| Scaling to apply to the subplots. | ||||||
| fig : :class:`matplotlib.figure.Figure` | ||||||
| Figure to use for creating subplots. | ||||||
| rcParams : dict | ||||||
| Override the default parameters used for generating plots. | ||||||
| Default is set up config.default['freqplot.rcParams']. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| Returns | ||||||
| ------- | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though
get_plot_axes()is defined in the same module (ctrlplot) asControlPlot, it is available at the top of the package ascontrol.get_plot_axes(), so a user may not realize thatcpltabbreviates the new classControlPlot. E.g., observe howget_plot_axes()is shown at https://python-control.readthedocs.io/en/0.10.0/generated/control.get_plot_axes.html.Therefore, I recommend to be explicit here when referring to the class
ControlPlot.