GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Documentation updates by murrayrm · Pull Request #633 · python-control/python-control

Conversation

@murrayrm

@murrayrm murrayrm commented Jun 13, 2021

Copy link
Copy Markdown
Member

This PR updates the documentation to resolve issue #604 and #631:

  • The docstring description for the updfcn and outfcn parameters for NonlinearIOSystem has been updated to reflect the fact that the param argument is required (issue update documentation for iosys/updfcn to indicate param is not optional #631; see also discussion Using a class method in a NonlinearIOSystem #630).

  • The sphinx documentation for classes has been modified so that the __call__ method is now included in the documentation when it exists (issue __call__ and other new methods not described in sphinx docs #604). This required updating the sphinx conf.py file to allow special member functions to be included. I also put information in the class docstrings for transfer functions and state space systems about calling these objects to get the frequency response.

  • The docstrings for classes yave been updated so that the sphinx documentation is now more uniform. The documentation for constructor arguments and attributes are now included in the class documentation and the __init__ docstring is suppressed in the sphinx-generated documentation (prior to this, it was sometimes in the class docstring and comes in the __init__ docstring). This change also allows the unwanted documentation of the deprecated input, output, and state attributes to be omitted (part of issue __call__ and other new methods not described in sphinx docs #604).

  • Various other PEP8 and consistency issues were addressed.

These changes required some refactoring the code, in particular in the use of the property decorator. I also changed some of the internal class attributes to be hidden attributes (names starting with underscore) since otherwise they show up in the documentation.

The best way to see the impact of these changes is to look at the compiled documentation. You can find a version here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
murrayrm added 4 commits June 11, 2021 21:36
@murrayrm
DOC: fix forced_response return arguments in documentation
fb65459
@murrayrm
DOC: update iosys docstrings - params not optional for updfcn, outfcn
d89dfd8
@murrayrm
DOC: fix LTI system attribute docstrings, add __call__, PEP8 cleanup
695cdfc
@murrayrm
DOC: move constructor docs from __init__ to class; remove attr docs
bf2472f
This was linked to issues Jun 13, 2021
__call__ and other new methods not described in sphinx docs #604
Closed
update documentation for iosys/updfcn to indicate param is not optional #631
Closed
@coveralls

coveralls commented Jun 13, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 89.658% when pulling 866a07c on murrayrm:docstring_updates into 9f27293 on python-control:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

namannimmo10
namannimmo10 reviewed Jun 13, 2021
View reviewed changes

@namannimmo10 namannimmo10 left a comment

Copy link
Copy Markdown
Contributor

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.

Some typos to consider;

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread control/frdata.py Outdated
smooth : bool, optional
If ``True``, create an interpoloation function that allows the
frequency response to be computed at any frequency within the range of
frquencies give in ``w``. If ``False`` (default), frequency response

@namannimmo10 namannimmo10 Jun 13, 2021

Copy link
Copy Markdown
Contributor

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.

Suggested change
frquencies give in ``w``. If ``False`` (default), frequency response
frequencies give in ``w``. If ``False`` (default), frequency response

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread control/frdata.py Outdated
w : iterable of real frequencies
List of frequency points for which data are available.
smooth : bool, optional
If ``True``, create an interpoloation function that allows the

@namannimmo10 namannimmo10 Jun 13, 2021

Copy link
Copy Markdown
Contributor

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.

Suggested change
If ``True``, create an interpoloation function that allows the
If ``True``, create an interpolation function that allows the

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread control/xferfcn.py Outdated
ninputs, noutputs, nstates : int
Number of input, output and state variables.
num, den : 2D list of array
Polynomial coeffients of the numerator and denominator.

@namannimmo10 namannimmo10 Jun 13, 2021

Copy link
Copy Markdown
Contributor

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.

Suggested change
Polynomial coeffients of the numerator and denominator.
Polynomial coefficients of the numerator and denominator.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread control/xferfcn.py Outdated
Comment on lines 145 to 146
>>> s = TransferFunction.s
>>> G = (s + 1)/(s**2 + 2*s + 1)

@namannimmo10 namannimmo10 Jun 13, 2021

Copy link
Copy Markdown
Contributor

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.

Suggested change
>>> s = TransferFunction.s
>>> G = (s + 1)/(s**2 + 2*s + 1)
>>> s = TransferFunction.s
>>> G = (s + 1)/(s**2 + 2*s + 1)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@murrayrm
TRV: fix typos pointed out by @namannimmo10
70a6cf9
bnavigator
bnavigator reviewed Jun 14, 2021
View reviewed changes

@bnavigator bnavigator left a comment

Copy link
Copy Markdown
Contributor

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.

There is an inconsistency in the TOC tree:

  • Differentially flat Systems
    • Module classes and functions
      • Flat system classes
        • control.flatsys.BasisFamily
        • ...
      • Flat system functions
  • Input/output systems
    • Module classes and functions
      • Input/output system classes -> Table with links to *Control system classes >> *
  • Describing functions
    • Module classes and functions
      • control.DescribingFunctionNonlinearity
      • ...
  • Optimal control
    • Module classes and functions
      • control.optimal.OptimalControlProblem
      • ...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread control/flatsys/linflat.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread control/frdata.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread control/frdata.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread control/iosys.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread control/xferfcn.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@murrayrm
DOC: fix inconsistencies in class constructor + class list documentation
bda7d82
bnavigator
bnavigator reviewed Jun 15, 2021
View reviewed changes

@bnavigator bnavigator left a comment

Copy link
Copy Markdown
Contributor

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.

Looks good! Just another typo:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread control/frdata.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread control/iosys.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@murrayrm
murrayrm force-pushed the docstring_updates branch from 7b81723 to f4b09b6 Compare June 15, 2021 15:10
@murrayrm
TRV: fix typos in FRD docstring
866a07c
@murrayrm
murrayrm force-pushed the docstring_updates branch from f4b09b6 to 866a07c Compare June 15, 2021 15:10
bnavigator
bnavigator approved these changes Jun 15, 2021
View reviewed changes
@murrayrm
murrayrm merged commit da27d35 into python-control:master Jun 16, 2021
@murrayrm
murrayrm deleted the docstring_updates branch November 25, 2021 22:06
@murrayrm murrayrm added this to the 0.9.1 milestone Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bnavigator bnavigator bnavigator approved these changes
+1 more reviewer
@namannimmo10 namannimmo10 namannimmo10 left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

0.9.1

Development

Successfully merging this pull request may close these issues.

update documentation for iosys/updfcn to indicate param is not optional __call__ and other new methods not described in sphinx docs

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@murrayrm @coveralls @bnavigator @namannimmo10
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.