Lint fixes on benchmarks and examples/*.py#1135
Lint fixes on benchmarks and examples/*.py#1135murrayrm merged 3 commits intopython-control:mainfrom
Conversation
|
The CI errors are also showing up in #1133, so probably something changed on the GitHub Actions end of things. I'll set up a new issue to track that. |
Thanks. I can't reproduce the notebook conversion failure locally. I've attached the output of I see there's already a bug on Pmw for |
|
Sorry for the delay in reviewing this. All of the changes look good to me. Some comments on your comments:
I think it would be fine to move this to
Perhaps flag some of these as separate issues? For the specific case of
It would be nice to run lint on the notebooks. I agree that for MATLAB users, it will be convenient to use |
I don't think these are too controversial.
CI failures
I see two failures on CI , but I can't see that these changes caused them:
first, in
doctest-linux: https://github.com/roryyorke/python-control/actions/runs/13612156165/job/38050709282which seems to be sphinx-doc/sphinx#13352.
Then in
install-examples: https://github.com/roryyorke/python-control/actions/runs/13612156159/job/38050709274I'll install jupyterlab in my dev environment and see if I can reproduce this. I can't see that changing *.py files in examples could cause this.
tfvis.py and
PwmPmwWhen I ran
tfvis.pyunder Python 3.12, I gotin
PwmPmw code.Callablewas moved tocollections.abcin Python 3.10 (October 2021). The hack below lets the script run, but unlesspwmPmw is updated we should consider retiring this example.Warnings in examples
Some examples raise control deprecation warnings, e.g.,
genswitch.pyusesphase_plotinstead ofphase_plane_plot. I started looking into this, but it got a bit involved.Lint on notebooks
ruffcan also run on Jupyter notebooks. Some fixes are obvious:but I'm less sure about changing these
*imports; they are convenient, and make things more familiar for Matlab users: