Skip to content

Fix CI doctest, install-examples #1137

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

Conversation

roryyorke
Copy link
Contributor

Fixes gh-1136.

I tried '!=8.2' for sphinx-doc, which didn't work, so I used '<8.2'. I think '!=8.2.*' might, but didn't try it. See https://packaging.python.org/en/latest/specifications/version-specifiers/#id5 (not sure this applies to Conda/Mamba - it should).

@coveralls
Copy link

Coverage Status

coverage: 94.744%. remained the same
when pulling 2eab304 on roryyorke:fix-ci-doctest-install-examples
into f6799ab on python-control:main.

@murrayrm
Copy link
Member

murrayrm commented Mar 2, 2025

It would be nice to block out just the version that is failing, if possible, so that we will test against the latest new release when it comes out (and hopefully the bug is fixed).

Also, should we put something in pyproject.toml to flag this issue? If not, then a user could install with the latest version of iPython (or sphinx) and things might not work. I'm not quite sure where that would go, since python-control is not dependent on iPython.

@roryyorke
Copy link
Contributor Author

For IPython, it's reasonably likely that an upcoming release, say 9.0.1, will fix this (ipython/ipython#14807 claims to fix it). If it's later, 9.0.2 or whatever, we can update the relevant config file(s) to exclude all the broken version. So here I think the CI fix is OK.

For sphinx, the situation is trickier. From sphinx-doc/sphinx#13364 and sphinx-doc/sphinx#13352 , sphinx have made a change that breaks nbsphinx, and nbsphinx has a PR for necessary updates at spatialaudio/nbsphinx#826, but it's not clear when that will be merged and released.

I don't think there's a way to say "use nbsphinx >= 0.9.7, or failing that, use sphinx < 8.2.*", so I think the sphinx version condition I've added is a stop-gap until there's a released nbsphinx fix. I know this sort of stop-gap can easily last months (or years), and I don't know what to do about that. I guess a TODO in the doctest-env.yml, and open an issue now.

I've pushed a prototype of sphinx!=8.2.*, see https://github.com/roryyorke/python-control/actions/runs/13617760094/job/38063032976 , but I now think it's just as much of a stop-gap as <8.2.

As for pyproject.toml: I don't know if we can or should do anything about IPython. It's a clear bug (install IPython, run load_ext autoreload, and it's triggered) that doesn't affect only control-python, and that should be fixed soon(ish). The same reasoning applies to sphinx and nbsphinx, but in addition I imagine non-dev users rarely install these.

@murrayrm
Copy link
Member

murrayrm commented Mar 2, 2025

Thanks @roryyorke for the detail comments and the fix. I'll let this sit for a bit (at least rest of the day) before merging, in case others have comments. But I think this is otherwise good to go (and we need to get something in place soon to fix the CI tests for current and upcoming PRs).

@murrayrm murrayrm merged commit 58e7ad9 into python-control:main Mar 3, 2025
24 checks passed
@murrayrm murrayrm added this to the 0.10.2 milestone Mar 3, 2025
@Carreau
Copy link

Carreau commented Mar 3, 2025

IPython 9.0.1 should be out.

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.

CI failures in doctest, examples
4 participants