Skip to content
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

Fix CI warnings #955

Merged
merged 4 commits into from
Jan 12, 2024
Merged

Conversation

murrayrm
Copy link
Member

@murrayrm murrayrm commented Dec 29, 2023

This PR makes a bunch of small changes to remove warning messages in the GitHub actions CI runs:

  • Access scalar NumPy arrays using item() (old usage is newly deprecated in NumPy).
  • Change set_tight_layout(True) to fig.set_layout_engine('tight') (newly deprecated in Matplotlib).
  • Update unit tests using deprecated functionality to use current functionality.
  • Add warning filters for internal calls to connect (which are OK for now).
  • Avoid calling tf2zpk with zero in the numerator (SciPy generates warning).
  • Fix up some strings that had newly deprecated escape sequences (by using raw strings)
  • Turn off warnings for optimal control problems that fail to hit desired precision (but still return valid answers)

Note: it is likely that this PR will conflict with #953. We should probably merge #953 first and then rebase this PR since the changes here are pretty straightforward.

@coveralls
Copy link

coveralls commented Dec 30, 2023

Coverage Status

coverage: 94.78% (-0.09%) from 94.866%
when pulling dc74493 on murrayrm:fixwarnings-23Dec2023
into eb0f3f9 on python-control:main.

control/xferfcn.py Outdated Show resolved Hide resolved
@murrayrm murrayrm added this to the 0.10.0 milestone Dec 30, 2023
@bnavigator
Copy link
Contributor

Note: it is likely that this PR will conflict with #953. We should probably merge #953 first and then rebase this PR since the changes here are pretty straightforward.

Either this or the other way round. Python 3.12 requires numpy 1.26 on conda, already triggering the deprecation warnings. I had to disable them for the Slycot CI: https://github.com/python-control/Slycot/pull/227/files#diff-b2cf1d5b6cad7a0f6a749da416cb8a4e34040b2164a84a651783692d4b60d608R17

@murrayrm
Copy link
Member Author

Looks like there were no conflicts, so going ahead and merging.

@bnavigator: FYI (and not really for this PR), I tried updating GitHub actions to use Python 3.12 but mamba caused problems, so I'm waiting until that clears. You can find the attempt here.

@murrayrm murrayrm closed this Jan 12, 2024
@murrayrm murrayrm reopened this Jan 12, 2024
@murrayrm murrayrm merged commit 9509dfd into python-control:main Jan 12, 2024
23 checks passed
@murrayrm murrayrm deleted the fixwarnings-23Dec2023 branch January 12, 2024 05:35
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.

None yet

4 participants