Skip to content

Conversation

@mhucka
Copy link
Member

@mhucka mhucka commented Dec 14, 2025

The previous version of scripts/test_tutorials.py did not handle !pip commands inside if-then conditionals, and also didn't handle % magics. This PR makes some simple changes to the code to make it handle those cases.

The original motivation for these changes were to accommodate different notebook instructions for running pip installs. The notebooks have been changed since then, and the specific constructs that led to this PR are not there anymore. However, IMHO these simple changes are worth adding at some point because the need to combine ! with conditionals (as well as use % magics) may arise again in the future. We can save future maintainers the trouble of figuring this out again.

The previous version failed to handle `!pip` commands inside if-then
conditionals, and also didn't handle `%` magics. This fixes the script
to handle those cases.
@mhucka mhucka marked this pull request as ready for review December 14, 2025 03:47
@mhucka mhucka marked this pull request as draft December 15, 2025 06:20
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.

1 participant